Current Path : /home/church/www/launch100ar.com/wp-content/plugins/post-grid/build/ |
Current File : /home/church/www/launch100ar.com/wp-content/plugins/post-grid/build/index.js |
/******/ (() => { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ "./node_modules/@splidejs/react-splide/dist/js/react-splide.esm.js": /*!*************************************************************************!*\ !*** ./node_modules/@splidejs/react-splide/dist/js/react-splide.esm.js ***! \*************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Splide: () => (/* binding */ Splide2), /* harmony export */ SplideSlide: () => (/* binding */ SplideSlide), /* harmony export */ SplideTrack: () => (/* binding */ SplideTrack) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); // node_modules/@splidejs/splide/dist/js/splide.esm.js function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; } var MEDIA_PREFERS_REDUCED_MOTION = "(prefers-reduced-motion: reduce)"; var CREATED = 1; var MOUNTED = 2; var IDLE = 3; var MOVING = 4; var SCROLLING = 5; var DRAGGING = 6; var DESTROYED = 7; var STATES = { CREATED, MOUNTED, IDLE, MOVING, SCROLLING, DRAGGING, DESTROYED }; function empty(array) { array.length = 0; } function slice(arrayLike, start, end) { return Array.prototype.slice.call(arrayLike, start, end); } function apply(func) { return func.bind.apply(func, [null].concat(slice(arguments, 1))); } var nextTick = setTimeout; var noop = function noop2() { }; function raf(func) { return requestAnimationFrame(func); } function typeOf(type, subject) { return typeof subject === type; } function isObject(subject) { return !isNull(subject) && typeOf("object", subject); } var isArray = Array.isArray; var isFunction = apply(typeOf, "function"); var isString = apply(typeOf, "string"); var isUndefined = apply(typeOf, "undefined"); function isNull(subject) { return subject === null; } function isHTMLElement(subject) { try { return subject instanceof (subject.ownerDocument.defaultView || window).HTMLElement; } catch (e) { return false; } } function toArray(value) { return isArray(value) ? value : [value]; } function forEach(values, iteratee) { toArray(values).forEach(iteratee); } function includes(array, value) { return array.indexOf(value) > -1; } function push(array, items) { array.push.apply(array, toArray(items)); return array; } function toggleClass(elm, classes, add) { if (elm) { forEach(classes, function(name) { if (name) { elm.classList[add ? "add" : "remove"](name); } }); } } function addClass(elm, classes) { toggleClass(elm, isString(classes) ? classes.split(" ") : classes, true); } function append(parent, children2) { forEach(children2, parent.appendChild.bind(parent)); } function before(nodes, ref) { forEach(nodes, function(node) { var parent = (ref || node).parentNode; if (parent) { parent.insertBefore(node, ref); } }); } function matches(elm, selector) { return isHTMLElement(elm) && (elm["msMatchesSelector"] || elm.matches).call(elm, selector); } function children(parent, selector) { var children2 = parent ? slice(parent.children) : []; return selector ? children2.filter(function(child2) { return matches(child2, selector); }) : children2; } function child(parent, selector) { return selector ? children(parent, selector)[0] : parent.firstElementChild; } var ownKeys = Object.keys; function forOwn(object, iteratee, right) { if (object) { (right ? ownKeys(object).reverse() : ownKeys(object)).forEach(function(key) { key !== "__proto__" && iteratee(object[key], key); }); } return object; } function assign(object) { slice(arguments, 1).forEach(function(source) { forOwn(source, function(value, key) { object[key] = source[key]; }); }); return object; } function merge(object) { slice(arguments, 1).forEach(function(source) { forOwn(source, function(value, key) { if (isArray(value)) { object[key] = value.slice(); } else if (isObject(value)) { object[key] = merge({}, isObject(object[key]) ? object[key] : {}, value); } else { object[key] = value; } }); }); return object; } function omit(object, keys) { forEach(keys || ownKeys(object), function(key) { delete object[key]; }); } function removeAttribute(elms, attrs) { forEach(elms, function(elm) { forEach(attrs, function(attr) { elm && elm.removeAttribute(attr); }); }); } function setAttribute(elms, attrs, value) { if (isObject(attrs)) { forOwn(attrs, function(value2, name) { setAttribute(elms, name, value2); }); } else { forEach(elms, function(elm) { isNull(value) || value === "" ? removeAttribute(elm, attrs) : elm.setAttribute(attrs, String(value)); }); } } function create(tag, attrs, parent) { var elm = document.createElement(tag); if (attrs) { isString(attrs) ? addClass(elm, attrs) : setAttribute(elm, attrs); } parent && append(parent, elm); return elm; } function style(elm, prop, value) { if (isUndefined(value)) { return getComputedStyle(elm)[prop]; } if (!isNull(value)) { elm.style[prop] = "" + value; } } function display(elm, display2) { style(elm, "display", display2); } function focus(elm) { elm["setActive"] && elm["setActive"]() || elm.focus({ preventScroll: true }); } function getAttribute(elm, attr) { return elm.getAttribute(attr); } function hasClass(elm, className) { return elm && elm.classList.contains(className); } function rect(target) { return target.getBoundingClientRect(); } function remove(nodes) { forEach(nodes, function(node) { if (node && node.parentNode) { node.parentNode.removeChild(node); } }); } function parseHtml(html) { return child(new DOMParser().parseFromString(html, "text/html").body); } function prevent(e, stopPropagation) { e.preventDefault(); if (stopPropagation) { e.stopPropagation(); e.stopImmediatePropagation(); } } function query(parent, selector) { return parent && parent.querySelector(selector); } function queryAll(parent, selector) { return selector ? slice(parent.querySelectorAll(selector)) : []; } function removeClass(elm, classes) { toggleClass(elm, classes, false); } function timeOf(e) { return e.timeStamp; } function unit(value) { return isString(value) ? value : value ? value + "px" : ""; } var PROJECT_CODE = "splide"; var DATA_ATTRIBUTE = "data-" + PROJECT_CODE; function assert(condition, message) { if (!condition) { throw new Error("[" + PROJECT_CODE + "] " + (message || "")); } } var min = Math.min; var max = Math.max; var floor = Math.floor; var ceil = Math.ceil; var abs = Math.abs; function approximatelyEqual(x, y, epsilon) { return abs(x - y) < epsilon; } function between(number, x, y, exclusive) { var minimum = min(x, y); var maximum = max(x, y); return exclusive ? minimum < number && number < maximum : minimum <= number && number <= maximum; } function clamp(number, x, y) { var minimum = min(x, y); var maximum = max(x, y); return min(max(minimum, number), maximum); } function sign(x) { return +(x > 0) - +(x < 0); } function format(string, replacements) { forEach(replacements, function(replacement) { string = string.replace("%s", "" + replacement); }); return string; } function pad(number) { return number < 10 ? "0" + number : "" + number; } var ids = {}; function uniqueId(prefix) { return "" + prefix + pad(ids[prefix] = (ids[prefix] || 0) + 1); } function EventBinder() { var listeners = []; function bind(targets, events, callback, options) { forEachEvent(targets, events, function(target, event, namespace) { var isEventTarget = "addEventListener" in target; var remover = isEventTarget ? target.removeEventListener.bind(target, event, callback, options) : target["removeListener"].bind(target, callback); isEventTarget ? target.addEventListener(event, callback, options) : target["addListener"](callback); listeners.push([target, event, namespace, callback, remover]); }); } function unbind(targets, events, callback) { forEachEvent(targets, events, function(target, event, namespace) { listeners = listeners.filter(function(listener) { if (listener[0] === target && listener[1] === event && listener[2] === namespace && (!callback || listener[3] === callback)) { listener[4](); return false; } return true; }); }); } function dispatch(target, type, detail) { var e; var bubbles = true; if (typeof CustomEvent === "function") { e = new CustomEvent(type, { bubbles, detail }); } else { e = document.createEvent("CustomEvent"); e.initCustomEvent(type, bubbles, false, detail); } target.dispatchEvent(e); return e; } function forEachEvent(targets, events, iteratee) { forEach(targets, function(target) { target && forEach(events, function(events2) { events2.split(" ").forEach(function(eventNS) { var fragment = eventNS.split("."); iteratee(target, fragment[0], fragment[1]); }); }); }); } function destroy() { listeners.forEach(function(data) { data[4](); }); empty(listeners); } return { bind, unbind, dispatch, destroy }; } var EVENT_MOUNTED = "mounted"; var EVENT_READY = "ready"; var EVENT_MOVE = "move"; var EVENT_MOVED = "moved"; var EVENT_CLICK = "click"; var EVENT_ACTIVE = "active"; var EVENT_INACTIVE = "inactive"; var EVENT_VISIBLE = "visible"; var EVENT_HIDDEN = "hidden"; var EVENT_REFRESH = "refresh"; var EVENT_UPDATED = "updated"; var EVENT_RESIZE = "resize"; var EVENT_RESIZED = "resized"; var EVENT_DRAG = "drag"; var EVENT_DRAGGING = "dragging"; var EVENT_DRAGGED = "dragged"; var EVENT_SCROLL = "scroll"; var EVENT_SCROLLED = "scrolled"; var EVENT_OVERFLOW = "overflow"; var EVENT_DESTROY = "destroy"; var EVENT_ARROWS_MOUNTED = "arrows:mounted"; var EVENT_ARROWS_UPDATED = "arrows:updated"; var EVENT_PAGINATION_MOUNTED = "pagination:mounted"; var EVENT_PAGINATION_UPDATED = "pagination:updated"; var EVENT_NAVIGATION_MOUNTED = "navigation:mounted"; var EVENT_AUTOPLAY_PLAY = "autoplay:play"; var EVENT_AUTOPLAY_PLAYING = "autoplay:playing"; var EVENT_AUTOPLAY_PAUSE = "autoplay:pause"; var EVENT_LAZYLOAD_LOADED = "lazyload:loaded"; var EVENT_SLIDE_KEYDOWN = "sk"; var EVENT_SHIFTED = "sh"; var EVENT_END_INDEX_CHANGED = "ei"; function EventInterface(Splide22) { var bus = Splide22 ? Splide22.event.bus : document.createDocumentFragment(); var binder = EventBinder(); function on(events, callback) { binder.bind(bus, toArray(events).join(" "), function(e) { callback.apply(callback, isArray(e.detail) ? e.detail : []); }); } function emit(event) { binder.dispatch(bus, event, slice(arguments, 1)); } if (Splide22) { Splide22.event.on(EVENT_DESTROY, binder.destroy); } return assign(binder, { bus, on, off: apply(binder.unbind, bus), emit }); } function RequestInterval(interval, onInterval, onUpdate, limit) { var now = Date.now; var startTime; var rate = 0; var id; var paused = true; var count = 0; function update() { if (!paused) { rate = interval ? min((now() - startTime) / interval, 1) : 1; onUpdate && onUpdate(rate); if (rate >= 1) { onInterval(); startTime = now(); if (limit && ++count >= limit) { return pause(); } } id = raf(update); } } function start(resume) { resume || cancel(); startTime = now() - (resume ? rate * interval : 0); paused = false; id = raf(update); } function pause() { paused = true; } function rewind() { startTime = now(); rate = 0; if (onUpdate) { onUpdate(rate); } } function cancel() { id && cancelAnimationFrame(id); rate = 0; id = 0; paused = true; } function set(time) { interval = time; } function isPaused() { return paused; } return { start, rewind, pause, cancel, set, isPaused }; } function State(initialState) { var state = initialState; function set(value) { state = value; } function is(states) { return includes(toArray(states), state); } return { set, is }; } function Throttle(func, duration) { var interval = RequestInterval(duration || 0, func, null, 1); return function() { interval.isPaused() && interval.start(); }; } function Media(Splide22, Components2, options) { var state = Splide22.state; var breakpoints = options.breakpoints || {}; var reducedMotion = options.reducedMotion || {}; var binder = EventBinder(); var queries = []; function setup() { var isMin = options.mediaQuery === "min"; ownKeys(breakpoints).sort(function(n, m) { return isMin ? +n - +m : +m - +n; }).forEach(function(key) { register(breakpoints[key], "(" + (isMin ? "min" : "max") + "-width:" + key + "px)"); }); register(reducedMotion, MEDIA_PREFERS_REDUCED_MOTION); update(); } function destroy(completely) { if (completely) { binder.destroy(); } } function register(options2, query2) { var queryList = matchMedia(query2); binder.bind(queryList, "change", update); queries.push([options2, queryList]); } function update() { var destroyed = state.is(DESTROYED); var direction = options.direction; var merged = queries.reduce(function(merged2, entry) { return merge(merged2, entry[1].matches ? entry[0] : {}); }, {}); omit(options); set(merged); if (options.destroy) { Splide22.destroy(options.destroy === "completely"); } else if (destroyed) { destroy(true); Splide22.mount(); } else { direction !== options.direction && Splide22.refresh(); } } function reduce(enable) { if (matchMedia(MEDIA_PREFERS_REDUCED_MOTION).matches) { enable ? merge(options, reducedMotion) : omit(options, ownKeys(reducedMotion)); } } function set(opts, base, notify) { merge(options, opts); base && merge(Object.getPrototypeOf(options), opts); if (notify || !state.is(CREATED)) { Splide22.emit(EVENT_UPDATED, options); } } return { setup, destroy, reduce, set }; } var ARROW = "Arrow"; var ARROW_LEFT = ARROW + "Left"; var ARROW_RIGHT = ARROW + "Right"; var ARROW_UP = ARROW + "Up"; var ARROW_DOWN = ARROW + "Down"; var RTL = "rtl"; var TTB = "ttb"; var ORIENTATION_MAP = { width: ["height"], left: ["top", "right"], right: ["bottom", "left"], x: ["y"], X: ["Y"], Y: ["X"], ArrowLeft: [ARROW_UP, ARROW_RIGHT], ArrowRight: [ARROW_DOWN, ARROW_LEFT] }; function Direction(Splide22, Components2, options) { function resolve(prop, axisOnly, direction) { direction = direction || options.direction; var index = direction === RTL && !axisOnly ? 1 : direction === TTB ? 0 : -1; return ORIENTATION_MAP[prop] && ORIENTATION_MAP[prop][index] || prop.replace(/width|left|right/i, function(match, offset) { var replacement = ORIENTATION_MAP[match.toLowerCase()][index] || match; return offset > 0 ? replacement.charAt(0).toUpperCase() + replacement.slice(1) : replacement; }); } function orient(value) { return value * (options.direction === RTL ? 1 : -1); } return { resolve, orient }; } var ROLE = "role"; var TAB_INDEX = "tabindex"; var DISABLED = "disabled"; var ARIA_PREFIX = "aria-"; var ARIA_CONTROLS = ARIA_PREFIX + "controls"; var ARIA_CURRENT = ARIA_PREFIX + "current"; var ARIA_SELECTED = ARIA_PREFIX + "selected"; var ARIA_LABEL = ARIA_PREFIX + "label"; var ARIA_LABELLEDBY = ARIA_PREFIX + "labelledby"; var ARIA_HIDDEN = ARIA_PREFIX + "hidden"; var ARIA_ORIENTATION = ARIA_PREFIX + "orientation"; var ARIA_ROLEDESCRIPTION = ARIA_PREFIX + "roledescription"; var ARIA_LIVE = ARIA_PREFIX + "live"; var ARIA_BUSY = ARIA_PREFIX + "busy"; var ARIA_ATOMIC = ARIA_PREFIX + "atomic"; var ALL_ATTRIBUTES = [ROLE, TAB_INDEX, DISABLED, ARIA_CONTROLS, ARIA_CURRENT, ARIA_LABEL, ARIA_LABELLEDBY, ARIA_HIDDEN, ARIA_ORIENTATION, ARIA_ROLEDESCRIPTION]; var CLASS_PREFIX = PROJECT_CODE + "__"; var STATUS_CLASS_PREFIX = "is-"; var CLASS_ROOT = PROJECT_CODE; var CLASS_TRACK = CLASS_PREFIX + "track"; var CLASS_LIST = CLASS_PREFIX + "list"; var CLASS_SLIDE = CLASS_PREFIX + "slide"; var CLASS_CLONE = CLASS_SLIDE + "--clone"; var CLASS_CONTAINER = CLASS_SLIDE + "__container"; var CLASS_ARROWS = CLASS_PREFIX + "arrows"; var CLASS_ARROW = CLASS_PREFIX + "arrow"; var CLASS_ARROW_PREV = CLASS_ARROW + "--prev"; var CLASS_ARROW_NEXT = CLASS_ARROW + "--next"; var CLASS_PAGINATION = CLASS_PREFIX + "pagination"; var CLASS_PAGINATION_PAGE = CLASS_PAGINATION + "__page"; var CLASS_PROGRESS = CLASS_PREFIX + "progress"; var CLASS_PROGRESS_BAR = CLASS_PROGRESS + "__bar"; var CLASS_TOGGLE = CLASS_PREFIX + "toggle"; var CLASS_TOGGLE_PLAY = CLASS_TOGGLE + "__play"; var CLASS_TOGGLE_PAUSE = CLASS_TOGGLE + "__pause"; var CLASS_SPINNER = CLASS_PREFIX + "spinner"; var CLASS_SR = CLASS_PREFIX + "sr"; var CLASS_INITIALIZED = STATUS_CLASS_PREFIX + "initialized"; var CLASS_ACTIVE = STATUS_CLASS_PREFIX + "active"; var CLASS_PREV = STATUS_CLASS_PREFIX + "prev"; var CLASS_NEXT = STATUS_CLASS_PREFIX + "next"; var CLASS_VISIBLE = STATUS_CLASS_PREFIX + "visible"; var CLASS_LOADING = STATUS_CLASS_PREFIX + "loading"; var CLASS_FOCUS_IN = STATUS_CLASS_PREFIX + "focus-in"; var CLASS_OVERFLOW = STATUS_CLASS_PREFIX + "overflow"; var STATUS_CLASSES = [CLASS_ACTIVE, CLASS_VISIBLE, CLASS_PREV, CLASS_NEXT, CLASS_LOADING, CLASS_FOCUS_IN, CLASS_OVERFLOW]; var CLASSES = { slide: CLASS_SLIDE, clone: CLASS_CLONE, arrows: CLASS_ARROWS, arrow: CLASS_ARROW, prev: CLASS_ARROW_PREV, next: CLASS_ARROW_NEXT, pagination: CLASS_PAGINATION, page: CLASS_PAGINATION_PAGE, spinner: CLASS_SPINNER }; function closest(from, selector) { if (isFunction(from.closest)) { return from.closest(selector); } var elm = from; while (elm && elm.nodeType === 1) { if (matches(elm, selector)) { break; } elm = elm.parentElement; } return elm; } var FRICTION = 5; var LOG_INTERVAL = 200; var POINTER_DOWN_EVENTS = "touchstart mousedown"; var POINTER_MOVE_EVENTS = "touchmove mousemove"; var POINTER_UP_EVENTS = "touchend touchcancel mouseup click"; function Elements(Splide22, Components2, options) { var _EventInterface = EventInterface(Splide22), on = _EventInterface.on, bind = _EventInterface.bind; var root = Splide22.root; var i18n = options.i18n; var elements = {}; var slides = []; var rootClasses = []; var trackClasses = []; var track; var list; var isUsingKey; function setup() { collect(); init(); update(); } function mount() { on(EVENT_REFRESH, destroy); on(EVENT_REFRESH, setup); on(EVENT_UPDATED, update); bind(document, POINTER_DOWN_EVENTS + " keydown", function(e) { isUsingKey = e.type === "keydown"; }, { capture: true }); bind(root, "focusin", function() { toggleClass(root, CLASS_FOCUS_IN, !!isUsingKey); }); } function destroy(completely) { var attrs = ALL_ATTRIBUTES.concat("style"); empty(slides); removeClass(root, rootClasses); removeClass(track, trackClasses); removeAttribute([track, list], attrs); removeAttribute(root, completely ? attrs : ["style", ARIA_ROLEDESCRIPTION]); } function update() { removeClass(root, rootClasses); removeClass(track, trackClasses); rootClasses = getClasses(CLASS_ROOT); trackClasses = getClasses(CLASS_TRACK); addClass(root, rootClasses); addClass(track, trackClasses); setAttribute(root, ARIA_LABEL, options.label); setAttribute(root, ARIA_LABELLEDBY, options.labelledby); } function collect() { track = find("." + CLASS_TRACK); list = child(track, "." + CLASS_LIST); assert(track && list, "A track/list element is missing."); push(slides, children(list, "." + CLASS_SLIDE + ":not(." + CLASS_CLONE + ")")); forOwn({ arrows: CLASS_ARROWS, pagination: CLASS_PAGINATION, prev: CLASS_ARROW_PREV, next: CLASS_ARROW_NEXT, bar: CLASS_PROGRESS_BAR, toggle: CLASS_TOGGLE }, function(className, key) { elements[key] = find("." + className); }); assign(elements, { root, track, list, slides }); } function init() { var id = root.id || uniqueId(PROJECT_CODE); var role = options.role; root.id = id; track.id = track.id || id + "-track"; list.id = list.id || id + "-list"; if (!getAttribute(root, ROLE) && root.tagName !== "SECTION" && role) { setAttribute(root, ROLE, role); } setAttribute(root, ARIA_ROLEDESCRIPTION, i18n.carousel); setAttribute(list, ROLE, "presentation"); } function find(selector) { var elm = query(root, selector); return elm && closest(elm, "." + CLASS_ROOT) === root ? elm : void 0; } function getClasses(base) { return [base + "--" + options.type, base + "--" + options.direction, options.drag && base + "--draggable", options.isNavigation && base + "--nav", base === CLASS_ROOT && CLASS_ACTIVE]; } return assign(elements, { setup, mount, destroy }); } var SLIDE = "slide"; var LOOP = "loop"; var FADE = "fade"; function Slide$1(Splide22, index, slideIndex, slide) { var event = EventInterface(Splide22); var on = event.on, emit = event.emit, bind = event.bind; var Components = Splide22.Components, root = Splide22.root, options = Splide22.options; var isNavigation = options.isNavigation, updateOnMove = options.updateOnMove, i18n = options.i18n, pagination = options.pagination, slideFocus = options.slideFocus; var resolve = Components.Direction.resolve; var styles = getAttribute(slide, "style"); var label = getAttribute(slide, ARIA_LABEL); var isClone = slideIndex > -1; var container = child(slide, "." + CLASS_CONTAINER); var destroyed; function mount() { if (!isClone) { slide.id = root.id + "-slide" + pad(index + 1); setAttribute(slide, ROLE, pagination ? "tabpanel" : "group"); setAttribute(slide, ARIA_ROLEDESCRIPTION, i18n.slide); setAttribute(slide, ARIA_LABEL, label || format(i18n.slideLabel, [index + 1, Splide22.length])); } listen(); } function listen() { bind(slide, "click", apply(emit, EVENT_CLICK, self)); bind(slide, "keydown", apply(emit, EVENT_SLIDE_KEYDOWN, self)); on([EVENT_MOVED, EVENT_SHIFTED, EVENT_SCROLLED], update); on(EVENT_NAVIGATION_MOUNTED, initNavigation); if (updateOnMove) { on(EVENT_MOVE, onMove); } } function destroy() { destroyed = true; event.destroy(); removeClass(slide, STATUS_CLASSES); removeAttribute(slide, ALL_ATTRIBUTES); setAttribute(slide, "style", styles); setAttribute(slide, ARIA_LABEL, label || ""); } function initNavigation() { var controls = Splide22.splides.map(function(target) { var Slide2 = target.splide.Components.Slides.getAt(index); return Slide2 ? Slide2.slide.id : ""; }).join(" "); setAttribute(slide, ARIA_LABEL, format(i18n.slideX, (isClone ? slideIndex : index) + 1)); setAttribute(slide, ARIA_CONTROLS, controls); setAttribute(slide, ROLE, slideFocus ? "button" : ""); slideFocus && removeAttribute(slide, ARIA_ROLEDESCRIPTION); } function onMove() { if (!destroyed) { update(); } } function update() { if (!destroyed) { var curr = Splide22.index; updateActivity(); updateVisibility(); toggleClass(slide, CLASS_PREV, index === curr - 1); toggleClass(slide, CLASS_NEXT, index === curr + 1); } } function updateActivity() { var active = isActive(); if (active !== hasClass(slide, CLASS_ACTIVE)) { toggleClass(slide, CLASS_ACTIVE, active); setAttribute(slide, ARIA_CURRENT, isNavigation && active || ""); emit(active ? EVENT_ACTIVE : EVENT_INACTIVE, self); } } function updateVisibility() { var visible = isVisible(); var hidden = !visible && (!isActive() || isClone); if (!Splide22.state.is([MOVING, SCROLLING])) { setAttribute(slide, ARIA_HIDDEN, hidden || ""); } setAttribute(queryAll(slide, options.focusableNodes || ""), TAB_INDEX, hidden ? -1 : ""); if (slideFocus) { setAttribute(slide, TAB_INDEX, hidden ? -1 : 0); } if (visible !== hasClass(slide, CLASS_VISIBLE)) { toggleClass(slide, CLASS_VISIBLE, visible); emit(visible ? EVENT_VISIBLE : EVENT_HIDDEN, self); } if (!visible && document.activeElement === slide) { var Slide2 = Components.Slides.getAt(Splide22.index); Slide2 && focus(Slide2.slide); } } function style$1(prop, value, useContainer) { style(useContainer && container || slide, prop, value); } function isActive() { var curr = Splide22.index; return curr === index || options.cloneStatus && curr === slideIndex; } function isVisible() { if (Splide22.is(FADE)) { return isActive(); } var trackRect = rect(Components.Elements.track); var slideRect = rect(slide); var left = resolve("left", true); var right = resolve("right", true); return floor(trackRect[left]) <= ceil(slideRect[left]) && floor(slideRect[right]) <= ceil(trackRect[right]); } function isWithin(from, distance) { var diff = abs(from - index); if (!isClone && (options.rewind || Splide22.is(LOOP))) { diff = min(diff, Splide22.length - diff); } return diff <= distance; } var self = { index, slideIndex, slide, container, isClone, mount, destroy, update, style: style$1, isWithin }; return self; } function Slides(Splide22, Components2, options) { var _EventInterface2 = EventInterface(Splide22), on = _EventInterface2.on, emit = _EventInterface2.emit, bind = _EventInterface2.bind; var _Components2$Elements = Components2.Elements, slides = _Components2$Elements.slides, list = _Components2$Elements.list; var Slides2 = []; function mount() { init(); on(EVENT_REFRESH, destroy); on(EVENT_REFRESH, init); } function init() { slides.forEach(function(slide, index) { register(slide, index, -1); }); } function destroy() { forEach$1(function(Slide2) { Slide2.destroy(); }); empty(Slides2); } function update() { forEach$1(function(Slide2) { Slide2.update(); }); } function register(slide, index, slideIndex) { var object = Slide$1(Splide22, index, slideIndex, slide); object.mount(); Slides2.push(object); Slides2.sort(function(Slide1, Slide2) { return Slide1.index - Slide2.index; }); } function get(excludeClones) { return excludeClones ? filter(function(Slide2) { return !Slide2.isClone; }) : Slides2; } function getIn(page) { var Controller2 = Components2.Controller; var index = Controller2.toIndex(page); var max2 = Controller2.hasFocus() ? 1 : options.perPage; return filter(function(Slide2) { return between(Slide2.index, index, index + max2 - 1); }); } function getAt(index) { return filter(index)[0]; } function add(items, index) { forEach(items, function(slide) { if (isString(slide)) { slide = parseHtml(slide); } if (isHTMLElement(slide)) { var ref = slides[index]; ref ? before(slide, ref) : append(list, slide); addClass(slide, options.classes.slide); observeImages(slide, apply(emit, EVENT_RESIZE)); } }); emit(EVENT_REFRESH); } function remove$1(matcher) { remove(filter(matcher).map(function(Slide2) { return Slide2.slide; })); emit(EVENT_REFRESH); } function forEach$1(iteratee, excludeClones) { get(excludeClones).forEach(iteratee); } function filter(matcher) { return Slides2.filter(isFunction(matcher) ? matcher : function(Slide2) { return isString(matcher) ? matches(Slide2.slide, matcher) : includes(toArray(matcher), Slide2.index); }); } function style2(prop, value, useContainer) { forEach$1(function(Slide2) { Slide2.style(prop, value, useContainer); }); } function observeImages(elm, callback) { var images = queryAll(elm, "img"); var length = images.length; if (length) { images.forEach(function(img) { bind(img, "load error", function() { if (!--length) { callback(); } }); }); } else { callback(); } } function getLength(excludeClones) { return excludeClones ? slides.length : Slides2.length; } function isEnough() { return Slides2.length > options.perPage; } return { mount, destroy, update, register, get, getIn, getAt, add, remove: remove$1, forEach: forEach$1, filter, style: style2, getLength, isEnough }; } function Layout(Splide22, Components2, options) { var _EventInterface3 = EventInterface(Splide22), on = _EventInterface3.on, bind = _EventInterface3.bind, emit = _EventInterface3.emit; var Slides2 = Components2.Slides; var resolve = Components2.Direction.resolve; var _Components2$Elements2 = Components2.Elements, root = _Components2$Elements2.root, track = _Components2$Elements2.track, list = _Components2$Elements2.list; var getAt = Slides2.getAt, styleSlides = Slides2.style; var vertical; var rootRect; var overflow; function mount() { init(); bind(window, "resize load", Throttle(apply(emit, EVENT_RESIZE))); on([EVENT_UPDATED, EVENT_REFRESH], init); on(EVENT_RESIZE, resize); } function init() { vertical = options.direction === TTB; style(root, "maxWidth", unit(options.width)); style(track, resolve("paddingLeft"), cssPadding(false)); style(track, resolve("paddingRight"), cssPadding(true)); resize(true); } function resize(force) { var newRect = rect(root); if (force || rootRect.width !== newRect.width || rootRect.height !== newRect.height) { style(track, "height", cssTrackHeight()); styleSlides(resolve("marginRight"), unit(options.gap)); styleSlides("width", cssSlideWidth()); styleSlides("height", cssSlideHeight(), true); rootRect = newRect; emit(EVENT_RESIZED); if (overflow !== (overflow = isOverflow())) { toggleClass(root, CLASS_OVERFLOW, overflow); emit(EVENT_OVERFLOW, overflow); } } } function cssPadding(right) { var padding = options.padding; var prop = resolve(right ? "right" : "left"); return padding && unit(padding[prop] || (isObject(padding) ? 0 : padding)) || "0px"; } function cssTrackHeight() { var height = ""; if (vertical) { height = cssHeight(); assert(height, "height or heightRatio is missing."); height = "calc(" + height + " - " + cssPadding(false) + " - " + cssPadding(true) + ")"; } return height; } function cssHeight() { return unit(options.height || rect(list).width * options.heightRatio); } function cssSlideWidth() { return options.autoWidth ? null : unit(options.fixedWidth) || (vertical ? "" : cssSlideSize()); } function cssSlideHeight() { return unit(options.fixedHeight) || (vertical ? options.autoHeight ? null : cssSlideSize() : cssHeight()); } function cssSlideSize() { var gap = unit(options.gap); return "calc((100%" + (gap && " + " + gap) + ")/" + (options.perPage || 1) + (gap && " - " + gap) + ")"; } function listSize() { return rect(list)[resolve("width")]; } function slideSize(index, withoutGap) { var Slide2 = getAt(index || 0); return Slide2 ? rect(Slide2.slide)[resolve("width")] + (withoutGap ? 0 : getGap()) : 0; } function totalSize(index, withoutGap) { var Slide2 = getAt(index); if (Slide2) { var right = rect(Slide2.slide)[resolve("right")]; var left = rect(list)[resolve("left")]; return abs(right - left) + (withoutGap ? 0 : getGap()); } return 0; } function sliderSize(withoutGap) { return totalSize(Splide22.length - 1) - totalSize(0) + slideSize(0, withoutGap); } function getGap() { var Slide2 = getAt(0); return Slide2 && parseFloat(style(Slide2.slide, resolve("marginRight"))) || 0; } function getPadding(right) { return parseFloat(style(track, resolve("padding" + (right ? "Right" : "Left")))) || 0; } function isOverflow() { return Splide22.is(FADE) || sliderSize(true) > listSize(); } return { mount, resize, listSize, slideSize, sliderSize, totalSize, getPadding, isOverflow }; } var MULTIPLIER = 2; function Clones(Splide22, Components2, options) { var event = EventInterface(Splide22); var on = event.on; var Elements2 = Components2.Elements, Slides2 = Components2.Slides; var resolve = Components2.Direction.resolve; var clones = []; var cloneCount; function mount() { on(EVENT_REFRESH, remount); on([EVENT_UPDATED, EVENT_RESIZE], observe); if (cloneCount = computeCloneCount()) { generate(cloneCount); Components2.Layout.resize(true); } } function remount() { destroy(); mount(); } function destroy() { remove(clones); empty(clones); event.destroy(); } function observe() { var count = computeCloneCount(); if (cloneCount !== count) { if (cloneCount < count || !count) { event.emit(EVENT_REFRESH); } } } function generate(count) { var slides = Slides2.get().slice(); var length = slides.length; if (length) { while (slides.length < count) { push(slides, slides); } push(slides.slice(-count), slides.slice(0, count)).forEach(function(Slide2, index) { var isHead = index < count; var clone = cloneDeep(Slide2.slide, index); isHead ? before(clone, slides[0].slide) : append(Elements2.list, clone); push(clones, clone); Slides2.register(clone, index - count + (isHead ? 0 : length), Slide2.index); }); } } function cloneDeep(elm, index) { var clone = elm.cloneNode(true); addClass(clone, options.classes.clone); clone.id = Splide22.root.id + "-clone" + pad(index + 1); return clone; } function computeCloneCount() { var clones2 = options.clones; if (!Splide22.is(LOOP)) { clones2 = 0; } else if (isUndefined(clones2)) { var fixedSize = options[resolve("fixedWidth")] && Components2.Layout.slideSize(0); var fixedCount = fixedSize && ceil(rect(Elements2.track)[resolve("width")] / fixedSize); clones2 = fixedCount || options[resolve("autoWidth")] && Splide22.length || options.perPage * MULTIPLIER; } return clones2; } return { mount, destroy }; } function Move(Splide22, Components2, options) { var _EventInterface4 = EventInterface(Splide22), on = _EventInterface4.on, emit = _EventInterface4.emit; var set = Splide22.state.set; var _Components2$Layout = Components2.Layout, slideSize = _Components2$Layout.slideSize, getPadding = _Components2$Layout.getPadding, totalSize = _Components2$Layout.totalSize, listSize = _Components2$Layout.listSize, sliderSize = _Components2$Layout.sliderSize; var _Components2$Directio = Components2.Direction, resolve = _Components2$Directio.resolve, orient = _Components2$Directio.orient; var _Components2$Elements3 = Components2.Elements, list = _Components2$Elements3.list, track = _Components2$Elements3.track; var Transition; function mount() { Transition = Components2.Transition; on([EVENT_MOUNTED, EVENT_RESIZED, EVENT_UPDATED, EVENT_REFRESH], reposition); } function reposition() { if (!Components2.Controller.isBusy()) { Components2.Scroll.cancel(); jump(Splide22.index); Components2.Slides.update(); } } function move(dest, index, prev, callback) { if (dest !== index && canShift(dest > prev)) { cancel(); translate(shift(getPosition(), dest > prev), true); } set(MOVING); emit(EVENT_MOVE, index, prev, dest); Transition.start(index, function() { set(IDLE); emit(EVENT_MOVED, index, prev, dest); callback && callback(); }); } function jump(index) { translate(toPosition(index, true)); } function translate(position, preventLoop) { if (!Splide22.is(FADE)) { var destination = preventLoop ? position : loop(position); style(list, "transform", "translate" + resolve("X") + "(" + destination + "px)"); position !== destination && emit(EVENT_SHIFTED); } } function loop(position) { if (Splide22.is(LOOP)) { var index = toIndex(position); var exceededMax = index > Components2.Controller.getEnd(); var exceededMin = index < 0; if (exceededMin || exceededMax) { position = shift(position, exceededMax); } } return position; } function shift(position, backwards) { var excess = position - getLimit(backwards); var size = sliderSize(); position -= orient(size * (ceil(abs(excess) / size) || 1)) * (backwards ? 1 : -1); return position; } function cancel() { translate(getPosition(), true); Transition.cancel(); } function toIndex(position) { var Slides2 = Components2.Slides.get(); var index = 0; var minDistance = Infinity; for (var i = 0; i < Slides2.length; i++) { var slideIndex = Slides2[i].index; var distance = abs(toPosition(slideIndex, true) - position); if (distance <= minDistance) { minDistance = distance; index = slideIndex; } else { break; } } return index; } function toPosition(index, trimming) { var position = orient(totalSize(index - 1) - offset(index)); return trimming ? trim(position) : position; } function getPosition() { var left = resolve("left"); return rect(list)[left] - rect(track)[left] + orient(getPadding(false)); } function trim(position) { if (options.trimSpace && Splide22.is(SLIDE)) { position = clamp(position, 0, orient(sliderSize(true) - listSize())); } return position; } function offset(index) { var focus2 = options.focus; return focus2 === "center" ? (listSize() - slideSize(index, true)) / 2 : +focus2 * slideSize(index) || 0; } function getLimit(max2) { return toPosition(max2 ? Components2.Controller.getEnd() : 0, !!options.trimSpace); } function canShift(backwards) { var shifted = orient(shift(getPosition(), backwards)); return backwards ? shifted >= 0 : shifted <= list[resolve("scrollWidth")] - rect(track)[resolve("width")]; } function exceededLimit(max2, position) { position = isUndefined(position) ? getPosition() : position; var exceededMin = max2 !== true && orient(position) < orient(getLimit(false)); var exceededMax = max2 !== false && orient(position) > orient(getLimit(true)); return exceededMin || exceededMax; } return { mount, move, jump, translate, shift, cancel, toIndex, toPosition, getPosition, getLimit, exceededLimit, reposition }; } function Controller(Splide22, Components2, options) { var _EventInterface5 = EventInterface(Splide22), on = _EventInterface5.on, emit = _EventInterface5.emit; var Move2 = Components2.Move; var getPosition = Move2.getPosition, getLimit = Move2.getLimit, toPosition = Move2.toPosition; var _Components2$Slides = Components2.Slides, isEnough = _Components2$Slides.isEnough, getLength = _Components2$Slides.getLength; var omitEnd = options.omitEnd; var isLoop = Splide22.is(LOOP); var isSlide = Splide22.is(SLIDE); var getNext = apply(getAdjacent, false); var getPrev = apply(getAdjacent, true); var currIndex = options.start || 0; var endIndex; var prevIndex = currIndex; var slideCount; var perMove; var perPage; function mount() { init(); on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], init); on(EVENT_RESIZED, onResized); } function init() { slideCount = getLength(true); perMove = options.perMove; perPage = options.perPage; endIndex = getEnd(); var index = clamp(currIndex, 0, omitEnd ? endIndex : slideCount - 1); if (index !== currIndex) { currIndex = index; Move2.reposition(); } } function onResized() { if (endIndex !== getEnd()) { emit(EVENT_END_INDEX_CHANGED); } } function go(control, allowSameIndex, callback) { if (!isBusy()) { var dest = parse(control); var index = loop(dest); if (index > -1 && (allowSameIndex || index !== currIndex)) { setIndex(index); Move2.move(dest, index, prevIndex, callback); } } } function scroll(destination, duration, snap, callback) { Components2.Scroll.scroll(destination, duration, snap, function() { var index = loop(Move2.toIndex(getPosition())); setIndex(omitEnd ? min(index, endIndex) : index); callback && callback(); }); } function parse(control) { var index = currIndex; if (isString(control)) { var _ref = control.match(/([+\-<>])(\d+)?/) || [], indicator = _ref[1], number = _ref[2]; if (indicator === "+" || indicator === "-") { index = computeDestIndex(currIndex + +("" + indicator + (+number || 1)), currIndex); } else if (indicator === ">") { index = number ? toIndex(+number) : getNext(true); } else if (indicator === "<") { index = getPrev(true); } } else { index = isLoop ? control : clamp(control, 0, endIndex); } return index; } function getAdjacent(prev, destination) { var number = perMove || (hasFocus() ? 1 : perPage); var dest = computeDestIndex(currIndex + number * (prev ? -1 : 1), currIndex, !(perMove || hasFocus())); if (dest === -1 && isSlide) { if (!approximatelyEqual(getPosition(), getLimit(!prev), 1)) { return prev ? 0 : endIndex; } } return destination ? dest : loop(dest); } function computeDestIndex(dest, from, snapPage) { if (isEnough() || hasFocus()) { var index = computeMovableDestIndex(dest); if (index !== dest) { from = dest; dest = index; snapPage = false; } if (dest < 0 || dest > endIndex) { if (!perMove && (between(0, dest, from, true) || between(endIndex, from, dest, true))) { dest = toIndex(toPage(dest)); } else { if (isLoop) { dest = snapPage ? dest < 0 ? -(slideCount % perPage || perPage) : slideCount : dest; } else if (options.rewind) { dest = dest < 0 ? endIndex : 0; } else { dest = -1; } } } else { if (snapPage && dest !== from) { dest = toIndex(toPage(from) + (dest < from ? -1 : 1)); } } } else { dest = -1; } return dest; } function computeMovableDestIndex(dest) { if (isSlide && options.trimSpace === "move" && dest !== currIndex) { var position = getPosition(); while (position === toPosition(dest, true) && between(dest, 0, Splide22.length - 1, !options.rewind)) { dest < currIndex ? --dest : ++dest; } } return dest; } function loop(index) { return isLoop ? (index + slideCount) % slideCount || 0 : index; } function getEnd() { var end = slideCount - (hasFocus() || isLoop && perMove ? 1 : perPage); while (omitEnd && end-- > 0) { if (toPosition(slideCount - 1, true) !== toPosition(end, true)) { end++; break; } } return clamp(end, 0, slideCount - 1); } function toIndex(page) { return clamp(hasFocus() ? page : perPage * page, 0, endIndex); } function toPage(index) { return hasFocus() ? min(index, endIndex) : floor((index >= endIndex ? slideCount - 1 : index) / perPage); } function toDest(destination) { var closest2 = Move2.toIndex(destination); return isSlide ? clamp(closest2, 0, endIndex) : closest2; } function setIndex(index) { if (index !== currIndex) { prevIndex = currIndex; currIndex = index; } } function getIndex(prev) { return prev ? prevIndex : currIndex; } function hasFocus() { return !isUndefined(options.focus) || options.isNavigation; } function isBusy() { return Splide22.state.is([MOVING, SCROLLING]) && !!options.waitForTransition; } return { mount, go, scroll, getNext, getPrev, getAdjacent, getEnd, setIndex, getIndex, toIndex, toPage, toDest, hasFocus, isBusy }; } var XML_NAME_SPACE = "http://www.w3.org/2000/svg"; var PATH = "m15.5 0.932-4.3 4.38 14.5 14.6-14.5 14.5 4.3 4.4 14.6-14.6 4.4-4.3-4.4-4.4-14.6-14.6z"; var SIZE = 40; function Arrows(Splide22, Components2, options) { var event = EventInterface(Splide22); var on = event.on, bind = event.bind, emit = event.emit; var classes = options.classes, i18n = options.i18n; var Elements2 = Components2.Elements, Controller2 = Components2.Controller; var placeholder = Elements2.arrows, track = Elements2.track; var wrapper = placeholder; var prev = Elements2.prev; var next = Elements2.next; var created; var wrapperClasses; var arrows = {}; function mount() { init(); on(EVENT_UPDATED, remount); } function remount() { destroy(); mount(); } function init() { var enabled = options.arrows; if (enabled && !(prev && next)) { createArrows(); } if (prev && next) { assign(arrows, { prev, next }); display(wrapper, enabled ? "" : "none"); addClass(wrapper, wrapperClasses = CLASS_ARROWS + "--" + options.direction); if (enabled) { listen(); update(); setAttribute([prev, next], ARIA_CONTROLS, track.id); emit(EVENT_ARROWS_MOUNTED, prev, next); } } } function destroy() { event.destroy(); removeClass(wrapper, wrapperClasses); if (created) { remove(placeholder ? [prev, next] : wrapper); prev = next = null; } else { removeAttribute([prev, next], ALL_ATTRIBUTES); } } function listen() { on([EVENT_MOUNTED, EVENT_MOVED, EVENT_REFRESH, EVENT_SCROLLED, EVENT_END_INDEX_CHANGED], update); bind(next, "click", apply(go, ">")); bind(prev, "click", apply(go, "<")); } function go(control) { Controller2.go(control, true); } function createArrows() { wrapper = placeholder || create("div", classes.arrows); prev = createArrow(true); next = createArrow(false); created = true; append(wrapper, [prev, next]); !placeholder && before(wrapper, track); } function createArrow(prev2) { var arrow = '<button class="' + classes.arrow + " " + (prev2 ? classes.prev : classes.next) + '" type="button"><svg xmlns="' + XML_NAME_SPACE + '" viewBox="0 0 ' + SIZE + " " + SIZE + '" width="' + SIZE + '" height="' + SIZE + '" focusable="false"><path d="' + (options.arrowPath || PATH) + '" />'; return parseHtml(arrow); } function update() { if (prev && next) { var index = Splide22.index; var prevIndex = Controller2.getPrev(); var nextIndex = Controller2.getNext(); var prevLabel = prevIndex > -1 && index < prevIndex ? i18n.last : i18n.prev; var nextLabel = nextIndex > -1 && index > nextIndex ? i18n.first : i18n.next; prev.disabled = prevIndex < 0; next.disabled = nextIndex < 0; setAttribute(prev, ARIA_LABEL, prevLabel); setAttribute(next, ARIA_LABEL, nextLabel); emit(EVENT_ARROWS_UPDATED, prev, next, prevIndex, nextIndex); } } return { arrows, mount, destroy, update }; } var INTERVAL_DATA_ATTRIBUTE = DATA_ATTRIBUTE + "-interval"; function Autoplay(Splide22, Components2, options) { var _EventInterface6 = EventInterface(Splide22), on = _EventInterface6.on, bind = _EventInterface6.bind, emit = _EventInterface6.emit; var interval = RequestInterval(options.interval, Splide22.go.bind(Splide22, ">"), onAnimationFrame); var isPaused = interval.isPaused; var Elements2 = Components2.Elements, _Components2$Elements4 = Components2.Elements, root = _Components2$Elements4.root, toggle = _Components2$Elements4.toggle; var autoplay = options.autoplay; var hovered; var focused; var stopped = autoplay === "pause"; function mount() { if (autoplay) { listen(); toggle && setAttribute(toggle, ARIA_CONTROLS, Elements2.track.id); stopped || play(); update(); } } function listen() { if (options.pauseOnHover) { bind(root, "mouseenter mouseleave", function(e) { hovered = e.type === "mouseenter"; autoToggle(); }); } if (options.pauseOnFocus) { bind(root, "focusin focusout", function(e) { focused = e.type === "focusin"; autoToggle(); }); } if (toggle) { bind(toggle, "click", function() { stopped ? play() : pause(true); }); } on([EVENT_MOVE, EVENT_SCROLL, EVENT_REFRESH], interval.rewind); on(EVENT_MOVE, onMove); } function play() { if (isPaused() && Components2.Slides.isEnough()) { interval.start(!options.resetProgress); focused = hovered = stopped = false; update(); emit(EVENT_AUTOPLAY_PLAY); } } function pause(stop) { if (stop === void 0) { stop = true; } stopped = !!stop; update(); if (!isPaused()) { interval.pause(); emit(EVENT_AUTOPLAY_PAUSE); } } function autoToggle() { if (!stopped) { hovered || focused ? pause(false) : play(); } } function update() { if (toggle) { toggleClass(toggle, CLASS_ACTIVE, !stopped); setAttribute(toggle, ARIA_LABEL, options.i18n[stopped ? "play" : "pause"]); } } function onAnimationFrame(rate) { var bar = Elements2.bar; bar && style(bar, "width", rate * 100 + "%"); emit(EVENT_AUTOPLAY_PLAYING, rate); } function onMove(index) { var Slide2 = Components2.Slides.getAt(index); interval.set(Slide2 && +getAttribute(Slide2.slide, INTERVAL_DATA_ATTRIBUTE) || options.interval); } return { mount, destroy: interval.cancel, play, pause, isPaused }; } function Cover(Splide22, Components2, options) { var _EventInterface7 = EventInterface(Splide22), on = _EventInterface7.on; function mount() { if (options.cover) { on(EVENT_LAZYLOAD_LOADED, apply(toggle, true)); on([EVENT_MOUNTED, EVENT_UPDATED, EVENT_REFRESH], apply(cover, true)); } } function cover(cover2) { Components2.Slides.forEach(function(Slide2) { var img = child(Slide2.container || Slide2.slide, "img"); if (img && img.src) { toggle(cover2, img, Slide2); } }); } function toggle(cover2, img, Slide2) { Slide2.style("background", cover2 ? 'center/cover no-repeat url("' + img.src + '")' : "", true); display(img, cover2 ? "none" : ""); } return { mount, destroy: apply(cover, false) }; } var BOUNCE_DIFF_THRESHOLD = 10; var BOUNCE_DURATION = 600; var FRICTION_FACTOR = 0.6; var BASE_VELOCITY = 1.5; var MIN_DURATION = 800; function Scroll(Splide22, Components2, options) { var _EventInterface8 = EventInterface(Splide22), on = _EventInterface8.on, emit = _EventInterface8.emit; var set = Splide22.state.set; var Move2 = Components2.Move; var getPosition = Move2.getPosition, getLimit = Move2.getLimit, exceededLimit = Move2.exceededLimit, translate = Move2.translate; var isSlide = Splide22.is(SLIDE); var interval; var callback; var friction = 1; function mount() { on(EVENT_MOVE, clear); on([EVENT_UPDATED, EVENT_REFRESH], cancel); } function scroll(destination, duration, snap, onScrolled, noConstrain) { var from = getPosition(); clear(); if (snap && (!isSlide || !exceededLimit())) { var size = Components2.Layout.sliderSize(); var offset = sign(destination) * size * floor(abs(destination) / size) || 0; destination = Move2.toPosition(Components2.Controller.toDest(destination % size)) + offset; } var noDistance = approximatelyEqual(from, destination, 1); friction = 1; duration = noDistance ? 0 : duration || max(abs(destination - from) / BASE_VELOCITY, MIN_DURATION); callback = onScrolled; interval = RequestInterval(duration, onEnd, apply(update, from, destination, noConstrain), 1); set(SCROLLING); emit(EVENT_SCROLL); interval.start(); } function onEnd() { set(IDLE); callback && callback(); emit(EVENT_SCROLLED); } function update(from, to, noConstrain, rate) { var position = getPosition(); var target = from + (to - from) * easing(rate); var diff = (target - position) * friction; translate(position + diff); if (isSlide && !noConstrain && exceededLimit()) { friction *= FRICTION_FACTOR; if (abs(diff) < BOUNCE_DIFF_THRESHOLD) { scroll(getLimit(exceededLimit(true)), BOUNCE_DURATION, false, callback, true); } } } function clear() { if (interval) { interval.cancel(); } } function cancel() { if (interval && !interval.isPaused()) { clear(); onEnd(); } } function easing(t) { var easingFunc = options.easingFunc; return easingFunc ? easingFunc(t) : 1 - Math.pow(1 - t, 4); } return { mount, destroy: clear, scroll, cancel }; } var SCROLL_LISTENER_OPTIONS = { passive: false, capture: true }; function Drag(Splide22, Components2, options) { var _EventInterface9 = EventInterface(Splide22), on = _EventInterface9.on, emit = _EventInterface9.emit, bind = _EventInterface9.bind, unbind = _EventInterface9.unbind; var state = Splide22.state; var Move2 = Components2.Move, Scroll2 = Components2.Scroll, Controller2 = Components2.Controller, track = Components2.Elements.track, reduce = Components2.Media.reduce; var _Components2$Directio2 = Components2.Direction, resolve = _Components2$Directio2.resolve, orient = _Components2$Directio2.orient; var getPosition = Move2.getPosition, exceededLimit = Move2.exceededLimit; var basePosition; var baseEvent; var prevBaseEvent; var isFree; var dragging; var exceeded = false; var clickPrevented; var disabled; var target; function mount() { bind(track, POINTER_MOVE_EVENTS, noop, SCROLL_LISTENER_OPTIONS); bind(track, POINTER_UP_EVENTS, noop, SCROLL_LISTENER_OPTIONS); bind(track, POINTER_DOWN_EVENTS, onPointerDown, SCROLL_LISTENER_OPTIONS); bind(track, "click", onClick, { capture: true }); bind(track, "dragstart", prevent); on([EVENT_MOUNTED, EVENT_UPDATED], init); } function init() { var drag = options.drag; disable(!drag); isFree = drag === "free"; } function onPointerDown(e) { clickPrevented = false; if (!disabled) { var isTouch = isTouchEvent(e); if (isDraggable(e.target) && (isTouch || !e.button)) { if (!Controller2.isBusy()) { target = isTouch ? track : window; dragging = state.is([MOVING, SCROLLING]); prevBaseEvent = null; bind(target, POINTER_MOVE_EVENTS, onPointerMove, SCROLL_LISTENER_OPTIONS); bind(target, POINTER_UP_EVENTS, onPointerUp, SCROLL_LISTENER_OPTIONS); Move2.cancel(); Scroll2.cancel(); save(e); } else { prevent(e, true); } } } } function onPointerMove(e) { if (!state.is(DRAGGING)) { state.set(DRAGGING); emit(EVENT_DRAG); } if (e.cancelable) { if (dragging) { Move2.translate(basePosition + constrain(diffCoord(e))); var expired = diffTime(e) > LOG_INTERVAL; var hasExceeded = exceeded !== (exceeded = exceededLimit()); if (expired || hasExceeded) { save(e); } clickPrevented = true; emit(EVENT_DRAGGING); prevent(e); } else if (isSliderDirection(e)) { dragging = shouldStart(e); prevent(e); } } } function onPointerUp(e) { if (state.is(DRAGGING)) { state.set(IDLE); emit(EVENT_DRAGGED); } if (dragging) { move(e); prevent(e); } unbind(target, POINTER_MOVE_EVENTS, onPointerMove); unbind(target, POINTER_UP_EVENTS, onPointerUp); dragging = false; } function onClick(e) { if (!disabled && clickPrevented) { prevent(e, true); } } function save(e) { prevBaseEvent = baseEvent; baseEvent = e; basePosition = getPosition(); } function move(e) { var velocity = computeVelocity(e); var destination = computeDestination(velocity); var rewind = options.rewind && options.rewindByDrag; reduce(false); if (isFree) { Controller2.scroll(destination, 0, options.snap); } else if (Splide22.is(FADE)) { Controller2.go(orient(sign(velocity)) < 0 ? rewind ? "<" : "-" : rewind ? ">" : "+"); } else if (Splide22.is(SLIDE) && exceeded && rewind) { Controller2.go(exceededLimit(true) ? ">" : "<"); } else { Controller2.go(Controller2.toDest(destination), true); } reduce(true); } function shouldStart(e) { var thresholds = options.dragMinThreshold; var isObj = isObject(thresholds); var mouse = isObj && thresholds.mouse || 0; var touch = (isObj ? thresholds.touch : +thresholds) || 10; return abs(diffCoord(e)) > (isTouchEvent(e) ? touch : mouse); } function isSliderDirection(e) { return abs(diffCoord(e)) > abs(diffCoord(e, true)); } function computeVelocity(e) { if (Splide22.is(LOOP) || !exceeded) { var time = diffTime(e); if (time && time < LOG_INTERVAL) { return diffCoord(e) / time; } } return 0; } function computeDestination(velocity) { return getPosition() + sign(velocity) * min(abs(velocity) * (options.flickPower || 600), isFree ? Infinity : Components2.Layout.listSize() * (options.flickMaxPages || 1)); } function diffCoord(e, orthogonal) { return coordOf(e, orthogonal) - coordOf(getBaseEvent(e), orthogonal); } function diffTime(e) { return timeOf(e) - timeOf(getBaseEvent(e)); } function getBaseEvent(e) { return baseEvent === e && prevBaseEvent || baseEvent; } function coordOf(e, orthogonal) { return (isTouchEvent(e) ? e.changedTouches[0] : e)["page" + resolve(orthogonal ? "Y" : "X")]; } function constrain(diff) { return diff / (exceeded && Splide22.is(SLIDE) ? FRICTION : 1); } function isDraggable(target2) { var noDrag = options.noDrag; return !matches(target2, "." + CLASS_PAGINATION_PAGE + ", ." + CLASS_ARROW) && (!noDrag || !matches(target2, noDrag)); } function isTouchEvent(e) { return typeof TouchEvent !== "undefined" && e instanceof TouchEvent; } function isDragging() { return dragging; } function disable(value) { disabled = value; } return { mount, disable, isDragging }; } var NORMALIZATION_MAP = { Spacebar: " ", Right: ARROW_RIGHT, Left: ARROW_LEFT, Up: ARROW_UP, Down: ARROW_DOWN }; function normalizeKey(key) { key = isString(key) ? key : key.key; return NORMALIZATION_MAP[key] || key; } var KEYBOARD_EVENT = "keydown"; function Keyboard(Splide22, Components2, options) { var _EventInterface10 = EventInterface(Splide22), on = _EventInterface10.on, bind = _EventInterface10.bind, unbind = _EventInterface10.unbind; var root = Splide22.root; var resolve = Components2.Direction.resolve; var target; var disabled; function mount() { init(); on(EVENT_UPDATED, destroy); on(EVENT_UPDATED, init); on(EVENT_MOVE, onMove); } function init() { var keyboard = options.keyboard; if (keyboard) { target = keyboard === "global" ? window : root; bind(target, KEYBOARD_EVENT, onKeydown); } } function destroy() { unbind(target, KEYBOARD_EVENT); } function disable(value) { disabled = value; } function onMove() { var _disabled = disabled; disabled = true; nextTick(function() { disabled = _disabled; }); } function onKeydown(e) { if (!disabled) { var key = normalizeKey(e); if (key === resolve(ARROW_LEFT)) { Splide22.go("<"); } else if (key === resolve(ARROW_RIGHT)) { Splide22.go(">"); } } } return { mount, destroy, disable }; } var SRC_DATA_ATTRIBUTE = DATA_ATTRIBUTE + "-lazy"; var SRCSET_DATA_ATTRIBUTE = SRC_DATA_ATTRIBUTE + "-srcset"; var IMAGE_SELECTOR = "[" + SRC_DATA_ATTRIBUTE + "], [" + SRCSET_DATA_ATTRIBUTE + "]"; function LazyLoad(Splide22, Components2, options) { var _EventInterface11 = EventInterface(Splide22), on = _EventInterface11.on, off = _EventInterface11.off, bind = _EventInterface11.bind, emit = _EventInterface11.emit; var isSequential = options.lazyLoad === "sequential"; var events = [EVENT_MOVED, EVENT_SCROLLED]; var entries = []; function mount() { if (options.lazyLoad) { init(); on(EVENT_REFRESH, init); } } function init() { empty(entries); register(); if (isSequential) { loadNext(); } else { off(events); on(events, check); check(); } } function register() { Components2.Slides.forEach(function(Slide2) { queryAll(Slide2.slide, IMAGE_SELECTOR).forEach(function(img) { var src = getAttribute(img, SRC_DATA_ATTRIBUTE); var srcset = getAttribute(img, SRCSET_DATA_ATTRIBUTE); if (src !== img.src || srcset !== img.srcset) { var className = options.classes.spinner; var parent = img.parentElement; var spinner = child(parent, "." + className) || create("span", className, parent); entries.push([img, Slide2, spinner]); img.src || display(img, "none"); } }); }); } function check() { entries = entries.filter(function(data) { var distance = options.perPage * ((options.preloadPages || 1) + 1) - 1; return data[1].isWithin(Splide22.index, distance) ? load(data) : true; }); entries.length || off(events); } function load(data) { var img = data[0]; addClass(data[1].slide, CLASS_LOADING); bind(img, "load error", apply(onLoad, data)); setAttribute(img, "src", getAttribute(img, SRC_DATA_ATTRIBUTE)); setAttribute(img, "srcset", getAttribute(img, SRCSET_DATA_ATTRIBUTE)); removeAttribute(img, SRC_DATA_ATTRIBUTE); removeAttribute(img, SRCSET_DATA_ATTRIBUTE); } function onLoad(data, e) { var img = data[0], Slide2 = data[1]; removeClass(Slide2.slide, CLASS_LOADING); if (e.type !== "error") { remove(data[2]); display(img, ""); emit(EVENT_LAZYLOAD_LOADED, img, Slide2); emit(EVENT_RESIZE); } isSequential && loadNext(); } function loadNext() { entries.length && load(entries.shift()); } return { mount, destroy: apply(empty, entries), check }; } function Pagination(Splide22, Components2, options) { var event = EventInterface(Splide22); var on = event.on, emit = event.emit, bind = event.bind; var Slides2 = Components2.Slides, Elements2 = Components2.Elements, Controller2 = Components2.Controller; var hasFocus = Controller2.hasFocus, getIndex = Controller2.getIndex, go = Controller2.go; var resolve = Components2.Direction.resolve; var placeholder = Elements2.pagination; var items = []; var list; var paginationClasses; function mount() { destroy(); on([EVENT_UPDATED, EVENT_REFRESH, EVENT_END_INDEX_CHANGED], mount); var enabled = options.pagination; placeholder && display(placeholder, enabled ? "" : "none"); if (enabled) { on([EVENT_MOVE, EVENT_SCROLL, EVENT_SCROLLED], update); createPagination(); update(); emit(EVENT_PAGINATION_MOUNTED, { list, items }, getAt(Splide22.index)); } } function destroy() { if (list) { remove(placeholder ? slice(list.children) : list); removeClass(list, paginationClasses); empty(items); list = null; } event.destroy(); } function createPagination() { var length = Splide22.length; var classes = options.classes, i18n = options.i18n, perPage = options.perPage; var max2 = hasFocus() ? Controller2.getEnd() + 1 : ceil(length / perPage); list = placeholder || create("ul", classes.pagination, Elements2.track.parentElement); addClass(list, paginationClasses = CLASS_PAGINATION + "--" + getDirection()); setAttribute(list, ROLE, "tablist"); setAttribute(list, ARIA_LABEL, i18n.select); setAttribute(list, ARIA_ORIENTATION, getDirection() === TTB ? "vertical" : ""); for (var i = 0; i < max2; i++) { var li = create("li", null, list); var button = create("button", { class: classes.page, type: "button" }, li); var controls = Slides2.getIn(i).map(function(Slide2) { return Slide2.slide.id; }); var text = !hasFocus() && perPage > 1 ? i18n.pageX : i18n.slideX; bind(button, "click", apply(onClick, i)); if (options.paginationKeyboard) { bind(button, "keydown", apply(onKeydown, i)); } setAttribute(li, ROLE, "presentation"); setAttribute(button, ROLE, "tab"); setAttribute(button, ARIA_CONTROLS, controls.join(" ")); setAttribute(button, ARIA_LABEL, format(text, i + 1)); setAttribute(button, TAB_INDEX, -1); items.push({ li, button, page: i }); } } function onClick(page) { go(">" + page, true); } function onKeydown(page, e) { var length = items.length; var key = normalizeKey(e); var dir = getDirection(); var nextPage = -1; if (key === resolve(ARROW_RIGHT, false, dir)) { nextPage = ++page % length; } else if (key === resolve(ARROW_LEFT, false, dir)) { nextPage = (--page + length) % length; } else if (key === "Home") { nextPage = 0; } else if (key === "End") { nextPage = length - 1; } var item = items[nextPage]; if (item) { focus(item.button); go(">" + nextPage); prevent(e, true); } } function getDirection() { return options.paginationDirection || options.direction; } function getAt(index) { return items[Controller2.toPage(index)]; } function update() { var prev = getAt(getIndex(true)); var curr = getAt(getIndex()); if (prev) { var button = prev.button; removeClass(button, CLASS_ACTIVE); removeAttribute(button, ARIA_SELECTED); setAttribute(button, TAB_INDEX, -1); } if (curr) { var _button = curr.button; addClass(_button, CLASS_ACTIVE); setAttribute(_button, ARIA_SELECTED, true); setAttribute(_button, TAB_INDEX, ""); } emit(EVENT_PAGINATION_UPDATED, { list, items }, prev, curr); } return { items, mount, destroy, getAt, update }; } var TRIGGER_KEYS = [" ", "Enter"]; function Sync(Splide22, Components2, options) { var isNavigation = options.isNavigation, slideFocus = options.slideFocus; var events = []; function mount() { Splide22.splides.forEach(function(target) { if (!target.isParent) { sync(Splide22, target.splide); sync(target.splide, Splide22); } }); if (isNavigation) { navigate(); } } function destroy() { events.forEach(function(event) { event.destroy(); }); empty(events); } function remount() { destroy(); mount(); } function sync(splide, target) { var event = EventInterface(splide); event.on(EVENT_MOVE, function(index, prev, dest) { target.go(target.is(LOOP) ? dest : index); }); events.push(event); } function navigate() { var event = EventInterface(Splide22); var on = event.on; on(EVENT_CLICK, onClick); on(EVENT_SLIDE_KEYDOWN, onKeydown); on([EVENT_MOUNTED, EVENT_UPDATED], update); events.push(event); event.emit(EVENT_NAVIGATION_MOUNTED, Splide22.splides); } function update() { setAttribute(Components2.Elements.list, ARIA_ORIENTATION, options.direction === TTB ? "vertical" : ""); } function onClick(Slide2) { Splide22.go(Slide2.index); } function onKeydown(Slide2, e) { if (includes(TRIGGER_KEYS, normalizeKey(e))) { onClick(Slide2); prevent(e); } } return { setup: apply(Components2.Media.set, { slideFocus: isUndefined(slideFocus) ? isNavigation : slideFocus }, true), mount, destroy, remount }; } function Wheel(Splide22, Components2, options) { var _EventInterface12 = EventInterface(Splide22), bind = _EventInterface12.bind; var lastTime = 0; function mount() { if (options.wheel) { bind(Components2.Elements.track, "wheel", onWheel, SCROLL_LISTENER_OPTIONS); } } function onWheel(e) { if (e.cancelable) { var deltaY = e.deltaY; var backwards = deltaY < 0; var timeStamp = timeOf(e); var _min = options.wheelMinThreshold || 0; var sleep = options.wheelSleep || 0; if (abs(deltaY) > _min && timeStamp - lastTime > sleep) { Splide22.go(backwards ? "<" : ">"); lastTime = timeStamp; } shouldPrevent(backwards) && prevent(e); } } function shouldPrevent(backwards) { return !options.releaseWheel || Splide22.state.is(MOVING) || Components2.Controller.getAdjacent(backwards) !== -1; } return { mount }; } var SR_REMOVAL_DELAY = 90; function Live(Splide22, Components2, options) { var _EventInterface13 = EventInterface(Splide22), on = _EventInterface13.on; var track = Components2.Elements.track; var enabled = options.live && !options.isNavigation; var sr = create("span", CLASS_SR); var interval = RequestInterval(SR_REMOVAL_DELAY, apply(toggle, false)); function mount() { if (enabled) { disable(!Components2.Autoplay.isPaused()); setAttribute(track, ARIA_ATOMIC, true); sr.textContent = "\u2026"; on(EVENT_AUTOPLAY_PLAY, apply(disable, true)); on(EVENT_AUTOPLAY_PAUSE, apply(disable, false)); on([EVENT_MOVED, EVENT_SCROLLED], apply(toggle, true)); } } function toggle(active) { setAttribute(track, ARIA_BUSY, active); if (active) { append(track, sr); interval.start(); } else { remove(sr); interval.cancel(); } } function destroy() { removeAttribute(track, [ARIA_LIVE, ARIA_ATOMIC, ARIA_BUSY]); remove(sr); } function disable(disabled) { if (enabled) { setAttribute(track, ARIA_LIVE, disabled ? "off" : "polite"); } } return { mount, disable, destroy }; } var ComponentConstructors = /* @__PURE__ */ Object.freeze({ __proto__: null, Media, Direction, Elements, Slides, Layout, Clones, Move, Controller, Arrows, Autoplay, Cover, Scroll, Drag, Keyboard, LazyLoad, Pagination, Sync, Wheel, Live }); var I18N = { prev: "Previous slide", next: "Next slide", first: "Go to first slide", last: "Go to last slide", slideX: "Go to slide %s", pageX: "Go to page %s", play: "Start autoplay", pause: "Pause autoplay", carousel: "carousel", slide: "slide", select: "Select a slide to show", slideLabel: "%s of %s" }; var DEFAULTS = { type: "slide", role: "region", speed: 400, perPage: 1, cloneStatus: true, arrows: true, pagination: true, paginationKeyboard: true, interval: 5e3, pauseOnHover: true, pauseOnFocus: true, resetProgress: true, easing: "cubic-bezier(0.25, 1, 0.5, 1)", drag: true, direction: "ltr", trimSpace: true, focusableNodes: "a, button, textarea, input, select, iframe", live: true, classes: CLASSES, i18n: I18N, reducedMotion: { speed: 0, rewindSpeed: 0, autoplay: "pause" } }; function Fade(Splide22, Components2, options) { var Slides2 = Components2.Slides; function mount() { EventInterface(Splide22).on([EVENT_MOUNTED, EVENT_REFRESH], init); } function init() { Slides2.forEach(function(Slide2) { Slide2.style("transform", "translateX(-" + 100 * Slide2.index + "%)"); }); } function start(index, done) { Slides2.style("transition", "opacity " + options.speed + "ms " + options.easing); nextTick(done); } return { mount, start, cancel: noop }; } function Slide(Splide22, Components2, options) { var Move2 = Components2.Move, Controller2 = Components2.Controller, Scroll2 = Components2.Scroll; var list = Components2.Elements.list; var transition = apply(style, list, "transition"); var endCallback; function mount() { EventInterface(Splide22).bind(list, "transitionend", function(e) { if (e.target === list && endCallback) { cancel(); endCallback(); } }); } function start(index, done) { var destination = Move2.toPosition(index, true); var position = Move2.getPosition(); var speed = getSpeed(index); if (abs(destination - position) >= 1 && speed >= 1) { if (options.useScroll) { Scroll2.scroll(destination, speed, false, done); } else { transition("transform " + speed + "ms " + options.easing); Move2.translate(destination, true); endCallback = done; } } else { Move2.jump(index); done(); } } function cancel() { transition(""); Scroll2.cancel(); } function getSpeed(index) { var rewindSpeed = options.rewindSpeed; if (Splide22.is(SLIDE) && rewindSpeed) { var prev = Controller2.getIndex(true); var end = Controller2.getEnd(); if (prev === 0 && index >= end || prev >= end && index === 0) { return rewindSpeed; } } return options.speed; } return { mount, start, cancel }; } var _Splide = /* @__PURE__ */ function() { function _Splide2(target, options) { this.event = EventInterface(); this.Components = {}; this.state = State(CREATED); this.splides = []; this._o = {}; this._E = {}; var root = isString(target) ? query(document, target) : target; assert(root, root + " is invalid."); this.root = root; options = merge({ label: getAttribute(root, ARIA_LABEL) || "", labelledby: getAttribute(root, ARIA_LABELLEDBY) || "" }, DEFAULTS, _Splide2.defaults, options || {}); try { merge(options, JSON.parse(getAttribute(root, DATA_ATTRIBUTE))); } catch (e) { assert(false, "Invalid JSON"); } this._o = Object.create(merge({}, options)); } var _proto = _Splide2.prototype; _proto.mount = function mount(Extensions, Transition) { var _this = this; var state = this.state, Components2 = this.Components; assert(state.is([CREATED, DESTROYED]), "Already mounted!"); state.set(CREATED); this._C = Components2; this._T = Transition || this._T || (this.is(FADE) ? Fade : Slide); this._E = Extensions || this._E; var Constructors = assign({}, ComponentConstructors, this._E, { Transition: this._T }); forOwn(Constructors, function(Component, key) { var component = Component(_this, Components2, _this._o); Components2[key] = component; component.setup && component.setup(); }); forOwn(Components2, function(component) { component.mount && component.mount(); }); this.emit(EVENT_MOUNTED); addClass(this.root, CLASS_INITIALIZED); state.set(IDLE); this.emit(EVENT_READY); return this; }; _proto.sync = function sync(splide) { this.splides.push({ splide }); splide.splides.push({ splide: this, isParent: true }); if (this.state.is(IDLE)) { this._C.Sync.remount(); splide.Components.Sync.remount(); } return this; }; _proto.go = function go(control) { this._C.Controller.go(control); return this; }; _proto.on = function on(events, callback) { this.event.on(events, callback); return this; }; _proto.off = function off(events) { this.event.off(events); return this; }; _proto.emit = function emit(event) { var _this$event; (_this$event = this.event).emit.apply(_this$event, [event].concat(slice(arguments, 1))); return this; }; _proto.add = function add(slides, index) { this._C.Slides.add(slides, index); return this; }; _proto.remove = function remove2(matcher) { this._C.Slides.remove(matcher); return this; }; _proto.is = function is(type) { return this._o.type === type; }; _proto.refresh = function refresh() { this.emit(EVENT_REFRESH); return this; }; _proto.destroy = function destroy(completely) { if (completely === void 0) { completely = true; } var event = this.event, state = this.state; if (state.is(CREATED)) { EventInterface(this).on(EVENT_READY, this.destroy.bind(this, completely)); } else { forOwn(this._C, function(component) { component.destroy && component.destroy(completely); }, true); event.emit(EVENT_DESTROY); event.destroy(); completely && empty(this.splides); state.set(DESTROYED); } return this; }; _createClass(_Splide2, [{ key: "options", get: function get() { return this._o; }, set: function set(options) { this._C.Media.set(options, true, true); } }, { key: "length", get: function get() { return this._C.Slides.getLength(true); } }, { key: "index", get: function get() { return this._C.Controller.getIndex(); } }]); return _Splide2; }(); var Splide = _Splide; Splide.defaults = {}; Splide.STATES = STATES; // src/js/components/Splide/Splide.tsx // src/js/constants/events.ts var EVENTS = [ [EVENT_MOUNTED, "onMounted"], [EVENT_READY, "onReady"], [EVENT_MOVE, "onMove"], [EVENT_MOVED, "onMoved"], [EVENT_CLICK, "onClick"], [EVENT_ACTIVE, "onActive"], [EVENT_INACTIVE, "onInactive"], [EVENT_VISIBLE, "onVisible"], [EVENT_HIDDEN, "onHidden"], [EVENT_REFRESH, "onRefresh"], [EVENT_UPDATED, "onUpdated"], [EVENT_RESIZE, "onResize"], [EVENT_RESIZED, "onResized"], [EVENT_DRAG, "onDrag"], [EVENT_DRAGGING, "onDragging"], [EVENT_DRAGGED, "onDragged"], [EVENT_SCROLL, "onScroll"], [EVENT_SCROLLED, "onScrolled"], [EVENT_DESTROY, "onDestroy"], [EVENT_ARROWS_MOUNTED, "onArrowsMounted"], [EVENT_ARROWS_UPDATED, "onArrowsUpdated"], [EVENT_PAGINATION_MOUNTED, "onPaginationMounted"], [EVENT_PAGINATION_UPDATED, "onPaginationUpdated"], [EVENT_NAVIGATION_MOUNTED, "onNavigationMounted"], [EVENT_AUTOPLAY_PLAY, "onAutoplayPlay"], [EVENT_AUTOPLAY_PLAYING, "onAutoplayPlaying"], [EVENT_AUTOPLAY_PAUSE, "onAutoplayPause"], [EVENT_LAZYLOAD_LOADED, "onLazyLoadLoaded"] ]; // src/js/utils/classNames/classNames.ts function classNames(...classes) { return classes.filter(Boolean).join(" "); } // src/js/utils/isObject/isObject.ts function isObject2(subject) { return subject !== null && typeof subject === "object"; } // src/js/utils/isEqualDeep/isEqualDeep.ts function isEqualDeep(subject1, subject2) { if (Array.isArray(subject1) && Array.isArray(subject2)) { return subject1.length === subject2.length && !subject1.some((elm, index) => !isEqualDeep(elm, subject2[index])); } if (isObject2(subject1) && isObject2(subject2)) { const keys1 = Object.keys(subject1); const keys2 = Object.keys(subject2); return keys1.length === keys2.length && !keys1.some((key) => { return !Object.prototype.hasOwnProperty.call(subject2, key) || !isEqualDeep(subject1[key], subject2[key]); }); } return subject1 === subject2; } // src/js/utils/isEqualShallow/isEqualShallow.ts function isEqualShallow(array1, array2) { return array1.length === array2.length && !array1.some((elm, index) => elm !== array2[index]); } // src/js/utils/forOwn/forOwn.ts function forOwn2(object, iteratee) { if (object) { const keys = Object.keys(object); for (let i = 0; i < keys.length; i++) { const key = keys[i]; if (key !== "__proto__") { if (iteratee(object[key], key) === false) { break; } } } } return object; } // src/js/utils/merge/merge.ts function merge2(object, source) { const merged = object; forOwn2(source, (value, key) => { if (Array.isArray(value)) { merged[key] = value.slice(); } else if (isObject2(value)) { merged[key] = merge2(isObject2(merged[key]) ? merged[key] : {}, value); } else { merged[key] = value; } }); return merged; } // src/js/components/SplideTrack/SplideTrack.tsx var SplideTrack = ({ children: children2, className, ...props }) => { return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", { className: classNames("splide__track", className), ...props }, /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", { className: "splide__list" }, children2)); }; // src/js/components/Splide/Splide.tsx var Splide2 = class extends (react__WEBPACK_IMPORTED_MODULE_0___default().Component) { constructor() { super(...arguments); this.splideRef = react__WEBPACK_IMPORTED_MODULE_0___default().createRef(); this.slides = []; } componentDidMount() { const { options, extensions, transition } = this.props; const { current } = this.splideRef; if (current) { this.splide = new Splide(current, options); this.bind(this.splide); this.splide.mount(extensions, transition); this.options = merge2({}, options || {}); this.slides = this.getSlides(); } } componentWillUnmount() { if (this.splide) { this.splide.destroy(); this.splide = void 0; } this.options = void 0; this.slides.length = 0; } componentDidUpdate() { if (!this.splide) { return; } const { options } = this.props; if (options && !isEqualDeep(this.options, options)) { this.splide.options = options; this.options = merge2({}, options); } const newSlides = this.getSlides(); if (!isEqualShallow(this.slides, newSlides)) { this.splide.refresh(); this.slides = newSlides; } } sync(splide) { var _a; (_a = this.splide) == null ? void 0 : _a.sync(splide); } go(control) { var _a; (_a = this.splide) == null ? void 0 : _a.go(control); } getSlides() { var _a; if (this.splide) { const children2 = (_a = this.splide.Components.Elements) == null ? void 0 : _a.list.children; return children2 && Array.prototype.slice.call(children2) || []; } return []; } bind(splide) { EVENTS.forEach(([event, name]) => { const handler = this.props[name]; if (typeof handler === "function") { splide.on(event, (...args) => { handler(splide, ...args); }); } }); } omit(props, keys) { keys.forEach((key) => { if (Object.prototype.hasOwnProperty.call(props, key)) { delete props[key]; } }); return props; } render() { const { className, tag: Root = "div", hasTrack = true, children: children2, ...props } = this.props; return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Root, { className: classNames("splide", className), ref: this.splideRef, ...this.omit(props, ["options", ...EVENTS.map((event) => event[1])]) }, hasTrack ? /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0___default().createElement(SplideTrack, null, children2) : children2); } }; // src/js/components/SplideSlide/SplideSlide.tsx var SplideSlide = ({ children: children2, className, ...props }) => { return /* @__PURE__ */ react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", { className: classNames("splide__slide", className), ...props }, children2); }; /*! * Splide.js * Version : 4.1.3 * License : MIT * Copyright: 2022 Naotoshi Fujita */ /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/icon/index.js": /*!******************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/icon/index.js ***! \******************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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__); /** * WordPress dependencies */ /** @typedef {{icon: JSX.Element, size?: number} & import('@wordpress/primitives').SVGProps} IconProps */ /** * Return an SVG icon. * * @param {IconProps} props icon is the SVG component to render * size is a number specifiying the icon size in pixels * Other props will be passed to wrapped SVG component * @param {import('react').ForwardedRef<HTMLElement>} ref The forwarded ref to the SVG element. * * @return {JSX.Element} Icon component */ function Icon({ icon, size = 24, ...props }, ref) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.cloneElement)(icon, { width: size, height: size, ...props, ref }); } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(Icon)); //# sourceMappingURL=index.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/arrow-right.js": /*!***************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/arrow-right.js ***! \***************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const arrowRight = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "m14.5 6.5-1 1 3.7 3.7H4v1.6h13.2l-3.7 3.7 1 1 5.6-5.5z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (arrowRight); //# sourceMappingURL=arrow-right.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/brush.js": /*!*********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/brush.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const brush = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M4 20h8v-1.5H4V20zM18.9 3.5c-.6-.6-1.5-.6-2.1 0l-7.2 7.2c-.4-.1-.7 0-1.1.1-.5.2-1.5.7-1.9 2.2-.4 1.7-.8 2.2-1.1 2.7-.1.1-.2.3-.3.4l-.6 1.1H6c2 0 3.4-.4 4.7-1.4.8-.6 1.2-1.4 1.3-2.3 0-.3 0-.5-.1-.7L19 5.7c.5-.6.5-1.6-.1-2.2zM9.7 14.7c-.7.5-1.5.8-2.4 1 .2-.5.5-1.2.8-2.3.2-.6.4-1 .8-1.1.5-.1 1 .1 1.3.3.2.2.3.5.2.8 0 .3-.1.9-.7 1.3z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (brush); //# sourceMappingURL=brush.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/chevron-left.js": /*!****************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/chevron-left.js ***! \****************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const chevronLeft = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M14.6 7l-1.2-1L8 12l5.4 6 1.2-1-4.6-5z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chevronLeft); //# sourceMappingURL=chevron-left.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/chevron-right.js": /*!*****************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/chevron-right.js ***! \*****************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const chevronRight = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M10.6 6L9.4 7l4.6 5-4.6 5 1.2 1 5.4-6z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (chevronRight); //# sourceMappingURL=chevron-right.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/close.js": /*!*********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/close.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const close = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (close); //# sourceMappingURL=close.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/cloud.js": /*!*********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/cloud.js ***! \*********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const cloud = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M17.3 10.1c0-2.5-2.1-4.4-4.8-4.4-2.2 0-4.1 1.4-4.6 3.3h-.2C5.7 9 4 10.7 4 12.8c0 2.1 1.7 3.8 3.7 3.8h9c1.8 0 3.2-1.5 3.2-3.3.1-1.6-1.1-2.9-2.6-3.2zm-.5 5.1h-9c-1.2 0-2.2-1.1-2.2-2.3s1-2.4 2.2-2.4h1.3l.3-1.1c.4-1.3 1.7-2.2 3.2-2.2 1.8 0 3.3 1.3 3.3 2.9v1.3l1.3.2c.8.1 1.4.9 1.4 1.8-.1 1-.9 1.8-1.8 1.8z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (cloud); //# sourceMappingURL=cloud.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/download.js": /*!************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/download.js ***! \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const download = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M18 11.3l-1-1.1-4 4V3h-1.5v11.3L7 10.2l-1 1.1 6.2 5.8 5.8-5.8zm.5 3.7v3.5h-13V15H4v5h16v-5h-1.5z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (download); //# sourceMappingURL=download.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/edit.js": /*!********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/edit.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _pencil__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./pencil */ "./node_modules/@wordpress/icons/build-module/library/pencil.js"); /** * Internal dependencies */ /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (_pencil__WEBPACK_IMPORTED_MODULE_0__["default"]); //# sourceMappingURL=edit.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/link-off.js": /*!************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/link-off.js ***! \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const linkOff = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M17.031 4.703 15.576 4l-1.56 3H14v.03l-2.324 4.47H9.5V13h1.396l-1.502 2.889h-.95a3.694 3.694 0 0 1 0-7.389H10V7H8.444a5.194 5.194 0 1 0 0 10.389h.17L7.5 19.53l1.416.719L15.049 8.5h.507a3.694 3.694 0 0 1 0 7.39H14v1.5h1.556a5.194 5.194 0 0 0 .273-10.383l1.202-2.304Z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (linkOff); //# sourceMappingURL=link-off.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/link.js": /*!********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/link.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const link = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M10 17.389H8.444A5.194 5.194 0 1 1 8.444 7H10v1.5H8.444a3.694 3.694 0 0 0 0 7.389H10v1.5ZM14 7h1.556a5.194 5.194 0 0 1 0 10.39H14v-1.5h1.556a3.694 3.694 0 0 0 0-7.39H14V7Zm-4.5 6h5v-1.5h-5V13Z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (link); //# sourceMappingURL=link.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/list.js": /*!********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/list.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const list = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M4 4v1.5h16V4H4zm8 8.5h8V11h-8v1.5zM4 20h16v-1.5H4V20zm4-8c0-1.1-.9-2-2-2s-2 .9-2 2 .9 2 2 2 2-.9 2-2z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (list); //# sourceMappingURL=list.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js": /*!******************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/media-and-text.js ***! \******************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const mediaAndText = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M3 6v11.5h8V6H3Zm11 3h7V7.5h-7V9Zm7 3.5h-7V11h7v1.5ZM14 16h7v-1.5h-7V16Z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (mediaAndText); //# sourceMappingURL=media-and-text.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/menu.js": /*!********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/menu.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const menu = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M5 5v1.5h14V5H5zm0 7.8h14v-1.5H5v1.5zM5 19h14v-1.5H5V19z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (menu); //# sourceMappingURL=menu.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/pencil.js": /*!**********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/pencil.js ***! \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const pencil = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "m19 7-3-3-8.5 8.5-1 4 4-1L19 7Zm-7 11.5H5V20h7v-1.5Z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (pencil); //# sourceMappingURL=pencil.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/plus-circle.js": /*!***************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/plus-circle.js ***! \***************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const plusCircle = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "-2 -2 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6zM10 1c-5 0-9 4-9 9s4 9 9 9 9-4 9-9-4-9-9-9zm0 16c-3.9 0-7-3.1-7-7s3.1-7 7-7 7 3.1 7 7-3.1 7-7 7zm1-11H9v3H6v2h3v3h2v-3h3V9h-3V6z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plusCircle); //# sourceMappingURL=plus-circle.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/plus.js": /*!********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/plus.js ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const plus = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (plus); //# sourceMappingURL=plus.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/settings.js": /*!************************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/settings.js ***! \************************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const settings = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z" }), (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (settings); //# sourceMappingURL=settings.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/styles.js": /*!**********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/styles.js ***! \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ styles: () => (/* binding */ styles) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const styles = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { viewBox: "0 0 24 24", xmlns: "http://www.w3.org/2000/svg" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M12 4c-4.4 0-8 3.6-8 8v.1c0 4.1 3.2 7.5 7.2 7.9h.8c4.4 0 8-3.6 8-8s-3.6-8-8-8zm0 15V5c3.9 0 7 3.1 7 7s-3.1 7-7 7z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (styles); //# sourceMappingURL=styles.js.map /***/ }), /***/ "./node_modules/@wordpress/icons/build-module/library/upload.js": /*!**********************************************************************!*\ !*** ./node_modules/@wordpress/icons/build-module/library/upload.js ***! \**********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react"); /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/primitives */ "@wordpress/primitives"); /* harmony import */ var _wordpress_primitives__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__); /** * WordPress dependencies */ const upload = (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.SVG, { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24" }, (0,react__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_primitives__WEBPACK_IMPORTED_MODULE_1__.Path, { d: "M18.5 15v3.5H13V6.7l4.5 4.1 1-1.1-6.2-5.8-5.8 5.8 1 1.1 4-4v11.7h-6V15H4v5h16v-5z" })); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (upload); //# sourceMappingURL=upload.js.map /***/ }), /***/ "./src/blocks/accordion-nested-item/index.js": /*!***************************************************!*\ !*** ./src/blocks/accordion-nested-item/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./block.json */ "./src/blocks/accordion-nested-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_18__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "162", height: "160", viewBox: "0 0 162 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 27H1V45.8H161V27Z", fill: "url(#paint0_linear_61_765)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.6226 38.8999C18.4235 38.8999 18.3238 38.7998 18.2242 38.6998L14.9385 34.8999C14.7394 34.6999 14.7395 34.2998 15.0382 34.0998C15.2373 33.8998 15.6356 33.8998 15.8348 34.1998L18.722 37.5998L21.6095 34.1998C21.8087 33.9998 22.1072 33.8998 22.4059 34.0998C22.605 34.2998 22.7047 34.5999 22.5055 34.8999L19.2199 38.6998C18.9212 38.7998 18.8217 38.8999 18.6226 38.8999Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M105.443 33.8999H27.9819V38.7999H105.443V33.8999Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 71.3999H1V110.1H161V71.3999Z", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 49.2002H1V68.0002H161V49.2002Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.623 56.2002C18.8221 56.2002 18.9216 56.3003 19.0211 56.4003L22.3068 60.2002C22.5059 60.4002 22.5058 60.8002 22.2071 61.0002C22.008 61.2002 21.6097 61.2003 21.4106 60.9003L18.5233 57.5002L15.636 60.9003C15.4369 61.1003 15.1382 61.2002 14.8395 61.0002C14.5408 60.8002 14.5407 60.5002 14.7398 60.2002L18.0255 56.4003C18.3242 56.2003 18.4238 56.2002 18.623 56.2002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M105.443 56.2002H27.9819V61.1002H105.443V56.2002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 113.5H1V132.3H161V113.5Z", fill: "url(#paint1_linear_61_765)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.6226 125.4C18.4235 125.4 18.3238 125.3 18.2242 125.2L14.9385 121.4C14.7394 121.2 14.7395 120.8 15.0382 120.6C15.2373 120.4 15.6356 120.4 15.8348 120.7L18.722 124.1L21.6095 120.7C21.8087 120.5 22.1072 120.4 22.4059 120.6C22.605 120.8 22.7047 121.1 22.5055 121.4L19.2199 125.2C18.9212 125.3 18.8217 125.4 18.6226 125.4Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M105.443 120.4H27.9819V125.3H105.443V120.4Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_765", x1: "1", y1: "36.4", x2: "161", y2: "36.4", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_765", x1: "1", y1: "122.9", x2: "161", y2: "122.9", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var parentIcon = context["post-grid/accordionNestedIcon"] == undefined ? null : context["post-grid/accordionNestedIcon"]; var parentIconToggle = context["post-grid/accordionNestedIconToggle"] == undefined ? null : context["post-grid/accordionNestedIconToggle"]; var parentLabelIcon = context["post-grid/accordionNestedLabelIcon"] == undefined ? null : context["post-grid/accordionNestedLabelIcon"]; var parentLabelCounter = context["post-grid/accordionNestedLabelCounter"] == undefined ? null : context["post-grid/accordionNestedLabelCounter"]; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var header = attributes.header; var headerLabel = attributes.headerLabel; var labelCounter = attributes.labelCounter; var labelIcon = attributes.labelIcon; var content = attributes.content; var icon = attributes.icon; var iconToggle = attributes.iconToggle; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [toggled, setToggled] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const contentSelector = blockClass + "-accordion-content"; const headerSelector = blockClass + "-accordion-header"; const headerLabelSelector = blockClass + "-accordion-header-label"; const labelIconSelector = blockClass + "-accordion-label-icon"; const labelCounterSelector = blockClass + "-accordion-label-counter"; const iconSelector = blockClass + "-accordion-icon"; const iconToggleSelector = blockClass + "-accordion-icon-toggle"; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("isProFeature", true); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [iconToggleHtml, seticonToggleHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [labelIconHtml, setlabelIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); //Icon update from nested item (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span className="accordion-icon ${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon, icon.options.iconSrc]); // Icon update from parent (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentIcon.options.overrideChild == true) { var options = { ...parentIcon.options }; setAttributes({ icon: { ...icon, options: options } }); } }, [parentIcon]); //iconToggle update from nested item (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = iconToggle.options.iconSrc; var iconHtml = `<span className=" ${iconSrc}"></span>`; seticonToggleHtml(iconHtml); }, [iconToggle, iconToggle.options.iconSrc]); //iconToggle update from parent (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentIcon.options.overrideChild == true) { var iconSrc = parentIconToggle.options.iconSrc; setAttributes({ iconToggle: parentIconToggle }); var iconHtml = `<span class="${iconSrc}"></span>`; seticonToggleHtml(iconHtml); } }, [parentIconToggle]); //labelIcon update from nested item (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = labelIcon.options.iconSrc; var iconHtml = `<span className=" ${iconSrc}"></span>`; setlabelIconHtml(iconHtml); }, [labelIcon, labelIcon.options.iconSrc]); //labelIcon update from parent (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentLabelIcon.options.overrideChild == true) { setAttributes({ labelIcon: parentLabelIcon }); var iconSrc = parentLabelIcon.options.iconSrc; var iconHtml = `<span className=" ${iconSrc}"></span>`; setlabelIconHtml(iconHtml); } }, [parentLabelIcon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentLabelCounter.options.overrideChild == true) { setAttributes({ labelCounter: parentLabelCounter }); } }, [parentLabelCounter]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[contentSelector] = content; blockCssObj[headerSelector] = header; blockCssObj[headerLabelSelector] = headerLabel; blockCssObj[labelCounterSelector] = labelCounter; blockCssObj[labelIconSelector] = labelIcon; blockCssObj[iconSelector] = icon; blockCssObj[iconToggleSelector] = iconToggle; var blockCssRules = myStore.getBlockCssRules(blockCssObj); // console.log(blockCssRules); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); function onChangeStyleHeader(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, header); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeader(sudoScource, key) { var object = myStore.deletePropertyDeep(header, [sudoScource, key, breakPointX]); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeader(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, header); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ header: object }); } function onChangeStyleHeaderLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, headerLabel); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ headerLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeaderLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(headerLabel, [sudoScource, key, breakPointX]); setAttributes({ headerLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeaderLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, headerLabel); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ headerLabel: object }); } function onPickCssLibraryHeaderLabel(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; headerLabel[sudoScource] = sudoScourceArgs; }); var headerLabelX = Object.assign({}, headerLabel); setAttributes({ headerLabel: headerLabelX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleLabelCounter(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelCounter); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelCounter: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelCounter(sudoScource, key) { var object = myStore.deletePropertyDeep(labelCounter, [sudoScource, key, breakPointX]); setAttributes({ labelCounter: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelCounter(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelCounter); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelCounter: object }); } function onPickCssLibraryLabelCounter(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; labelCounter[sudoScource] = sudoScourceArgs; }); var labelCounterX = Object.assign({}, labelCounter); setAttributes({ labelCounter: labelCounterX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleContent(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, content); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleLabelIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelIcon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelIconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(labelIcon, [sudoScource, key, breakPointX]); setAttributes({ labelIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelIconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelIcon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelIcon: object }); } function onRemoveStyleContent(sudoScource, key) { var object = myStore.deletePropertyDeep(content, [sudoScource, key, breakPointX]); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleContent(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, content); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ content: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleIconToggle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconToggle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconToggle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconToggle(sudoScource, key) { var object = myStore.deletePropertyDeep(iconToggle, [sudoScource, key, breakPointX]); setAttributes({ iconToggle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconToggle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconToggle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconToggle: object }); } function onPickCssLibraryIconToggle(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; iconToggle[sudoScource] = sudoScourceArgs; }); var iconToggleX = Object.assign({}, iconToggle); setAttributes({ iconToggle: iconToggleX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryHeader(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; header[sudoScource] = sudoScourceArgs; }); var headerX = Object.assign({}, header); setAttributes({ header: headerX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryContent(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; content[sudoScource] = sudoScourceArgs; }); var contentX = Object.assign({}, content); setAttributes({ content: contentX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onBulkAddHeader(sudoScource, cssObj) { let obj = Object.assign({}, header); obj[sudoScource] = cssObj; setAttributes({ header: obj }); var selector = myStore.getElementSelector(sudoScource, headerSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHeaderLabel(sudoScource, cssObj) { let obj = Object.assign({}, headerLabel); obj[sudoScource] = cssObj; setAttributes({ headerLabel: obj }); var selector = myStore.getElementSelector(sudoScource, headerLabelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabelIcon(sudoScource, cssObj) { let obj = Object.assign({}, labelIcon); obj[sudoScource] = cssObj; setAttributes({ labelIcon: obj }); var selector = myStore.getElementSelector(sudoScource, labelIconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabelCounter(sudoScource, cssObj) { let obj = Object.assign({}, labelCounter); obj[sudoScource] = cssObj; setAttributes({ labelCounter: obj }); var selector = myStore.getElementSelector(sudoScource, labelCounterSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddContent(sudoScource, cssObj) { let obj = Object.assign({}, content); obj[sudoScource] = cssObj; setAttributes({ content: obj }); var selector = myStore.getElementSelector(sudoScource, contentSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetHeader(sudoScources) { let obj = Object.assign({}, header); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ header: obj }); } function onResetHeaderLabel(sudoScources) { let obj = Object.assign({}, headerLabel); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ headerLabel: obj }); } function onResetLabelIcon(sudoScources) { let obj = Object.assign({}, labelIcon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, labelIconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ labelIcon: obj }); } function onResetLabelCounter(sudoScources) { let obj = Object.assign({}, labelCounter); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ labelCounter: obj }); } function onResetContent(sudoScources) { let obj = Object.assign({}, content); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ content: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)(); var allowedExtraBlocks = []; wp.blocks.getBlockTypes().forEach(function (blockType) { if (blockType.name.startsWith("post-grid/accordion-nested")) { if (!isProFeature) { allowedExtraBlocks.push(blockType.name); } } else { allowedExtraBlocks.push(blockType.name); } }); const removeChild = () => { (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.dispatch)("core/block-editor").removeBlock(clientId); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-red-500 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 text-center text-white rounded flex justify-between items-center", onClick: ev => { removeChild(); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Remove Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], { fill: "white", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_20__["default"], label: "CSS Class", placeholder: "Add Class", value: header.options.class, onChange: newVal => { var options = { ...header.options, class: newVal }; setAttributes({ header: { styles: header.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: header.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...header.options, tag: newVal }; setAttributes({ header: { ...header, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: header, onChange: onChangeStyleHeader, onAdd: onAddStyleHeader, onRemove: onRemoveStyleHeader, onBulkAdd: onBulkAddHeader, onReset: onResetHeader })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: header, onChange: onPickCssLibraryHeader })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Header Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "border border-gray-600 p-2 min-h-[75px] resize-y rounded-[6px] " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { tagName: "span", value: headerLabel.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: newVal => { var options = { ...headerLabel.options, text: newVal }; setAttributes({ headerLabel: { ...headerLabel, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Start Writing...") })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: headerLabel.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "a", value: "a" }], onChange: newVal => { var options = { ...headerLabel.options, tag: newVal }; setAttributes({ headerLabel: { ...headerLabel, options: options } }); } })), headerLabel.options.tag == "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Slug"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: headerLabel.options.slug == undefined ? "" : headerLabel.options.slug, onChange: newVal => { var options = { ...headerLabel.options, slug: newVal }; setAttributes({ headerLabel: { ...headerLabel, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { label: "Enable Label Icon?", help: labelIcon.options.enable ? "Label Icon Enabled" : "Label Icon Disabled.", checked: labelIcon.options.enable ? true : false, onChange: e => { var options = { ...labelIcon.options, enable: labelIcon.options.enable ? false : true }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); } }), labelIcon.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: labelIcon.options.library, srcType: labelIcon.options.srcType, iconSrc: labelIcon.options.iconSrc, onChange: arg => { var options = { ...labelIcon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: headerLabel, onChange: onChangeStyleHeaderLabel, onAdd: onAddStyleHeaderLabel, onRemove: onRemoveStyleHeaderLabel, onBulkAdd: onBulkAddHeaderLabel, onReset: onResetHeaderLabel })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: headerLabel, onChange: onPickCssLibraryHeaderLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: labelIcon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Label", value: "beforeLabel" }, { label: "After Label", value: "afterLabel" }, { label: "Before Label Text", value: "beforeLabelText" }, { label: "After Label Text", value: "afterLabelText" }], onChange: newVal => { var options = { ...labelIcon.options, position: newVal }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); } })), labelIcon.options.position.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: labelIcon.options.library, srcType: labelIcon.options.srcType, iconSrc: labelIcon.options.iconSrc, onChange: arg => { var options = { ...labelIcon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: labelIcon, onChange: onChangeStyleLabelIcon, onAdd: onAddStyleLabelIcon, onRemove: onRemoveStyleLabelIcon, onBulkAdd: onBulkAddLabelIcon, onReset: onResetLabelIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Counter", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { label: "Enable Header Counter?", help: labelCounter.options?.enable ? "Header Counter Enabled" : "Header Counter Disabled.", checked: labelCounter.options.enable ? true : false, onChange: e => { var options = { ...labelCounter.options, enable: labelCounter.options.enable ? false : true }; setAttributes({ labelCounter: { ...labelCounter, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Counter position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: labelCounter.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Left", value: "left" }, { label: "Right", value: "right" }], onChange: newVal => { var options = { ...labelCounter.options, position: newVal }; setAttributes({ labelCounter: { ...labelCounter, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: labelCounter.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...labelCounter.options, tag: newVal }; setAttributes({ labelCounter: { ...labelCounter, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: labelCounter, onChange: onChangeStyleLabelCounter, onAdd: onAddStyleLabelCounter, onRemove: onRemoveStyleLabelCounter, onBulkAdd: onBulkAddLabelCounter, onReset: onResetLabelCounter })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: labelCounter, onChange: onPickCssLibraryLabelCounter })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Content", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: content.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...content.options, tag: newVal }; setAttributes({ content: { ...content, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: content, onChange: onChangeStyleContent, onAdd: onAddStyleContent, onRemove: onRemoveStyleContent, onBulkAdd: onBulkAddContent, onReset: onResetContent })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: content, onChange: onPickCssLibraryContent })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: arg => { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Toggled Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: iconToggle.options.library, srcType: iconToggle.options.srcType, iconSrc: iconToggle.options.iconSrc, onChange: arg => { var options = { ...iconToggle.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ iconToggle: { ...iconToggle, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Left", value: "left" }, { label: "Right", value: "right" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `${blockId}-accordion-header accordion-header ${header.options.class} ${toggled ? "accordion-header-active" : ""}`, onClick: ev => { setToggled(!toggled); } }, labelCounter.options.position == "left" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-label-counter accordion-label-counter` }, attributes.count), icon.options.position == "left" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !toggled && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-icon accordion-icon`, dangerouslySetInnerHTML: { __html: iconHtml } }), toggled && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-icon-toggle accordion-icon accordion-icon-toggle}`, dangerouslySetInnerHTML: { __html: iconToggleHtml } })), labelIcon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-label-icon accordion-label-icon`, dangerouslySetInnerHTML: { __html: labelIconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-header-label accordion-header-label` }, labelIcon.options.position == "beforeLabelText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-label-icon accordion-label-icon`, dangerouslySetInnerHTML: { __html: labelIconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { tagName: "span", value: headerLabel.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: newVal => { var options = { ...headerLabel.options, text: newVal }; setAttributes({ headerLabel: { ...headerLabel, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Start Writing...") }), labelIcon.options.position == "afterLabelText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-label-icon accordion-label-icon`, dangerouslySetInnerHTML: { __html: labelIconHtml } })), labelIcon.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-label-icon accordion-label-icon`, dangerouslySetInnerHTML: { __html: labelIconHtml } }), icon.options.position == "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !toggled && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-icon accordion-icon`, dangerouslySetInnerHTML: { __html: iconHtml } }), toggled && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-icon-toggle accordion-icon-toggle`, dangerouslySetInnerHTML: { __html: iconToggleHtml } })), labelCounter.options.position == "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `${blockId}-accordion-label-counter accordion-label-counter` }, attributes.count)), toggled && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `${blockId}-accordion-content accordion-content` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks, { allowedBlocks: allowedExtraBlocks, renderAppender: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender, null) })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({}); const { children, ...innerBlocksProps } = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps.save(blockProps); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, children); } }); /***/ }), /***/ "./src/blocks/accordion-nested/index.js": /*!**********************************************!*\ !*** ./src/blocks/accordion-nested/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./variations */ "./src/blocks/accordion-nested/variations.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/accordion-nested/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 27H0V45.8H160V27Z", fill: "url(#paint0_linear_61_752)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M17.6226 38.8999C17.4235 38.8999 17.3238 38.7998 17.2242 38.6998L13.9385 34.8999C13.7394 34.6999 13.7395 34.2998 14.0382 34.0998C14.2373 33.8998 14.6356 33.8998 14.8348 34.1998L17.722 37.5998L20.6095 34.1998C20.8087 33.9998 21.1072 33.8998 21.4059 34.0998C21.605 34.2998 21.7047 34.5999 21.5055 34.8999L18.2199 38.6998C17.9212 38.7998 17.8217 38.8999 17.6226 38.8999Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M104.443 33.8999H26.9819V38.7999H104.443V33.8999Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 71.3999H0V110.1H160V71.3999Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 49.2002H0V68.0002H160V49.2002Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M17.623 56.2002C17.8221 56.2002 17.9216 56.3003 18.0211 56.4003L21.3068 60.2002C21.5059 60.4002 21.5058 60.8002 21.2071 61.0002C21.008 61.2002 20.6097 61.2003 20.4106 60.9003L17.5233 57.5002L14.636 60.9003C14.4369 61.1003 14.1382 61.2002 13.8395 61.0002C13.5408 60.8002 13.5407 60.5002 13.7398 60.2002L17.0255 56.4003C17.3242 56.2003 17.4238 56.2002 17.623 56.2002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M104.443 56.2002H26.9819V61.1002H104.443V56.2002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 113.5H0V132.3H160V113.5Z", fill: "url(#paint1_linear_61_752)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M17.6226 125.4C17.4235 125.4 17.3238 125.3 17.2242 125.2L13.9385 121.4C13.7394 121.2 13.7395 120.8 14.0382 120.6C14.2373 120.4 14.6356 120.4 14.8348 120.7L17.722 124.1L20.6095 120.7C20.8087 120.5 21.1072 120.4 21.4059 120.6C21.605 120.8 21.7047 121.1 21.5055 121.4L18.2199 125.2C17.9212 125.3 17.8217 125.4 17.6226 125.4Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M104.443 120.4H26.9819V125.3H104.443V120.4Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_752", x1: "0", y1: "36.4", x2: "160", y2: "36.4", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_752", x1: "0", y1: "122.9", x2: "160", y2: "122.9", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var header = attributes.header; var headerActive = attributes.headerActive; var headerLabel = attributes.headerLabel; var labelIcon = attributes.labelIcon; var labelCounter = attributes.labelCounter; var searchWrap = attributes.searchWrap; var searchInput = attributes.searchInput; var schema = attributes.schema; var content = attributes.content; var icon = attributes.icon; var iconToggle = attributes.iconToggle; var accOptions = attributes.accOptions; var blockCssY = attributes.blockCssY; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; const contentSelector = blockClass + " .accordion-content"; const headerSelector = blockClass + " .accordion-header"; const headerActiveSelector = blockClass + " .accordion-header-active"; const headerLabelSelector = blockClass + " .accordion-header-label"; const labelIconSelector = blockClass + " .accordion-label-icon"; const labelCounterSelector = blockClass + " .accordion-label-counter"; const searchWrapSelector = blockClass + "-accordion-search-wrap"; const searchInputSelector = blockClass + "-accordion-search-input"; const iconSelector = blockClass + " .accordion-icon"; const iconToggleSelector = blockClass + " .accordion-icon-toggle"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[contentSelector] = content; blockCssObj[headerActiveSelector] = headerActive; blockCssObj[headerSelector] = header; blockCssObj[headerLabelSelector] = headerLabel; blockCssObj[labelCounterSelector] = labelCounter; blockCssObj[labelIconSelector] = labelIcon; blockCssObj[searchWrapSelector] = searchWrap; blockCssObj[searchInputSelector] = searchInput; blockCssObj[iconSelector] = icon; blockCssObj[iconToggleSelector] = iconToggle; var blockCssRules = myStore.getBlockCssRules(blockCssObj); // console.log("first"); // console.log(blockCssRules); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // useEffect(() => { // var childBlocks = // select("core/block-editor").getBlocksByClientId(clientId)[0] // .innerBlocks; // childBlocks.map((childBlock) => { // var childClientId = childBlock.clientId; // var childAttributes = childBlock.attributes; // childAttributes.icon.options.position = icon.options.position; // dispatch("core/block-editor").updateBlockAttributes( // childClientId, // childAttributes // ); // wp.data.dispatch("core/block-editor").selectBlock(childClientId); // }); // wp.data.dispatch("core/block-editor").selectBlock(clientId); // }, [icon.options.position]); // useEffect(() => { // var childBlocks = // select("core/block-editor").getBlocksByClientId(clientId)[0] // .innerBlocks; // childBlocks.map((childBlock) => { // var childClientId = childBlock.clientId; // var childAttributes = childBlock.attributes; // childAttributes.labelCounter.options.position = // labelCounter.options.position; // dispatch("core/block-editor").updateBlockAttributes( // childClientId, // childAttributes // ); // wp.data.dispatch("core/block-editor").selectBlock(childClientId); // }); // wp.data.dispatch("core/block-editor").selectBlock(clientId); // }, [labelCounter.options.position]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { // var blockId = attributes.blockId var wrapperX = attributes.wrapper; var headerX = attributes.header; var headerActiveX = attributes.headerActive; var headerLabelX = attributes.headerLabel; var labelIconX = attributes.labelIcon; var labelCounterX = attributes.labelCounter; var schemaX = attributes.schema; var contentX = attributes.content; var iconX = attributes.icon; var iconToggleX = attributes.iconToggle; var blockCssObj = {}; if (wrapperX != undefined) { //var wrapperY = { ...wrapperX, options: wrapper.options } setAttributes({ wrapper: wrapperX }); blockCssObj[wrapperSelector] = wrapperX; } if (headerX != undefined) { //var headerY = { ...headerX, options: header.options } setAttributes({ header: headerX }); blockCssObj[headerSelector] = headerX; } if (headerActiveX != undefined) { //var headerActiveY = { ...headerActiveX, options: headerActive.options } setAttributes({ headerActive: headerActiveX }); blockCssObj[headerActiveSelector] = headerActiveX; } if (headerLabelX != undefined) { //var headerLabelY = { ...headerLabelX, options: headerLabel.options } setAttributes({ headerLabel: headerLabelX }); blockCssObj[headerLabelSelector] = headerLabelX; } if (labelIconX != undefined) { //var labelIconY = { ...labelIconX, options: labelIcon.options } setAttributes({ labelIcon: labelIconX }); blockCssObj[labelIconSelector] = labelIconX; } if (labelCounterX != undefined) { //var labelCounterY = { ...labelCounterX, options: labelCounter.options } setAttributes({ labelCounter: labelCounterX }); blockCssObj[labelCounterSelector] = labelCounterX; } if (schemaX != undefined) { var schemaY = { ...schemaX, options: schema.options }; setAttributes({ schema: schemaY }); //blockCssObj[schemaSelector] = schemaY; } if (contentX != undefined) { //var contentY = { ...contentX, options: content.options } setAttributes({ content: contentX }); blockCssObj[contentSelector] = contentX; } if (iconX != undefined) { //var iconY = { ...iconX, options: icon.options } setAttributes({ icon: iconX }); blockCssObj[iconSelector] = iconX; } if (iconToggleX != undefined) { //var iconToggleY = { ...iconToggleX, options: iconToggle.options } setAttributes({ iconToggle: iconToggleX }); blockCssObj[iconToggleSelector] = iconToggleX; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleHeader(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, header); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeader(sudoScource, key) { var object = myStore.deletePropertyDeep(header, [sudoScource, key, breakPointX]); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeader(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, header); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ header: object }); } function onPickCssLibraryHeader(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; header[sudoScource] = sudoScourceArgs; }); var headerX = Object.assign({}, header); setAttributes({ header: headerX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // ######### function onChangeStyleHeaderActive(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, headerActive); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ headerActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeaderActive(sudoScource, key) { var object = myStore.deletePropertyDeep(headerActive, [sudoScource, key, breakPointX]); setAttributes({ headerActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeaderActive(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, headerActive); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ headerActive: object }); } function onPickCssLibraryHeaderActive(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; headerActive[sudoScource] = sudoScourceArgs; }); var headerActiveX = Object.assign({}, headerActive); setAttributes({ headerActive: headerActiveX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } //######## function onChangeStyleHeaderLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, headerLabel); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ headerLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeaderLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(headerLabel, [sudoScource, key, breakPointX]); setAttributes({ headerLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeaderLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, headerLabel); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ headerLabel: object }); } function onPickCssLibraryHeaderLabel(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; headerLabel[sudoScource] = sudoScourceArgs; }); var headerLabelX = Object.assign({}, headerLabel); setAttributes({ headerLabel: headerLabelX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleLabelCounter(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelCounter); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelCounter: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelCounter(sudoScource, key) { var object = myStore.deletePropertyDeep(labelCounter, [sudoScource, key, breakPointX]); setAttributes({ labelCounter: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelCounter(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelCounter); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelCounter: object }); } function onPickCssLibraryLabelCounter(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; labelCounter[sudoScource] = sudoScourceArgs; }); var labelCounterX = Object.assign({}, labelCounter); setAttributes({ labelCounter: labelCounterX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } //// function onChangeStyleLabelIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelIcon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelIconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(labelIcon, [sudoScource, key, breakPointX]); setAttributes({ labelIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelIconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelIcon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelIcon: object }); } function onChangeStyleContent(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, content); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleContent(sudoScource, key) { var object = myStore.deletePropertyDeep(content, [sudoScource, key, breakPointX]); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleContent(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, content); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ content: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleIconToggle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconToggle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconToggle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconToggle(sudoScource, key) { var object = myStore.deletePropertyDeep(iconToggle, [sudoScource, key, breakPointX]); setAttributes({ iconToggle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconToggle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconToggle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconToggle: object }); } function onPickCssLibraryIconToggle(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; iconToggle[sudoScource] = sudoScourceArgs; }); var iconToggleX = Object.assign({}, iconToggle); setAttributes({ iconToggle: iconToggleX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryContent(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; content[sudoScource] = sudoScourceArgs; }); var contentX = Object.assign({}, content); setAttributes({ content: contentX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleSearchWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, searchWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ searchWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, searchWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSearchWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(searchWrap, [sudoScource, key, breakPointX]); setAttributes({ searchWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, searchWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSearchWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, searchWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ searchWrap: object }); } function onChangeStyleSearchInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, searchInput); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ searchInput: object }); var elementSelector = myStore.getElementSelector(sudoScource, searchInputSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSearchInput(sudoScource, key) { var object = myStore.deletePropertyDeep(searchInput, [sudoScource, key, breakPointX]); setAttributes({ searchInput: object }); var elementSelector = myStore.getElementSelector(sudoScource, searchInputSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSearchInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, searchInput); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ searchInput: object }); } // add bulk style start function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHeader(sudoScource, cssObj) { let obj = Object.assign({}, header); obj[sudoScource] = cssObj; setAttributes({ header: obj }); var selector = myStore.getElementSelector(sudoScource, headerSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHeaderActive(sudoScource, cssObj) { let obj = Object.assign({}, headerActive); obj[sudoScource] = cssObj; setAttributes({ headerActive: obj }); var selector = myStore.getElementSelector(sudoScource, headerActiveSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHeaderLabel(sudoScource, cssObj) { let obj = Object.assign({}, headerLabel); obj[sudoScource] = cssObj; setAttributes({ headerLabel: obj }); var selector = myStore.getElementSelector(sudoScource, headerLabelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabelIcon(sudoScource, cssObj) { let obj = Object.assign({}, labelIcon); obj[sudoScource] = cssObj; setAttributes({ labelIcon: obj }); var selector = myStore.getElementSelector(sudoScource, labelIconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabelCounter(sudoScource, cssObj) { let obj = Object.assign({}, labelCounter); obj[sudoScource] = cssObj; setAttributes({ labelCounter: obj }); var selector = myStore.getElementSelector(sudoScource, labelCounterSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddContent(sudoScource, cssObj) { let obj = Object.assign({}, content); obj[sudoScource] = cssObj; setAttributes({ content: obj }); var selector = myStore.getElementSelector(sudoScource, contentSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIconToggle(sudoScource, cssObj) { let obj = Object.assign({}, iconToggle); obj[sudoScource] = cssObj; setAttributes({ iconToggle: obj }); var selector = myStore.getElementSelector(sudoScource, iconToggleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // add bulk style end // reset style start function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetHeader(sudoScources) { let obj = Object.assign({}, header); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ header: obj }); } function onResetHeaderActive(sudoScources) { let obj = Object.assign({}, headerActive); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ headerActive: obj }); } function onResetHeaderLabel(sudoScources) { let obj = Object.assign({}, headerLabel); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, headerLabelSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ headerLabel: obj }); } function onResetLabelIcon(sudoScources) { let obj = Object.assign({}, labelIcon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, labelIconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ labelIcon: obj }); } function onResetLabelCounter(sudoScources) { let obj = Object.assign({}, labelCounter); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, labelCounterSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ labelCounter: obj }); } function onResetContent(sudoScources) { let obj = Object.assign({}, content); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ content: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } function onResetIconToggle(sudoScources) { let obj = Object.assign({}, iconToggle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconToggleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ iconToggle: obj }); } // reset style end const ALLOWED_BLOCKS = ["post-grid/accordion-nested-item"]; const MY_TEMPLATE = [["post-grid/accordion-nested-item", {}], ["post-grid/accordion-nested-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options?.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, // __experimentalDirectInsert: true, template: MY_TEMPLATE //templateInsertUpdatesSelection: true, }); var childBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.select)("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks; var count = 0; childBlocks.forEach(function (childBlock) { count++; var childClientId = childBlock.clientId; var childAttributes = childBlock.attributes; childAttributes.count = count; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").updateBlockAttributes(childClientId, childAttributes); }); const addChild = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/accordion-nested-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); //setActiveTab(slide.clientId); }; var accOptionsArgs = { active: { label: "Active", value: "0" }, animate: { label: "Animate", value: "500" }, collapsible: { label: "Collapsible", value: false }, disabled: { label: "Disabled", value: false }, event: { label: "Event", value: "click" }, // header: { label: "Header", value: "div" }, heightStyle: { label: "Height Style", value: "auto" } }; var RemoveAccArg = function ({ index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var accOptionsX = { ...accOptions }; delete accOptionsX[index]; setAttributes({ accOptions: accOptionsX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })); }; // var RemoveAccArgRes = function ({ index }) { // return ( // <span // className="cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1" // onClick={(ev) => { // var sliderOptionsResX = { ...sliderOptionsRes }; // delete sliderOptionsResX[index]; // setAttributes({ sliderOptionsRes: sliderOptionsResX }); // }}> // <Icon icon={close} /> // </span> // ); // }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addChild(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options?.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options?.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Accordion Options"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: accOptionsArgs, onChange: (option, index) => { var accOptionsX = { ...accOptions }; accOptionsX[index] = option.value; setAttributes({ accOptions: accOptionsX }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex flex-col gap-2 items-start" }, Object.entries(accOptions).map((item, index) => { var id = item[0]; var value = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, id == "active" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Active?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var accOptionsX = { ...accOptions }; accOptionsX[id] = newVal; setAttributes({ accOptions: accOptionsX }); } })), id == "animate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Animate?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var accOptionsX = { ...accOptions }; accOptionsX[id] = newVal; setAttributes({ accOptions: accOptionsX }); } })), id == "header" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Header?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "text", onChange: newVal => { var accOptionsX = { ...accOptions }; accOptionsX[id] = newVal; setAttributes({ accOptions: accOptionsX }); } })), id == "event" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Event?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "text", onChange: newVal => { var accOptionsX = { ...accOptions }; accOptionsX[id] = newVal; setAttributes({ accOptions: accOptionsX }); } })), id == "disabled" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Disabled?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { help: value ? "Enabled" : "Disabled.", checked: value ? true : false, onChange: e => { var accOptionsX = { ...accOptions }; accOptionsX[id] = value ? false : true; setAttributes({ accOptions: accOptionsX }); } })), id == "collapsible" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Collapsible?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { help: value ? "Enabled" : "Disabled.", checked: value ? true : false, onChange: e => { var accOptionsX = { ...accOptions }; accOptionsX[id] = value ? false : true; setAttributes({ accOptions: accOptionsX }); } })), id == "heightStyle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "gap-2 justify-between " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAccArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Height Style?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "Auto", value: "auto" }, { label: "Fill", value: "fill" }, { label: "Content", value: "content" }], onChange: newVal => { var accOptionsX = { ...accOptions }; accOptionsX[id] = newVal; setAttributes({ accOptions: accOptionsX }); } }))); })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: header.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...header.options, tag: newVal }; setAttributes({ header: { ...header, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: header, onChange: onChangeStyleHeader, onAdd: onAddStyleHeader, onRemove: onRemoveStyleHeader, onBulkAdd: onBulkAddHeader, onReset: onResetHeader })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: header, onChange: onPickCssLibraryHeader })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header Active", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: headerActive, onChange: onChangeStyleHeaderActive, onAdd: onAddStyleHeaderActive, onRemove: onRemoveStyleHeaderActive, onBulkAdd: onBulkAddHeaderActive, onReset: onResetHeaderActive })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: headerActive, onChange: onPickCssLibraryHeaderActive })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: headerLabel.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "a", value: "a" }], onChange: newVal => { var options = { ...headerLabel.options, tag: newVal }; setAttributes({ headerLabel: { ...headerLabel, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: headerLabel, onChange: onChangeStyleHeaderLabel, onAdd: onAddStyleHeaderLabel, onRemove: onRemoveStyleHeaderLabel, onBulkAdd: onBulkAddHeaderLabel, onReset: onResetHeaderLabel })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: headerLabel, onChange: onPickCssLibraryHeaderLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Counter", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Counter position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: labelCounter.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Left", value: "left" }, { label: "Right", value: "right" }], onChange: newVal => { var options = { ...labelCounter.options, position: newVal }; setAttributes({ labelCounter: { ...labelCounter, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: labelCounter.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...labelCounter.options, tag: newVal }; setAttributes({ labelCounter: { ...labelCounter, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable Override Child?", help: labelCounter.options.overrideChild ? "Override Child Enabled" : "Override Child Disabled.", checked: labelCounter.options.overrideChild ? true : false, onChange: e => { var options = { ...labelCounter.options, overrideChild: labelCounter.options.overrideChild ? false : true }; setAttributes({ labelCounter: { ...labelCounter, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: labelCounter, onChange: onChangeStyleLabelCounter, onAdd: onAddStyleLabelCounter, onRemove: onRemoveStyleLabelCounter, onBulkAdd: onBulkAddLabelCounter, onReset: onResetLabelCounter })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: labelCounter, onChange: onPickCssLibraryLabelCounter })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: labelIcon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Label", value: "beforeLabel" }, { label: "After Label", value: "afterLabel" }, { label: "Before Label Text", value: "beforeLabelText" }, { label: "After Label Text", value: "afterLabelText" }], onChange: newVal => { var options = { ...labelIcon.options, position: newVal }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); // var childBlocks = select('core/block-editor').getBlocksByClientId(clientId)[0].innerBlocks; // childBlocks.map(childBlock => { // var childClientId = childBlock.clientId; // var childAttributes = childBlock.attributes; // childAttributes.labelIcon.options.position = newVal; // dispatch('core/block-editor').updateBlockAttributes(childClientId, childAttributes) // wp.data.dispatch('core/block-editor').selectBlock(childClientId) // }) // wp.data.dispatch('core/block-editor').selectBlock(clientId) } })), labelIcon.options.position.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: labelIcon.options.library, srcType: labelIcon.options.srcType, iconSrc: labelIcon.options.iconSrc, onChange: arg => { var options = { ...labelIcon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); // var childBlocks = // select("core/block-editor").getBlocksByClientId( // clientId // )[0].innerBlocks; // childBlocks.map((childBlock) => { // var childClientId = childBlock.clientId; // console.log("childClientId", childClientId); // var childAttributes = childBlock.attributes; // childAttributes.labelIcon.options.srcType = // arg.srcType; // childAttributes.labelIcon.options.library = // arg.library; // childAttributes.labelIcon.options.iconSrc = // arg.iconSrc; // dispatch("core/block-editor").updateBlockAttributes( // childClientId, // childAttributes // ); // wp.data // .dispatch("core/block-editor") // .selectBlock(childClientId); // }); // console.log(clientId); // wp.data // .dispatch("core/block-editor") // .selectBlock(clientId); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable Override Child?", help: labelIcon.options.overrideChild ? "Override Child Enabled" : "Override Child Disabled.", checked: labelIcon.options.overrideChild ? true : false, onChange: e => { var options = { ...labelIcon.options, overrideChild: labelIcon.options.overrideChild ? false : true }; setAttributes({ labelIcon: { ...labelIcon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: labelIcon, onChange: onChangeStyleLabelIcon, onAdd: onAddStyleLabelIcon, onRemove: onRemoveStyleLabelIcon, onBulkAdd: onBulkAddLabelIcon, onReset: onResetLabelIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Content", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: content.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...content.options, tag: newVal }; setAttributes({ content: { ...content, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: content, onChange: onChangeStyleContent, onAdd: onAddStyleContent, onRemove: onRemoveStyleContent, onBulkAdd: onBulkAddContent, onReset: onResetContent })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: content, onChange: onPickCssLibraryContent })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: arg => { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Toggled Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: iconToggle.options.library, srcType: iconToggle.options.srcType, iconSrc: iconToggle.options.iconSrc, onChange: arg => { var options = { ...iconToggle.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ iconToggle: { ...iconToggle, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Left", value: "left" }, { label: "Right", value: "right" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable Override Child?", help: icon.options.overrideChild ? "Override Child Enabled" : "Override Child Disabled.", checked: icon.options.overrideChild ? true : false, onChange: e => { var options = { ...icon.options, overrideChild: icon.options.overrideChild ? false : true }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Schema", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable Schema?", help: schema.options.enable ? "Schema Enabled" : "Schema Disabled.", checked: schema.options.enable ? true : false, onChange: e => { var options = { ...schema.options, enable: schema.options.enable ? false : true }; setAttributes({ schema: { ...schema, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Search", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable Search?", help: searchWrap.options.enable ? "Search Enabled" : "Search Disabled.", disabled: isProFeature, checked: searchWrap.options.enable ? true : false, onChange: e => { var options = { ...searchWrap.options, enable: searchWrap.options.enable ? false : true }; setAttributes({ searchWrap: { ...searchWrap, options: options } }); } }), isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-amber-400 mx-2 rounded-sm px-3 text-white hover:text-white" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=search&utm_term=blockaccordion&utm_campaign=pluginPostGrid&utm_medium=search" }, "Pro"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Search Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: searchWrap, onChange: onChangeStyleSearchWrap, onAdd: onAddStyleSearchWrap, onRemove: onRemoveStyleSearchWrap, onBulkAdd: onBulkAddIconToggle, onReset: onResetIconToggle })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Search Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: searchInput, onChange: onChangeStyleSearchInput, onAdd: onAddStyleSearchInput, onRemove: onRemoveStyleSearchInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_20__["default"], { blockName: "accordion-nested", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "accordion-nested" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/accordion-nested-item", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__["default"], { blockName: "accordion-nested", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, searchWrap.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `${blockId}-accordion-search-wrap` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("input", { className: `${blockId}-accordion-search-input my-4`, type: searchInput.options.type, placeholder: searchInput.options.placeholder, value: searchInput.options.value })), innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} pg-accordion-nested` }); //const innerBlocksProps = useInnerBlocksProps.save(blockProps); const { children, ...innerBlocksProps } = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps.save(blockProps); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children); //return null; } }); /***/ }), /***/ "./src/blocks/accordion-nested/variations.js": /*!***************************************************!*\ !*** ./src/blocks/accordion-nested/variations.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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__); /** * WordPress dependencies */ /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "preset-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, accOptions: {}, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter", overrideChild: true }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon", overrideChild: true }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "left", class: "accordion-icon", overrideChild: true }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M27.66,26.62a1.22,1.22,0,0,1-.93-.43l-7.39-8.63A1.23,1.23,0,0,1,21.21,16l6.45,7.54L34.12,16A1.23,1.23,0,0,1,36,17.56L28.6,26.19A1.24,1.24,0,0,1,27.66,26.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "48.66", y: "15.53", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "99.56", width: "360", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "49.78", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M27.66,65.31a1.26,1.26,0,0,1,.94.43L36,74.37A1.23,1.23,0,1,1,34.12,76l-6.46-7.53L21.21,76a1.23,1.23,0,1,1-1.87-1.6l7.39-8.63A1.22,1.22,0,0,1,27.66,65.31Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "48.66", y: "65.31", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "193.85", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M27.66,220.47a1.22,1.22,0,0,1-.93-.43l-7.39-8.63a1.23,1.23,0,1,1,1.87-1.6l6.45,7.53,6.46-7.53a1.23,1.23,0,1,1,1.87,1.6L28.6,220A1.24,1.24,0,0,1,27.66,220.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "48.66", y: "209.38", width: "174.4", height: "11.09" })) }, { name: "preset-2", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-2"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-2"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "center" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "left", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "center" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M86.61,26.62a1.22,1.22,0,0,1-.93-.43l-7.4-8.63A1.23,1.23,0,0,1,80.15,16l6.46,7.54L93.07,16a1.23,1.23,0,0,1,1.87,1.6l-7.39,8.63A1.26,1.26,0,0,1,86.61,26.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "107.61", y: "15.53", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "99.56", width: "360", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "49.78", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M86.61,65.31a1.26,1.26,0,0,1,.94.43l7.39,8.63A1.23,1.23,0,1,1,93.07,76l-6.46-7.53L80.15,76a1.22,1.22,0,0,1-1.73.14,1.24,1.24,0,0,1-.14-1.74l7.4-8.63A1.22,1.22,0,0,1,86.61,65.31Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "107.61", y: "65.31", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "193.85", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M86.61,220.47a1.22,1.22,0,0,1-.93-.43l-7.4-8.63a1.24,1.24,0,0,1,.14-1.74,1.22,1.22,0,0,1,1.73.14l6.46,7.53,6.46-7.53a1.23,1.23,0,1,1,1.87,1.6L87.55,220A1.26,1.26,0,0,1,86.61,220.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "107.61", y: "209.38", width: "174.4", height: "11.09" })) }, { name: "preset-3", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-3"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-3"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "end" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "left", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "end" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", width: "360", height: "42.15", transform: "translate(360 42.15) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M332.34,26.62a1.22,1.22,0,0,0,.93-.43l7.39-8.63a1.23,1.23,0,0,0-1.87-1.6l-6.45,7.54L325.88,16a1.23,1.23,0,0,0-1.87,1.6l7.39,8.63A1.24,1.24,0,0,0,332.34,26.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "136.94", y: "15.53", width: "174.4", height: "11.09", transform: "translate(448.27 42.15) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "99.56", width: "360", height: "86.66", transform: "translate(360 285.78) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "49.78", width: "360", height: "42.15", transform: "translate(360 141.71) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M332.34,65.31a1.26,1.26,0,0,0-.94.43L324,74.37a1.23,1.23,0,1,0,1.87,1.6l6.46-7.53L338.79,76a1.23,1.23,0,1,0,1.87-1.6l-7.39-8.63A1.22,1.22,0,0,0,332.34,65.31Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "136.94", y: "65.31", width: "174.4", height: "11.09", transform: "translate(448.27 141.71) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "193.85", width: "360", height: "42.15", transform: "translate(360 429.85) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M332.34,220.47a1.22,1.22,0,0,0,.93-.43l7.39-8.63a1.23,1.23,0,1,0-1.87-1.6l-6.45,7.53-6.46-7.53a1.23,1.23,0,1,0-1.87,1.6L331.4,220A1.24,1.24,0,0,0,332.34,220.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "136.94", y: "209.38", width: "174.4", height: "11.09", transform: "translate(448.27 429.85) rotate(-180)" })) }, { name: "preset-4", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-4"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-4"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "left", class: "accordion-icon" }, styles: { fontSize: { Desktop: "25px" }, display: { Desktop: "inline-block" }, margin: { Desktop: "0px 10px 0px 10px" } } }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", class: "accordion-icon" }, styles: { fontSize: { Desktop: "25px" }, display: { Desktop: "inline-block" }, margin: { Desktop: "0px 10px 0px 10px" } } }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "29.73", width: "330.38", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "29.73", y: "99.56", width: "330.38", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "29.73", y: "49.78", width: "330.38", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "29.73", y: "193.85", width: "330.38", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M8.74,26.62a1.24,1.24,0,0,1-.94-.43L.41,17.56a1.21,1.21,0,0,1,.13-1.73A1.23,1.23,0,0,1,2.28,16L8.74,23.5,15.19,16a1.23,1.23,0,0,1,1.87,1.6L9.67,26.19A1.22,1.22,0,0,1,8.74,26.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M8.74,65.31a1.24,1.24,0,0,1,.93.43l7.39,8.63A1.23,1.23,0,1,1,15.19,76L8.74,68.44,2.28,76a1.23,1.23,0,1,1-1.87-1.6L7.8,65.74A1.24,1.24,0,0,1,8.74,65.31Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M8.74,220.47A1.24,1.24,0,0,1,7.8,220L.41,211.41a1.23,1.23,0,1,1,1.87-1.6l6.46,7.53,6.45-7.53a1.23,1.23,0,1,1,1.87,1.6L9.67,220A1.22,1.22,0,0,1,8.74,220.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "52.54", y: "15.53", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "52.54", y: "65.31", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "52.54", y: "209.38", width: "174.4", height: "11.09" })) }, { name: "preset-5", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-5"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-5"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "right", class: "accordion-icon" }, styles: { fontSize: { Desktop: "25px" }, display: { Desktop: "inline-block" }, margin: { Desktop: "0px 10px 0px 10px" } } }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { enable: false, tag: "div", class: "accordion-header-counter" }, styles: {} }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "right", class: "accordion-icon" }, styles: { fontSize: { Desktop: "25px" }, display: { Desktop: "inline-block" }, margin: { Desktop: "0px 10px 0px 10px" } } }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", width: "330.38", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "99.56", width: "330.38", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "49.78", width: "330.38", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "193.85", width: "330.38", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M351.38,26.62a1.24,1.24,0,0,1-.94-.43l-7.39-8.63a1.23,1.23,0,0,1,1.87-1.6l6.46,7.54L357.83,16a1.23,1.23,0,0,1,1.87,1.6l-7.39,8.63A1.22,1.22,0,0,1,351.38,26.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M351.38,65.31a1.24,1.24,0,0,1,.93.43l7.39,8.63a1.23,1.23,0,1,1-1.87,1.6l-6.45-7.53L344.92,76a1.23,1.23,0,1,1-1.87-1.6l7.39-8.63A1.24,1.24,0,0,1,351.38,65.31Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M351.38,220.47a1.24,1.24,0,0,1-.94-.43l-7.39-8.63a1.23,1.23,0,1,1,1.87-1.6l6.46,7.53,6.45-7.53a1.23,1.23,0,1,1,1.87,1.6L352.31,220A1.22,1.22,0,0,1,351.38,220.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "129.16", y: "15.53", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "129.16", y: "65.31", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "129.16", y: "209.38", width: "174.4", height: "11.09" })) }, { name: "preset-6", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-6"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-6"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { position: "left", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 10px 0px 0px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { position: "left", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 10px 0px 0px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "0.11", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "0.11", y: "99.56", width: "360", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "0.11", y: "49.78", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "0.11", y: "193.85", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "46.54", y: "15.53", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "46.54", y: "65.31", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "46.54", y: "209.38", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M17,18.65v-3l4.21-2.48h2.57V29H20.86V16.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M19.21,76.4h6.34v2.5H15.18V76.57a29.76,29.76,0,0,0,4.9-4.32q2.07-2.3,2.07-4.14a2.5,2.5,0,0,0-.71-1.89,2.8,2.8,0,0,0-2-.68A6.05,6.05,0,0,0,15.54,67V64.2a6.74,6.74,0,0,1,2-1,7.65,7.65,0,0,1,2.38-.39,5.58,5.58,0,0,1,3.8,1.28,4.48,4.48,0,0,1,1.47,3.58C25.18,70.56,23.19,73.46,19.21,76.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M16.06,210.47v-2.75a7.16,7.16,0,0,1,3.48-.9A5.86,5.86,0,0,1,23.46,208a3.89,3.89,0,0,1,1.42,3.11,3.7,3.7,0,0,1-2.5,3.74,3.78,3.78,0,0,1,2.11,1.27,3.69,3.69,0,0,1,.75,2.37,4.08,4.08,0,0,1-1.47,3.25A6.17,6.17,0,0,1,19.66,223a9.93,9.93,0,0,1-4.18-.8v-2.85a8.27,8.27,0,0,0,4,1,3.09,3.09,0,0,0,2.06-.62,2,2,0,0,0,.74-1.59c0-1.41-1.14-2.11-3.43-2.11h-.92v-2.46h.92a3.94,3.94,0,0,0,2.16-.55,1.77,1.77,0,0,0,.88-1.58c0-1.36-.84-2-2.5-2A6.24,6.24,0,0,0,16.06,210.47Z" })) }, { name: "preset-7", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-7"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-7"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "end" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { position: "right", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 0px 0px 10px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "end" }, backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: {} }, labelCounter: { options: { position: "right", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 0px 0px 10px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "99.56", width: "360", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "49.78", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "193.85", width: "360", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "139.17", y: "15.53", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "139.17", y: "65.31", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "139.17", y: "209.38", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M336.36,18.65v-3l4.2-2.48h2.58V29h-2.89V16.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M338.59,76.4h6.34v2.5H334.56V76.57a29.85,29.85,0,0,0,4.91-4.32,6.55,6.55,0,0,0,2.06-4.14,2.49,2.49,0,0,0-.7-1.89,2.8,2.8,0,0,0-2-.68,6,6,0,0,0-3.86,1.5V64.2a6.62,6.62,0,0,1,2-1,7.6,7.6,0,0,1,2.38-.39,5.6,5.6,0,0,1,3.8,1.28,4.48,4.48,0,0,1,1.47,3.58C344.57,70.56,342.58,73.46,338.59,76.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M335.45,210.47v-2.75a7.15,7.15,0,0,1,3.47-.9,5.82,5.82,0,0,1,3.92,1.22,3.9,3.9,0,0,1,1.43,3.11,3.71,3.71,0,0,1-2.51,3.74,3.77,3.77,0,0,1,2.12,1.27,3.69,3.69,0,0,1,.75,2.37,4.08,4.08,0,0,1-1.47,3.25A6.18,6.18,0,0,1,339,223a9.91,9.91,0,0,1-4.17-.8v-2.85a8.27,8.27,0,0,0,4,1,3.06,3.06,0,0,0,2-.62,2,2,0,0,0,.74-1.59c0-1.41-1.14-2.11-3.42-2.11h-.92v-2.46h.92a3.94,3.94,0,0,0,2.16-.55,1.78,1.78,0,0,0,.87-1.58c0-1.36-.83-2-2.5-2A6.23,6.23,0,0,0,335.45,210.47Z" })) }, { name: "preset-8", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-8"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-8"), isPro: true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { position: "left", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 10px 0px 0px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "start" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { position: "left", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 10px 0px 0px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { class: "cls-1", x: "30.65", width: "329.35", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "56.55", y: "15.53", width: "172.07", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "30.65", y: "99.56", width: "329.35", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "30.65", y: "49.78", width: "329.35", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { class: "cls-1", x: "56.55", y: "65.31", width: "172.07", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { class: "cls-1", x: "30.65", y: "193.85", width: "329.35", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "56.55", y: "209.38", width: "172.07", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { class: "cls-1", d: "M1.77,18.65v-3l4.15-2.48H8.46V29H5.61V16.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M4,76.32h6.25v2.5H0V76.49a29.67,29.67,0,0,0,4.84-4.32,6.61,6.61,0,0,0,2-4.14,2.49,2.49,0,0,0-.7-1.89,2.72,2.72,0,0,0-2-.68A5.91,5.91,0,0,0,.36,67V64.12a6.8,6.8,0,0,1,2-1,7.47,7.47,0,0,1,2.35-.39A5.45,5.45,0,0,1,8.42,64a4.51,4.51,0,0,1,1.45,3.58Q9.87,71.93,4,76.32Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { class: "cls-1", d: "M.87,210.39v-2.75a7,7,0,0,1,3.43-.9A5.7,5.7,0,0,1,8.17,208a3.9,3.9,0,0,1,1.4,3.11,3.69,3.69,0,0,1-2.47,3.74,3.78,3.78,0,0,1,2.09,1.27,3.75,3.75,0,0,1,.74,2.37,4.09,4.09,0,0,1-1.45,3.25A6,6,0,0,1,4.42,223a9.67,9.67,0,0,1-4.12-.8V219.3a8.11,8.11,0,0,0,3.93,1,3,3,0,0,0,2-.62A2,2,0,0,0,7,218.11C7,216.7,5.86,216,3.61,216H2.7v-2.45h.91A3.88,3.88,0,0,0,5.74,213a1.8,1.8,0,0,0,.86-1.58c0-1.36-.82-2-2.47-2A6.13,6.13,0,0,0,.87,210.39Z" })) }, { name: "preset-9", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-9"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-9"), isPro: true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: {} }, searchWrap: { options: { enable: false, contentSrc: ["content", "label"], tag: "div", class: "accordion-search-wrap" }, styles: {} }, searchInput: { options: { tag: "input", type: "text", value: "", placeholder: "Search here...", class: "accordion-search-input" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "end" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, textAlign: { Desktop: "right" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { position: "right", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 0px 0px 10px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-up", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/accordion-nested-item", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, content: { options: { tag: "div", class: "accordion-content" }, styles: {} }, header: { options: { tag: "div", class: "accordion-header" }, styles: { justifyContent: { Desktop: "end" }, margin: { Desktop: "0px 0px 1px 0px" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" } } }, headerLabel: { options: { text: "Accordion Header Text", tag: "div", class: "accordion-header-label" }, styles: { backgroundColor: { Desktop: "#18978F" }, color: { Desktop: "#ffffff" }, width: { Desktop: "100%" }, textAlign: { Desktop: "right" }, padding: { Desktop: "10px 10px 10px 10px" } } }, labelCounter: { options: { position: "right", tag: "div", class: "accordion-header-counter" }, styles: { margin: { Desktop: "0px 0px 0px 10px" } } }, labelIcon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "left", enable: false, class: "accordion-icon" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "", class: "accordion-icon" }, styles: {} }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "accordion-icon-toggle" }, styles: {} }, blockId: "", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M351.43,18.57v-3l4.2-2.48h2.57V28.94h-2.89V16.21Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M353.66,76.32H360v2.5H349.63V76.49a30.26,30.26,0,0,0,4.91-4.32A6.6,6.6,0,0,0,356.6,68a2.53,2.53,0,0,0-.7-1.89,2.8,2.8,0,0,0-2-.68A6.06,6.06,0,0,0,350,67V64.12a6.92,6.92,0,0,1,2-1,7.56,7.56,0,0,1,2.38-.39,5.6,5.6,0,0,1,3.8,1.28,4.49,4.49,0,0,1,1.47,3.58Q359.64,71.93,353.66,76.32Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M350.52,210.39v-2.75a7.13,7.13,0,0,1,3.47-.9,5.84,5.84,0,0,1,3.92,1.22,3.89,3.89,0,0,1,1.42,3.11,3.69,3.69,0,0,1-2.5,3.74,3.8,3.8,0,0,1,2.11,1.27,3.64,3.64,0,0,1,.76,2.37,4.08,4.08,0,0,1-1.47,3.25,6.2,6.2,0,0,1-4.12,1.25,9.93,9.93,0,0,1-4.18-.8V219.3a8.31,8.31,0,0,0,4,1,3.08,3.08,0,0,0,2.05-.62,2,2,0,0,0,.74-1.59c0-1.41-1.14-2.11-3.43-2.11h-.92v-2.45h.92a4,4,0,0,0,2.17-.56,1.78,1.78,0,0,0,.87-1.58c0-1.36-.83-2-2.5-2A6.23,6.23,0,0,0,350.52,210.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", width: "333.82", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "99.56", width: "333.82", height: "86.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "49.78", width: "333.82", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "193.85", width: "333.82", height: "42.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "124.2", y: "15.45", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "124.2", y: "65.23", width: "174.4", height: "11.09" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "124.2", y: "209.3", width: "174.4", height: "11.09" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/accordion/index.js": /*!***************************************!*\ !*** ./src/blocks/accordion/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)("post-grid/accordion", { apiVersion: 2, title: "Accordion (OLD)", parent: ["post-grid/accordion-nested"], icon: { background: "#fff", foreground: "#fff", src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", y: "6.2", width: "36", height: "4.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#C5C5C5", d: "M4,8.87a.14.14,0,0,1-.1,0L3.13,8a.12.12,0,0,1,0-.17.12.12,0,0,1,.17,0L4,8.55l.64-.75a.13.13,0,0,1,.18,0A.12.12,0,0,1,4.8,8l-.74.86A.12.12,0,0,1,4,8.87Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#C5C5C5", x: "6.07", y: "7.76", width: "17.44", height: "1.11" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#C5C5C5", y: "16.16", width: "36", height: "8.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#C5C5C5", y: "11.18", width: "36", height: "4.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M4,12.73a.12.12,0,0,1,.09,0l.74.86a.12.12,0,0,1,0,.17.13.13,0,0,1-.18,0L4,13.05l-.65.75a.12.12,0,0,1-.17,0,.12.12,0,0,1,0-.17l.74-.86A.14.14,0,0,1,4,12.73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", x: "6.07", y: "12.73", width: "17.44", height: "1.11" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", y: "25.58", width: "36", height: "4.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#C5C5C5", d: "M4,28.24a.13.13,0,0,1-.1,0l-.74-.86a.14.14,0,0,1,0-.18.12.12,0,0,1,.17,0l.65.75.64-.75a.12.12,0,1,1,.19.16l-.74.86A.11.11,0,0,1,4,28.24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#C5C5C5", x: "6.07", y: "27.13", width: "17.44", height: "1.11" })) }, attributes: { wrapper: { type: "object", default: { options: { content: "", tag: "div", class: "pg-accordion" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } } }, items: { type: "array", default: [{ isActive: false, headerText: "What is Lorem Ipsum?", content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", icon: "", iconToggle: "", styles: {} }] }, header: { type: "object", default: { options: { text: "What is Lorem Ipsum?", tag: "div", class: "pg-accordion-header" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } } }, headerActive: { type: "object", default: { options: { text: "What is Lorem Ipsum?", tag: "div", class: "pg-accordion-header " }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } } }, content: { type: "object", default: { options: { text: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", tag: "div", class: "pg-accordion-content" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } } }, icon: { type: "object", default: { options: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fas fa-chevron-right", class: "icon", position: "beforeHeader", enableToggle: "yes" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, fontSize: { Desktop: "" } } } }, iconToggle: { type: "object", default: { options: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fas fa-chevron-down", class: "iconToggle" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" }, fontSize: { Desktop: "" } } } }, blockId: { type: "string", default: "" }, blockCssY: { type: "object", default: { items: {} } } }, usesContext: ["postId", "loopIndex", "postType", "queryId"], supports: { align: ["wide", "full"] }, category: "post-grid-tools", edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var items = attributes.items; var wrapper = attributes.wrapper; var header = attributes.header; var headerActive = attributes.headerActive; var content = attributes.content; var icon = attributes.icon; var iconToggle = attributes.iconToggle; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [isOpen, setisOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var wrapperSelector = blockClass; var headerSelector = blockClass + " .pg-accordion-header"; var headerActiveSelector = blockClass + " .pg-accordion-header.active"; var contentSelector = blockClass + " .pg-accordion-content .ac-text"; const iconSelector = blockClass + " .icon-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [iconToggleHtml, setIconToggleHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = iconToggle.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconToggleHtml(iconHtml); }, [iconToggle]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeIconToggle(arg) { var options = { ...iconToggle.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ iconToggle: { ...iconToggle, options: options } }); } function onPickCssLibraryHeader(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; header[sudoScource] = sudoScourceArgs; }); var headerX = Object.assign({}, header); setAttributes({ header: headerX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryContent(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; content[sudoScource] = sudoScourceArgs; }); var contentX = Object.assign({}, content); setAttributes({ content: contentX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleHeader(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, header); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeader(sudoScource, key) { var object = myStore.deletePropertyDeep(header, [sudoScource, key, breakPointX]); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeader(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, header); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ header: object }); } function onChangeStyleContent(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, content); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleContent(sudoScource, key) { var object = myStore.deletePropertyDeep(content, [sudoScource, key, breakPointX]); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleContent(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, content); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ content: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleHeaderActive(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, headerActive); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ headerActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeaderActive(sudoScource, key) { var object = myStore.deletePropertyDeep(headerActive, [sudoScource, key, breakPointX]); setAttributes({ headerActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeaderActive(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, headerActive); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ headerActive: object }); } function onBulkAddHeader(sudoScource, cssObj) { let obj = Object.assign({}, header); obj[sudoScource] = cssObj; setAttributes({ header: obj }); var selector = myStore.getElementSelector(sudoScource, headerSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHeaderLabel(sudoScource, cssObj) { let obj = Object.assign({}, headerActive); obj[sudoScource] = cssObj; setAttributes({ headerActive: obj }); var selector = myStore.getElementSelector(sudoScource, headerActiveSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabelContent(sudoScource, cssObj) { let obj = Object.assign({}, content); obj[sudoScource] = cssObj; setAttributes({ content: obj }); var selector = myStore.getElementSelector(sudoScource, contentSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2 pg-setting-input-text", title: "header", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_17__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: header.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...header.options, tag: newVal }; setAttributes({ header: { ...header, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: header, onChange: onChangeStyleHeader, onBulkAdd: onBulkAddHeader, onAdd: onAddStyleHeader, onRemove: onRemoveStyleHeader })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: header, onChange: onPickCssLibraryHeader })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Header - Active", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_17__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: headerActive, onChange: onChangeStyleHeaderActive, onAdd: onAddStyleHeaderActive, onBulkAdd: onBulkAddHeaderLabel, onRemove: onRemoveStyleHeaderActive })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Content", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_17__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: content.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...content.options, tag: newVal }; setAttributes({ content: { ...content, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: content, onChange: onChangeStyleContent, onBulkAdd: onBulkAddLabelContent, onAdd: onAddStyleContent, onRemove: onRemoveStyleContent })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: content, onChange: onPickCssLibraryContent })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_17__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Toggled Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: iconToggle.options.library, srcType: iconToggle.options.srcType, iconSrc: iconToggle.options.iconSrc, onChange: onChangeIconToggle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose...", value: "" }, { label: "Before Header Text", value: "beforeHeader" }, { label: "After Header Text", value: "afterHeader" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Enable Icon Toggle"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.enableToggle, options: [{ label: "Yes", value: "yes" }, { label: "No", value: "no" }], onChange: newVal => { var options = { ...icon.options, enableToggle: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: icon, onChange: onChangeStyleIcon, onBulkAdd: onBulkAddIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: [blockId] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 p-2 px-5 text-white my-4 text-center cursor-pointer", onClick: ev => { var itemx = items.concat({ isActive: false, headerText: "What is Lorem Ipsum?", content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", icon: "", iconToggle: "", styles: {} }); setAttributes({ items: itemx }); } }, "Add"), items.map((item, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `${header.options.class} ${items[i].isActive ? "active" : ""} cursor-pointer`, onClick: ev => { items[i].isActive = !items[i].isActive; var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); } }, icon.options.position == "beforeHeader" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, icon.options.enableToggle == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !items[i].isActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap", dangerouslySetInnerHTML: { __html: iconHtml } }), items[i].isActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap", dangerouslySetInnerHTML: { __html: iconToggleHtml } })), icon.options.enableToggle == "no" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap", dangerouslySetInnerHTML: { __html: iconHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.RichText, { tagName: "span", value: item.headerText, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { items[i].headerText = content; var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Start Writing...") }), icon.options.position == "afterHeader" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, icon.options.enableToggle == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, !items[i].isActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap float-right", dangerouslySetInnerHTML: { __html: iconHtml } }), items[i].isActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap float-right", dangerouslySetInnerHTML: { __html: iconToggleHtml } })), icon.options.enableToggle == "no" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap float-right", dangerouslySetInnerHTML: { __html: iconHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-lg cursor-pointer px-2 text-red-500 py-1 float-right icon-close", onClick: ev => { items.splice(i, 1); var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); ev.preventDefault(); } })), items[i].isActive && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: content.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.RichText, { className: "ac-text", tagName: "div", value: item.content, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { items[i].content = content; var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Start Writing...") }))); })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/archive-description/index.js": /*!*************************************************!*\ !*** ./src/blocks/archive-description/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/archive-description/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M68.7776 49.5732H20.9824C19.9261 49.5732 18.913 49.9929 18.1661 50.7398C17.4191 51.4868 16.9995 52.4998 16.9995 53.5562V93.3855C16.9995 94.4418 17.4191 95.4549 18.1661 96.2018C18.913 96.9488 19.9261 97.3684 20.9824 97.3684H68.7776C69.8339 97.3684 70.847 96.9488 71.594 96.2018C72.3409 95.4549 72.7605 94.4418 72.7605 93.3855V53.5562C72.7605 52.4998 72.3409 51.4868 71.594 50.7398C70.847 49.9929 69.8339 49.5732 68.7776 49.5732ZM64.7947 89.4025H24.9654V57.5391H64.7947V89.4025Z", fill: "url(#paint0_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M152.42 61.5222H88.6929V69.4881H152.42V61.5222Z", fill: "url(#paint1_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M136.488 77.4539H88.6929V85.4197H136.488V77.4539Z", fill: "url(#paint2_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M68.7776 112.205H20.9824C19.9261 112.205 18.913 112.624 18.1661 113.371C17.4191 114.118 16.9995 115.131 16.9995 116.188V156.017C16.9995 157.073 17.4191 158.086 18.1661 158.833C18.913 159.58 19.9261 160 20.9824 160H68.7776C69.8339 160 70.847 159.58 71.594 158.833C72.3409 158.086 72.7605 157.073 72.7605 156.017V116.188C72.7605 115.131 72.3409 114.118 71.594 113.371C70.847 112.624 69.8339 112.205 68.7776 112.205ZM64.7947 152.034H24.9654V120.171H64.7947V152.034Z", fill: "url(#paint3_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M152.42 124.154H88.6929V132.12H152.42V124.154Z", fill: "url(#paint4_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M136.488 140.085H88.6929V148.051H136.488V140.085Z", fill: "url(#paint5_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M132 0H16.9995V11H132V0Z", fill: "url(#paint6_linear_61_482)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M82.9995 28H16.9995V33H82.9995V28Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M103 19H16.9995V24H103V19Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_482", x1: "16.9995", y1: "73.4708", x2: "72.7605", y2: "73.4708", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_482", x1: "88.6929", y1: "65.5051", x2: "152.42", y2: "65.5051", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_482", x1: "88.6929", y1: "81.4368", x2: "136.488", y2: "81.4368", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_482", x1: "16.9995", y1: "136.102", x2: "72.7605", y2: "136.102", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_482", x1: "88.6929", y1: "128.137", x2: "152.42", y2: "128.137", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_482", x1: "88.6929", y1: "144.068", x2: "136.488", y2: "144.068", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint6_linear_61_482", x1: "16.9995", y1: "5.5", x2: "132", y2: "5.5", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let archiveTitle = attributes.archiveTitle; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var archiveLinkToArgsBasic = { none: { label: "No Link", value: "" }, archiveUrl: { label: "Archive URL", value: "archiveUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, customUrl: { label: "Custom", value: "customUrl" } }; let archiveLinkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("archiveLinkToArgs", archiveLinkToArgsBasic); var archiveTypes = { auto: { label: "Auto Detect", value: "auto" } // 'author': { label: 'Author', value: 'author' }, // 'category': { label: 'Category', value: 'category' }, // 'tag': { label: 'Tag', value: 'tag' }, // 'taxonomy': { label: 'Taxonomy', value: 'taxonomy' }, // 'search': { label: 'Search', value: 'search' }, // 'index': { label: 'Index', value: 'index' }, // 'year': { label: 'Year', value: 'year' }, // 'month': { label: 'Month', value: 'month' }, // 'date': { label: 'Date', value: 'date' }, // 'wcCatalog': { label: 'WooCommerce Catalog', value: 'wcCatalog' }, // 'wcSearch': { label: 'WooCommerce Search', value: 'wcSearch' }, }; var dateFormats = { "Y-M-d": { label: "2022-May-25", value: "Y-M-d" }, "Y-m-d": { label: "2022-05-25", value: "Y-m-d" }, "d-m-y": { label: "25-05-2022", value: "d-m-y" }, "d/m/y": { label: "25/05/2022", value: "d/m/y" }, "y-m-d": { label: "2022-05-25", value: "y-m-d" }, "y/m/d": { label: "2022/05/25", value: "y/m/d" }, "D M y": { label: "Sun May 2022", value: "D M y" }, "D M d, y": { label: "Sun May 11, 2022", value: "D M d, y" }, "M D d, y": { label: "May Sun 11, 2022", value: "M D d, y" }, "M d, y": { label: "May 11, 2022", value: "M d, y" }, "d M y": { label: "25 May 2022", value: "d M y" } }; // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var archiveTitleSelector = ""; if (wrapper.options.tag.length != 0) { if (archiveTitle.options.linkTo.length > 0) { archiveTitleSelector = blockClass + " a"; } else { archiveTitleSelector = blockClass; //archiveTitleSelector = blockClass + ' .archiveTitle'; } } else { archiveTitleSelector = blockClass; } const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const iconSelector = blockClass + " .postdate-icon"; const [archiveTitleEdited, setarchiveTitleEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)("Hello %s"); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"]); setpostfixText(text); }, [postfix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[archiveTitleSelector] = archiveTitle; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function setFieldLinkTo(option, index) { var options = { ...archiveTitle.options, linkTo: option.value }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var archiveType = archiveTitle.options.archiveType; if (archiveType == "auto") { //archiveTitleEdited = archiveTitle.options.customLabel; setarchiveTitleEdited(archiveTitle.options.customLabel); } }, [archiveTitle]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { // var blockId = attributes.blockId var wrapperX = attributes.wrapper; var archiveTitleX = attributes.archiveTitle; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } if (archiveTitleX != undefined) { var archiveTitleY = { ...archiveTitleX, options: archiveTitle.options }; setAttributes({ archiveTitle: archiveTitleY }); blockCssObj[archiveTitleSelector] = archiveTitleY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; console.log(prefixY); setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; console.log(postfixY); setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryArchiveTitle(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; archiveTitle[sudoScource] = sudoScourceArgs; }); var archiveTitleX = Object.assign({}, archiveTitle); setAttributes({ archiveTitle: archiveTitleX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddArchiveTitle(sudoScource, cssObj) { let obj = Object.assign({}, archiveTitle); obj[sudoScource] = cssObj; setAttributes({ archiveTitle: obj }); var selector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onChangeStyleArchiveTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, archiveTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ archiveTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleArchiveTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(archiveTitle, [sudoScource, key, breakPointX]); setAttributes({ archiveTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleArchiveTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, archiveTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ archiveTitle: object }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [archiveTitle]); var linkAttrObj = () => { var sdsd = {}; archiveTitle.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = archiveTitle.options.customUrl != undefined && archiveTitle.options.customUrl.length > 0 ? archiveTitle.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${archiveTitle.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "span", value: "span" }, { label: "div", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Archive Description", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Archive Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: archiveTypes // buttonTitle="Choose" , buttonTitle: archiveTypes[archiveTitle.options.archiveType] != undefined ? archiveTypes[archiveTitle.options.archiveType].label : "Choose", onChange: (option, index) => { var options = { ...archiveTitle.options, archiveType: option.value }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: archiveTitle.options.customLabel, onChange: newVal => { var options = { ...archiveTitle.options, customLabel: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), (archiveTitle.options.archiveType == "year" || archiveTitle.options.archiveType == "month" || archiveTitle.options.archiveType == "day") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Date Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: dateFormats, buttonTitle: "Choose", onChange: (option, index) => { var options = { ...archiveTitle.options, dateFormat: option.value }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: archiveTitle.options.dateFormat, onChange: newVal => { var options = { ...archiveTitle.options, dateFormat: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), dateFormats[archiveTitle.options.dateFormat] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2 my-3 bg-gray-500 text-white" }, dateFormats[archiveTitle.options.dateFormat].label)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: archiveLinkToArgs, buttonTitle: archiveTitle.options.linkTo.length == 0 ? "Choose" : archiveLinkToArgs[archiveTitle.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), archiveTitle.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: archiveTitle.options.linkToMetaKey, onChange: newVal => { var options = { ...archiveTitle.options, linkToMetaKey: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), archiveTitle.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), archiveTitle.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { var options = { ...archiveTitle.options, customUrl: "" }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: archiveTitle.options.customUrl, onChange: newVal => { var options = { ...archiveTitle.options, customUrl: newVal.url }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", archiveTitle.options.customUrl.length != 0 ? archiveTitle.options.customUrl : "No link", " ")))), archiveTitle.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: archiveTitle.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...archiveTitle.options, tag: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), archiveTitle.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: archiveTitle.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...archiveTitle.options, linkTarget: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = archiveTitle.options.linkAttr.concat({ id: "", val: "" }); var options = { ...archiveTitle.options, linkAttr: sdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); linkAttrObj(); } }, "Add")), archiveTitle.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", placeholder: "Name", value: archiveTitle.options.linkAttr[i].id, onChange: newVal => { archiveTitle.options.linkAttr[i].id = newVal; var ssdsd = archiveTitle.options.linkAttr.concat([]); var options = { ...archiveTitle.options, linkAttr: ssdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { archiveTitle.options.linkAttr[i].val = newVal; var ssdsd = archiveTitle.options.linkAttr.concat([]); var options = { ...archiveTitle.options, linkAttr: ssdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { archiveTitle.options.linkAttr.splice(i, 1); var ssdsd = archiveTitle.options.linkAttr.concat([]); var options = { ...archiveTitle.options, linkAttr: ssdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: archiveTitle.options.class, onChange: newVal => { var options = { ...archiveTitle.options, class: newVal }; setAttributes({ archiveTitle: { styles: archiveTitle.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: archiveTitle, onChange: onChangeStyleArchiveTitle, onAdd: onAddStyleArchiveTitle, onRemove: onRemoveStyleArchiveTitle, onBulkAdd: onBulkAddArchiveTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: archiveTitle, onChange: onPickCssLibraryArchiveTitle })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="Icon" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Icon"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Archive Title", value: "beforeArchiveTitle" }, { label: "After Archive Title", value: "afterArchiveTitle" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "archive-description", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "archive-description" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitle.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "archiveTitle", onClick: handleLinkClick }, linkAttrItems, { target: archiveTitle.options.linkTarget, href: postUrl }), icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), archiveTitle.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitle.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "archiveTitle", onClick: handleLinkClick }, linkAttrItems, { target: archiveTitle.options.linkTarget, href: postUrl }), icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), archiveTitle.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/archive-title/index.js": /*!*******************************************!*\ !*** ./src/blocks/archive-title/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/archive-title/block.json"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M68.7781 49.5732H20.9829C19.9266 49.5732 18.9135 49.9929 18.1666 50.7398C17.4196 51.4868 17 52.4998 17 53.5562V93.3855C17 94.4418 17.4196 95.4549 18.1666 96.2018C18.9135 96.9488 19.9266 97.3684 20.9829 97.3684H68.7781C69.8344 97.3684 70.8475 96.9488 71.5945 96.2018C72.3414 95.4549 72.761 94.4418 72.761 93.3855V53.5562C72.761 52.4998 72.3414 51.4868 71.5945 50.7398C70.8475 49.9929 69.8344 49.5732 68.7781 49.5732ZM64.7952 89.4025H24.9659V57.5391H64.7952V89.4025Z", fill: "url(#paint0_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M152.42 61.5222H88.6934V69.4881H152.42V61.5222Z", fill: "url(#paint1_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M136.489 77.4539H88.6934V85.4197H136.489V77.4539Z", fill: "url(#paint2_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M68.7781 112.205H20.9829C19.9266 112.205 18.9135 112.624 18.1666 113.371C17.4196 114.118 17 115.131 17 116.188V156.017C17 157.073 17.4196 158.086 18.1666 158.833C18.9135 159.58 19.9266 160 20.9829 160H68.7781C69.8344 160 70.8475 159.58 71.5945 158.833C72.3414 158.086 72.761 157.073 72.761 156.017V116.188C72.761 115.131 72.3414 114.118 71.5945 113.371C70.8475 112.624 69.8344 112.205 68.7781 112.205ZM64.7952 152.034H24.9659V120.171H64.7952V152.034Z", fill: "url(#paint3_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M152.42 124.154H88.6934V132.12H152.42V124.154Z", fill: "url(#paint4_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M136.489 140.085H88.6934V148.051H136.489V140.085Z", fill: "url(#paint5_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M132 0H17V11H132V0Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M83 28H17V33H83V28Z", fill: "url(#paint6_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M103 19H17V24H103V19Z", fill: "url(#paint7_linear_61_454)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_454", x1: "17", y1: "73.4708", x2: "72.761", y2: "73.4708", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_454", x1: "88.6934", y1: "65.5051", x2: "152.42", y2: "65.5051", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_454", x1: "88.6934", y1: "81.4368", x2: "136.489", y2: "81.4368", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_454", x1: "17", y1: "136.102", x2: "72.761", y2: "136.102", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_454", x1: "88.6934", y1: "128.137", x2: "152.42", y2: "128.137", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_454", x1: "88.6934", y1: "144.068", x2: "136.489", y2: "144.068", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint6_linear_61_454", x1: "17", y1: "30.5", x2: "83", y2: "30.5", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint7_linear_61_454", x1: "17", y1: "21.5", x2: "103", y2: "21.5", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/search"], transform: attributes => { // var content = attributes.content; // var linkTarget = attributes.linkTarget; // console.log(attributes); // { // "label": "Search", // "showLabel": true, // "placeholder": "", // "buttonText": "Search", // "buttonPosition": "button-outside", // "buttonUseIcon": false, // "query": [], // "buttonBehavior": "expand-searchfield", // "isSearchFieldHidden": false // } // return createBlock("post-grid/read-more", { // readMore: { // options: { // text: content, // linkTarget: linkTarget, // linkTo: "postUrl", // linkAttr: [], // }, // }, // }); } }], to: [{ type: "block", blocks: ["core/read-more"], transform: attributes => { // var content = attributes.readMore; // console.log(attributes); // return createBlock("core/read-more", { // content: content.options.text, // linkTarget: content.options.linkTarget, // }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let archiveTitle = attributes.archiveTitle; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; const wrapperSelector = blockClass; var archiveTitleSelector = "archive"; if (wrapper.options.tag.length != 0) { if (archiveTitle.options.linkTo.length > 0) { archiveTitleSelector = blockClass + " a"; } else { archiveTitleSelector = blockClass; //archiveTitleSelector = blockClass + ' .archiveTitle'; } } else { archiveTitleSelector = blockClass; } const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const iconSelector = blockClass + " .icon"; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"]); setpostfixText(text); }, [postfix.options.text]); var archiveTypes = { auto: { label: "Auto Detect", value: "auto" } // 'author': { label: 'Author', value: 'author' }, // 'category': { label: 'Category', value: 'category' }, // 'tag': { label: 'Tag', value: 'tag' }, // 'taxonomy': { label: 'Taxonomy', value: 'taxonomy' }, // 'search': { label: 'Search', value: 'search' }, // 'index': { label: 'Index', value: 'index' }, // 'year': { label: 'Year', value: 'year' }, // 'month': { label: 'Month', value: 'month' }, // 'date': { label: 'Date', value: 'date' }, // 'wcCatalog': { label: 'WooCommerce Catalog', value: 'wcCatalog' }, // 'wcSearch': { label: 'WooCommerce Search', value: 'wcSearch' }, }; var archiveLinkToArgsBasic = { none: { label: "No Link", value: "" }, archiveUrl: { label: "Archive URL", value: "archiveUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, customUrl: { label: "Custom", value: "customUrl" } }; let archiveLinkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("archiveLinkToArgs", archiveLinkToArgsBasic); var dateFormats = { "Y-M-d": { label: "2022-May-25", value: "Y-M-d" }, "Y-m-d": { label: "2022-05-25", value: "Y-m-d" }, "d-m-y": { label: "25-05-2022", value: "d-m-y" }, "d/m/y": { label: "25/05/2022", value: "d/m/y" }, "y-m-d": { label: "2022-05-25", value: "y-m-d" }, "y/m/d": { label: "2022/05/25", value: "y/m/d" }, "D M y": { label: "Sun May 2022", value: "D M y" }, "D M d, y": { label: "Sun May 11, 2022", value: "D M d, y" }, "M D d, y": { label: "May Sun 11, 2022", value: "M D d, y" }, "M d, y": { label: "May 11, 2022", value: "M d, y" }, "d M y": { label: "25 May 2022", value: "d M y" } }; const [archiveTitleEdited, setarchiveTitleEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)("Hello %s"); function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; // console.log(wrapperSelector); blockCssObj[wrapperSelector] = wrapper; blockCssObj[archiveTitleSelector] = archiveTitle; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var archiveType = archiveTitle.options.archiveType; if (archiveType == "auto") { //archiveTitleEdited = archiveTitle.options.customLabel; setarchiveTitleEdited(archiveTitle.options.customLabel); } }, [archiveTitle]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { // var blockId = attributes.blockId var wrapperX = attributes.wrapper; var archiveTitleX = attributes.archiveTitle; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } if (archiveTitleX != undefined) { var archiveTitleY = { ...archiveTitleX, options: archiveTitle.options }; setAttributes({ archiveTitle: archiveTitleY }); blockCssObj[archiveTitleSelector] = archiveTitleY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; console.log(prefixY); setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; console.log(postfixY); setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function setFieldLinkTo(option, index) { var options = { ...archiveTitle.options, linkTo: option.value }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryArchiveTitle(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; archiveTitle[sudoScource] = sudoScourceArgs; }); var archiveTitleX = Object.assign({}, archiveTitle); setAttributes({ archiveTitle: archiveTitleX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleArchiveTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, archiveTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ archiveTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleArchiveTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(archiveTitle, [sudoScource, key, breakPointX]); setAttributes({ archiveTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleArchiveTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, archiveTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ archiveTitle: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var sudoScourceX = { ...prefix[sudoScource] }; sudoScourceX[key] = {}; prefix[sudoScource] = sudoScourceX; setAttributes({ prefix: { ...prefix } }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddArchiveTitle(sudoScource, cssObj) { let obj = Object.assign({}, archiveTitle); obj[sudoScource] = cssObj; setAttributes({ archiveTitle: obj }); var selector = myStore.getElementSelector(sudoScource, archiveTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); // Wrapper CSS Class Selectors function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [archiveTitle]); var linkAttrObj = () => { var sdsd = {}; archiveTitle.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = archiveTitle.options.customUrl != undefined && archiveTitle.options.customUrl.length > 0 ? archiveTitle.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${archiveTitle.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Archive Title", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Archive Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: archiveTypes // buttonTitle="Choose" , buttonTitle: archiveTypes[archiveTitle.options.archiveType] != undefined ? archiveTypes[archiveTitle.options.archiveType].label : "Choose", onChange: (option, index) => { var options = { ...archiveTitle.options, archiveType: option.value }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", value: archiveTitle.options.customLabel, onChange: newVal => { var options = { ...archiveTitle.options, customLabel: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), (archiveTitle.options.archiveType == "year" || archiveTitle.options.archiveType == "month" || archiveTitle.options.archiveType == "day") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Date Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: dateFormats, buttonTitle: "Choose", onChange: (option, index) => { var options = { ...archiveTitle.options, dateFormat: option.value }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", value: archiveTitle.options.dateFormat, onChange: newVal => { var options = { ...archiveTitle.options, dateFormat: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), dateFormats[archiveTitle.options.dateFormat] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2 my-3 bg-gray-500 text-white" }, dateFormats[archiveTitle.options.dateFormat].label)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: archiveLinkToArgs, buttonTitle: archiveTitle.options.linkTo.length == 0 ? "Choose" : archiveLinkToArgs[archiveTitle.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), archiveTitle.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), archiveTitle.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { var options = { ...archiveTitle.options, customUrl: "" }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.__experimentalLinkControl, { settings: [], value: archiveTitle.options.customUrl, onChange: newVal => { var options = { ...archiveTitle.options, customUrl: newVal.url }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", archiveTitle.options.customUrl.length != 0 ? archiveTitle.options.customUrl : "No link", " ")))), archiveTitle.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: archiveTitle.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...archiveTitle.options, tag: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), archiveTitle.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: archiveTitle.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...archiveTitle.options, linkTarget: newVal }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = archiveTitle.options.linkAttr.concat({ id: "", val: "" }); var options = { ...archiveTitle.options, linkAttr: sdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); linkAttrObj(); } }, "Add")), archiveTitle.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", placeholder: "Name", value: archiveTitle.options.linkAttr[i].id, onChange: newVal => { archiveTitle.options.linkAttr[i].id = newVal; var ssdsd = archiveTitle.options.linkAttr.concat([]); var options = { ...archiveTitle.options, linkAttr: ssdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { archiveTitle.options.linkAttr[i].val = newVal; var ssdsd = archiveTitle.options.linkAttr.concat([]); var options = { ...archiveTitle.options, linkAttr: ssdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { archiveTitle.options.linkAttr.splice(i, 1); var ssdsd = archiveTitle.options.linkAttr.concat([]); var options = { ...archiveTitle.options, linkAttr: ssdsd }; setAttributes({ archiveTitle: { ...archiveTitle, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "CSS Class", placeholder: "Add Class", value: archiveTitle.options.class, onChange: newVal => { var options = { ...archiveTitle.options, class: newVal }; setAttributes({ archiveTitle: { styles: archiveTitle.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: archiveTitle, onChange: onChangeStyleArchiveTitle, onAdd: onAddStyleArchiveTitle, onRemove: onRemoveStyleArchiveTitle, onBulkAdd: onBulkAddArchiveTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: archiveTitle, onChange: onPickCssLibraryArchiveTitle })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Icon" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Icon"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Archive Title", value: "beforeArchiveTitle" }, { label: "After Archive Title", value: "afterArchiveTitle" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "archive-title", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "archive-title" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitle.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "archiveTitle", onClick: handleLinkClick }, linkAttrItems, { target: archiveTitle.options.linkTarget, href: postUrl }), icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), archiveTitle.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitle.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "archiveTitle", onClick: handleLinkClick }, linkAttrItems, { target: archiveTitle.options.linkTarget, href: postUrl }), "A", icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), archiveTitle.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforeArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), archiveTitleEdited, icon.options.position == "afterArchiveTitle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/breadcrumb/index.js": /*!****************************************!*\ !*** ./src/blocks/breadcrumb/index.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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 react_sortablejs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_icon_toggle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-toggle */ "./src/components/icon-toggle/index.js"); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/breadcrumb/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M159.996 80.3332C159.996 80.7777 159.551 81.2221 159.551 81.6666L148.44 91.4443C147.551 91.8888 146.662 91.8888 146.218 91.4443C145.773 90.5554 145.773 89.6666 146.218 89.2221L155.996 80.7777L146.218 72.3332C145.329 71.8888 145.329 70.5554 146.218 70.111C146.662 69.2221 147.996 69.2221 148.44 70.111L159.551 79.8888C159.996 79.4443 159.996 79.8888 159.996 80.3332Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M75.107 80.3333C75.107 80.7778 74.6626 81.2222 74.6626 81.6667L63.5515 91C62.6626 91.4444 61.7737 91.4444 61.3293 91C60.8848 90.1111 60.8848 89.2222 61.3293 88.7778L71.107 80.3333L61.3293 71.8889C60.4404 71.4444 60.4404 70.1111 61.3293 69.6667C61.7737 68.7778 63.107 68.7778 63.5515 69.6667L74.6626 79.4444C75.107 79.4444 75.107 79.8889 75.107 80.3333Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M47.5517 69.2222H-0.00390625V91.4444H47.5517V69.2222Z", fill: "url(#paint0_linear_61_603)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M36.4403 77.2222H11.1069V82.9999H36.4403V77.2222Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M131.996 69.2222H84.8853V91.4444H132.441V69.2222H131.996Z", fill: "url(#paint1_linear_61_603)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M120.885 77.2222H95.5518V82.9999H120.885V77.2222Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_603", x1: "-0.00390625", y1: "80.3333", x2: "47.5517", y2: "80.3333", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_603", x1: "84.8853", y1: "80.3333", x2: "132.441", y2: "80.3333", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var elements = attributes.elements; var icon = attributes.icon; var label = attributes.label; var separator = attributes.separator; var schema = attributes.schema; var link = attributes.link; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var utmTracking = attributes.utmTracking; var wrapperSelector = blockClass; // Wrapper CSS Class Selectors var itemSelector = blockClass + " .item"; var linkSelector = blockClass + " .item a"; var iconSelector = blockClass + " .item .icon"; var labelSelector = blockClass + " .item .label"; var separatorSelector = blockClass + " .item .separator"; var [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.getBreakPoint()); var [loading, setLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; // blockCssObj[itemSelector] = elements; blockCssObj[iconSelector] = icon; blockCssObj[labelSelector] = label; blockCssObj[linkSelector] = link; blockCssObj[separatorSelector] = separator; var blockCssRules = myStore.getBlockCssRules(blockCssObj); console.log(blockCssRules); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { elements.items.map((x, index) => { var styles = x.styles; Object.entries(styles).map(y => { var attrId = y[0]; var attrVal = y[1]; if (Object.keys(attrVal).length != 0) { var attrIdX = ""; if (attrId == "backgroundColor") { attrIdX = "background-color"; } else if (attrId == "textAlign") { attrIdX = "text-align"; } else { attrIdX = attrId; } if (blockCssY.items[itemSelector + ".item-" + index + " a"] == undefined) { blockCssY.items[itemSelector + ".item-" + index + " a"] = {}; blockCssY.items[itemSelector + ".item-" + index + " a"][attrIdX] = attrVal; } else { blockCssY.items[itemSelector + ".item-" + index + " a"][attrIdX] = attrVal; } if (blockCssY.items[itemSelector + ".item-" + index] == undefined) { blockCssY.items[itemSelector + ".item-" + index] = {}; blockCssY.items[itemSelector + ".item-" + index][attrIdX] = attrVal; } else { blockCssY.items[itemSelector + ".item-" + index][attrIdX] = attrVal; } setAttributes({ blockCssY: { items: blockCssY.items } }); } }); }); setTimeout(x => { //setAttributes({ blockCssY: { items: newValuesObjX } }); }, 2000); }, [elements]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { // var blockId = attributes.blockId var wrapperX = attributes.wrapper; var iconX = attributes.icon; var labelX = attributes.label; var separatorX = attributes.separator; var elementsX = attributes.elements; var schemaX = attributes.schema; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; console.log(iconY); setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (labelX != undefined) { var labelY = { ...labelX, options: label.options }; console.log(labelY); setAttributes({ label: labelY }); blockCssObj[labelSelector] = labelY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; console.log(separatorY); setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (elementsX != undefined) { var elementsY = { ...elementsX, options: elements.options }; console.log(elementsY); setAttributes({ elements: elementsY }); blockCssObj[itemSelector] = elementsY; } if (schemaX != undefined) { var schemaY = { ...schemaX, options: schema.options }; console.log(schemaY); setAttributes({ schema: schemaY }); blockCssObj[schemaSelector] = schemaY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } var linkElementsArgsBasic = [{ id: "text", label: "Text", customText: "You are here: ", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { text: "You are here: ", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "homePage", label: "Home Page Link", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "frontPage", label: "Front Page Link", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postsPage", label: "Posts Page Link", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postTitle", label: "Post Title", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postAuthor", label: "Post Author", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postDate", label: "Post Date", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { format: "Y-m-d", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postDay", label: "Post Day", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { format: "", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postMonth", label: "Post Month", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { format: "", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postYear", label: "Post Year", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { format: "", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postAncestors", isPro: true, label: "Post Ancestors", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, count: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postId", label: "Post Id", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postCategory", label: "Post Category", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postTag", label: "Post Tag", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postCategories", isPro: true, label: "Post Categories", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, maxCount: 3 }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postTags", isPro: true, label: "Post Tags", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, maxCount: 3 }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postTerm", isPro: true, label: "Post Term", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { taxonomy: "", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "postTerms", isPro: true, label: "Post Terms", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { taxonomy: "", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "termTitle", label: "Term Title", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "termParents", isPro: true, label: "Term Parents", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, count: 0 }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "termAncestors", isPro: true, label: "Term Ancestors", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { taxonomy: "", showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "wcShop", label: "WooCommerce Shop", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "wcAccount", label: "WooCommerce Account", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "wcCart", label: "WooCommerce Cart", isPro: true, customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "wcCheckout", label: "WooCommerce Checkout", isPro: true, customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "searchText", label: "Search Text", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "archiveTitle", label: "Archive Title", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "404Text", label: "404 Text", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "dateText", label: "Date Text", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, format: "Y-m-d" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "monthText", label: "Month Text", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, format: "Y-m" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "yearText", label: "Year Text", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true, format: "Y" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "authorName", label: "Author Name", customText: "%s", url: "", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: { showSeparator: true }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }]; let linkElementsArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("linkElementsArgs", linkElementsArgsBasic); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); function addMedia(option, index) { var elementsX = elements.items.push(option); setAttributes({ elements: { ...elements, items: elements.items } }); } var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleElements(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, elements); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ elements: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleElements(sudoScource, key) { var object = myStore.deletePropertyDeep(elements, [sudoScource, key, breakPointX]); setAttributes({ elements: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleElements(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, elements); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ elements: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onChangeStyleLink(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, link); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ link: object }); var elementSelector = myStore.getElementSelector(sudoScource, linkSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLink(sudoScource, key) { var object = myStore.deletePropertyDeep(link, [sudoScource, key, breakPointX]); setAttributes({ link: object }); var elementSelector = myStore.getElementSelector(sudoScource, linkSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLink(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, link); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ link: object }); } function onChangeStyleSeparator(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSeparator(sudoScource, key) { var object = myStore.deletePropertyDeep(separator, [sudoScource, key, breakPointX]); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSeparator(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ separator: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, elements); obj[sudoScource] = cssObj; setAttributes({ elements: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLink(sudoScource, cssObj) { let obj = Object.assign({}, link); obj[sudoScource] = cssObj; setAttributes({ link: obj }); var selector = myStore.getElementSelector(sudoScource, linkSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSeperator(sudoScource, cssObj) { let obj = Object.assign({}, separator); obj[sudoScource] = cssObj; setAttributes({ separator: obj }); var selector = myStore.getElementSelector(sudoScource, separatorSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeBreakPoint(x, index) { var asdsdsd = wp.data.dispatch("postgrid-shop").setBreakPoint(x.value); asdsdsd.then(res => { setBreakPointX(res.breakpoint); myStore.generateBlockCss(blockCssY.items, blockId); }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); let counts = 0; function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var index = extra.index; var path = [sudoScource, attr, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.updatePropertyDeep(objX, path, newVal); var elementsX = { ...elements }; elementsX.items[index] = object; setAttributes({ elements: elementsX }); //setAttributes({ obj: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(attr); // let itemsX = Object.assign({}, blockCssY.items); // if (itemsX[elementSelector] == undefined) { // itemsX[elementSelector] = {}; // } // var cssPath = [elementSelector, cssPropty, breakPointX] // const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal) // setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var object = myStore.deletePropertyDeep(obj, [sudoScource, key, breakPointX]); var elementsX = { ...elements }; elementsX.items[index] = object; setAttributes({ elements: elementsX }); //setAttributes({ items: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(key); // var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); // setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var path = [sudoScource, key, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.addPropertyDeep(objX, path, ""); var elementsX = { ...elements }; elementsX.items[index] = object; setAttributes({ elements: elementsX }); //setAttributes({ items: object }); // setAttributes({ items: itemsX }); } // function onBulkAddItem(sudoScource, cssObj) { // let obj = Object.assign({}, items); // obj[sudoScource] = cssObj; // setAttributes({ items: obj }); // var selector = myStore.getElementSelector(sudoScource, itemSelector); // var stylesObj = {}; // Object.entries(cssObj).map((args) => { // var attr = args[0]; // var cssPropty = myStore.cssAttrParse(attr); // if (stylesObj[selector] == undefined) { // stylesObj[selector] = {}; // } // if (stylesObj[selector][cssPropty] == undefined) { // stylesObj[selector][cssPropty] = {}; // } // stylesObj[selector][cssPropty] = args[1]; // }); // var cssItems = { ...blockCssY.items }; // var cssItemsX = { ...cssItems, ...stylesObj }; // setAttributes({ blockCssY: { items: cssItemsX } }); // } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add Element"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: linkElementsArgs, buttonTitle: "Choose", onChange: addMedia, values: "" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__.ReactSortable, { list: elements.items, handle: ".handle", setList: item => { setAttributes({ elements: { ...elements, items: item } }); } }, elements.items.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var elementsX = elements.items.splice(index, 1); setAttributes({ elements: { ...elements, items: elements.items } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, item.label)), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.customText, placeholder: "You Text: %s", onChange: newVal => { elements.items[index].customText = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Please use ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "%s"), " for output")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.url, onChange: newVal => { elements.items[index].url = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } })), (item.id == "postTerms" || item.id == "postTerm") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.options.taxonomy, onChange: newVal => { elements.items[index].options.taxonomy = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } })), (item.id == "termParents" || item.id == "postAncestors") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Max Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.options.count, onChange: newVal => { elements.items[index].options.count = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Use ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "-"), " (negetive sign) to count from end."))), (item.id == "dateText" || item.id == "monthText" || item.id == "yearText" || item.id == "postDate" || item.id == "postDay" || item.id == "postMonth" || item.id == "postYear") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Date Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.options.format, onChange: newVal => { elements.items[index].options.format = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { library: item.siteIcon.library, srcType: item.siteIcon.srcType, iconSrc: item.siteIcon.iconSrc, onChange: arg => { //var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; //setAttributes({ icon: { ...icon, options: options } }); elements.items[index].siteIcon = { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ elements: { ...elements, items: elements.items } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: item, extra: { index: index }, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem // onBulkAdd={onBulkAddItem} }))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { className: "my-3", label: "Display Label?", help: elements.options.showLabel ? "Label is displaying" : "Label is hidden", checked: elements.options.showLabel ? true : false, onChange: e => { var options = { ...elements.options, showLabel: elements.options.showLabel ? false : true }; setAttributes({ elements: { ...elements, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { className: "my-3", disabled: isProFeature, label: "Display Icon?", help: elements.options.showIcon ? "Icon is displaying" : "Icon is hidden", checked: elements.options.showIcon ? true : false, onChange: e => { var options = { ...elements.options, showIcon: elements.options.showIcon ? false : true }; setAttributes({ elements: { ...elements, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-amber-400 rounded-sm py-1 px-3 text-white hover:text-white" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { target: "_blank", href: "https://pickplugins.com/post-grid/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label }, "Pro")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { className: "my-3", label: "Display Separator?", help: elements.options.showSeparator ? "Separator is displaying" : "Separator is hidden", checked: elements.options.showSeparator ? true : false, onChange: e => { var options = { ...elements.options, showSeparator: elements.options.showSeparator ? false : true }; setAttributes({ elements: { ...elements, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: elements, onChange: onChangeStyleElements, onAdd: onAddStyleElements, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleElements })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Icon" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Icon"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Label", value: "beforeLabel" }, { label: "After Label", value: "afterLabel" }, { label: "Before Separator", value: "beforeSeparator" }, { label: "After Separator", value: "afterSeparator" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: icon, onChange: onChangeStyleIcon, onBulkAdd: onBulkAddIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onBulkAdd: onBulkAddLabel, onRemove: onRemoveStyleLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Link", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: link, onChange: onChangeStyleLink, onAdd: onAddStyleLink, onBulkAdd: onBulkAddLink, onRemove: onRemoveStyleLink })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Separator", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: separator.options.text, onChange: newVal => { var options = { ...separator.options, text: newVal }; setAttributes({ separator: { ...separator, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: separator, onChange: onChangeStyleSeparator, onAdd: onAddStyleSeparator, onBulkAdd: onBulkAddSeperator, onRemove: onRemoveStyleSeparator })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Schema" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Schema"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "Enable Schema?", help: schema.options.enable ? "Schema Enabled" : "Schema Disabled.", checked: schema.options.enable ? true : false, onChange: e => { var options = { ...schema.options, enable: schema.options.enable ? false : true }; setAttributes({ schema: { ...schema, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_18__["default"], { blockName: "breadcrumb", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_15__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_16__["default"], { utm: { utm_source: "BlockPostExcerpt", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "breadcrumb" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ol", blockProps, elements.items.map((x, index) => { counts++; const showSeparator = counts < elements.items.length; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", { className: "item item-" + index }, x.url.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: x.url }, elements.options.showIcon && icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), elements.options.showLabel && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "label" }, x.customText.length > 0 ? x.customText : x.label), elements.options.showIcon && icon.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` })), x.url.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, elements.options.showIcon && icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), elements.options.showLabel && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "label" }, x.customText.length > 0 ? x.customText : x.label), elements.options.showIcon && icon.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` })), elements.options.showSeparator && showSeparator && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, elements.options.showIcon && icon.options.position == "beforeSeparator" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), showSeparator && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "separator" }, separator.options.text), elements.options.showIcon && icon.options.position == "afterSeparator" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }))); }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/content-slider-item/index.js": /*!*************************************************!*\ !*** ./src/blocks/content-slider-item/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./block.json */ "./src/blocks/content-slider-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_17__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M28.9122 58H2.22402C1.63417 58 1.06848 58.2343 0.6514 58.6514C0.234316 59.0685 0 59.6342 0 60.224V82.4642C0 83.054 0.234316 83.6197 0.6514 84.0368C1.06848 84.4539 1.63417 84.6882 2.22402 84.6882H28.9122C29.5021 84.6882 30.0678 84.4539 30.4848 84.0368C30.9019 83.6197 31.1362 83.054 31.1362 82.4642V60.224C31.1362 59.6342 30.9019 59.0685 30.4848 58.6514C30.0678 58.2343 29.5021 58 28.9122 58ZM26.6882 80.2402H4.44803V62.448H26.6882V80.2402Z", fill: "url(#paint0_linear_67_1013)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M75.617 64.6719H40.0327V69.1199H75.617V64.6719Z", fill: "url(#paint1_linear_67_1013)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M66.7209 73.5679H40.0327V78.0159H66.7209V73.5679Z", fill: "url(#paint2_linear_67_1013)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M113.296 58H86.6073C86.0175 58 85.4518 58.2343 85.0347 58.6514C84.6176 59.0685 84.3833 59.6342 84.3833 60.224V82.4642C84.3833 83.054 84.6176 83.6197 85.0347 84.0368C85.4518 84.4539 86.0175 84.6882 86.6073 84.6882H113.296C113.885 84.6882 114.451 84.4539 114.868 84.0368C115.285 83.6197 115.52 83.054 115.52 82.4642V60.224C115.52 59.6342 115.285 59.0685 114.868 58.6514C114.451 58.2343 113.885 58 113.296 58ZM111.072 80.2402H88.8313V62.448H111.072V80.2402Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 64.6719H124.416V69.1199H160V64.6719Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M151.104 73.5679H124.416V78.0159H151.104V73.5679Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { cx: "80", cy: "98.6885", r: "4", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { cx: "98", cy: "98.6885", r: "4", fill: "url(#paint3_linear_67_1013)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { cx: "62", cy: "98.6885", r: "4", fill: "url(#paint4_linear_67_1013)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_67_1013", x1: "0", y1: "71.3441", x2: "31.1362", y2: "71.3441", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_67_1013", x1: "40.0327", y1: "66.8959", x2: "75.617", y2: "66.8959", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_67_1013", x1: "40.0327", y1: "75.7919", x2: "66.7209", y2: "75.7919", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_67_1013", x1: "94", y1: "98.6885", x2: "102", y2: "98.6885", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_67_1013", x1: "58", y1: "98.6885", x2: "66", y2: "98.6885", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function generateElementSudoCss(obj) { var stylesObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options") { var selector = myStore.getElementSelector(sudoSrc, wrapperSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); } }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var elementCss = generateElementSudoCss(wrapper); }, [wrapper]); function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [ //['core/paragraph', { placeholder: '', content: 'Hello Text...' }], ]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} splide__slide border border-dashed` }); //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_19__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", innerBlocksProps, innerBlocksProps.children)); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} pg-content-slider-item` }); const { children, ...innerBlocksProps } = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps.save(blockProps); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, children); } }); /***/ }), /***/ "./src/blocks/content-slider/index.js": /*!********************************************!*\ !*** ./src/blocks/content-slider/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _splidejs_react_splide__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @splidejs/react-splide */ "./node_modules/@splidejs/react-splide/dist/js/react-splide.esm.js"); /* harmony import */ var _components_icon_toggle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-toggle */ "./src/components/icon-toggle/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./variations */ "./src/blocks/content-slider/variations.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _splidejs_splide_dist_css_splide_core_min_css__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @splidejs/splide/dist/css/splide-core.min.css */ "./node_modules/@splidejs/splide/dist/css/splide-core.min.css"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./block.json */ "./src/blocks/content-slider/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; //import Splide from '@splidejs/splide'; //import '@splidejs/splide/dist/css/themes/splide-skyblue.min.css'; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_24__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M28.9103 58H2.22206C1.63222 58 1.06653 58.2343 0.649447 58.6514C0.232363 59.0685 -0.00195313 59.6342 -0.00195312 60.224V82.4642C-0.00195313 83.054 0.232363 83.6197 0.649447 84.0368C1.06653 84.4539 1.63222 84.6882 2.22206 84.6882H28.9103C29.5001 84.6882 30.0658 84.4539 30.4829 84.0368C30.9 83.6197 31.1343 83.054 31.1343 82.4642V60.224C31.1343 59.6342 30.9 59.0685 30.4829 58.6514C30.0658 58.2343 29.5001 58 28.9103 58ZM26.6862 80.2402H4.44608V62.448H26.6862V80.2402Z", fill: "url(#paint0_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M75.615 64.6719H40.0308V69.1199H75.615V64.6719Z", fill: "url(#paint1_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M66.719 73.5679H40.0308V78.0159H66.719V73.5679Z", fill: "url(#paint2_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M113.294 58H86.6054C86.0155 58 85.4498 58.2343 85.0327 58.6514C84.6157 59.0685 84.3813 59.6342 84.3813 60.224V82.4642C84.3813 83.054 84.6157 83.6197 85.0327 84.0368C85.4498 84.4539 86.0155 84.6882 86.6054 84.6882H113.294C113.883 84.6882 114.449 84.4539 114.866 84.0368C115.283 83.6197 115.518 83.054 115.518 82.4642V60.224C115.518 59.6342 115.283 59.0685 114.866 58.6514C114.449 58.2343 113.883 58 113.294 58ZM111.07 80.2402H88.8294V62.448H111.07V80.2402Z", fill: "url(#paint3_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.998 64.6719H124.414V69.1199H159.998V64.6719Z", fill: "url(#paint4_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M151.102 73.5679H124.414V78.0159H151.102V73.5679Z", fill: "url(#paint5_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("circle", { cx: "79.998", cy: "98.6885", r: "4", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("circle", { cx: "97.998", cy: "98.6885", r: "4", fill: "url(#paint6_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("circle", { cx: "61.998", cy: "98.6885", r: "4", fill: "url(#paint7_linear_61_94)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_94", x1: "-0.00195313", y1: "71.3441", x2: "31.1343", y2: "71.3441", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_94", x1: "40.0308", y1: "66.8959", x2: "75.615", y2: "66.8959", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_94", x1: "40.0308", y1: "75.7919", x2: "66.719", y2: "75.7919", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_94", x1: "84.3813", y1: "71.3441", x2: "115.518", y2: "71.3441", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_94", x1: "124.414", y1: "66.8959", x2: "159.998", y2: "66.8959", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_94", x1: "124.414", y1: "75.7919", x2: "151.102", y2: "75.7919", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint6_linear_61_94", x1: "93.998", y1: "98.6885", x2: "101.998", y2: "98.6885", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint7_linear_61_94", x1: "57.998", y1: "98.6885", x2: "65.998", y2: "98.6885", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var perv = attributes.perv; var next = attributes.next; var pagination = attributes.pagination; var paginationActive = attributes.paginationActive; var pervIcon = attributes.pervIcon; var nextIcon = attributes.nextIcon; var navsWrap = attributes.navsWrap; var paginationWrap = attributes.paginationWrap; var sliderOptions = attributes.sliderOptions; var sliderOptionsRes = attributes.sliderOptionsRes; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; //var breakPointX = myStore.getBreakPoint(); const [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore != null ? myStore.getBreakPoint() : "Desktop"); // Wrapper CSS Class Selectors //var wrapperSelector = blockClass; var wrapperSelector = blockClass + " .splide"; var nextSelector = blockClass + " .splide__arrow--next"; var pervSelector = blockClass + " .splide__arrow--prev"; var nextIconSelector = blockClass + " .splide__arrow--next .icon"; var pervIconSelector = blockClass + " .splide__arrow--prev .icon"; var navsWrapSelector = blockClass + " .splide__arrows"; var paginationWrapSelector = blockClass + " .splide__pagination"; var paginationSelector = blockClass + " .splide__pagination__page"; var paginationActiveSelector = blockClass + " .splide__pagination__page.is-active"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[nextSelector] = next; blockCssObj[pervSelector] = perv; blockCssObj[nextIconSelector] = nextIcon; blockCssObj[pervIconSelector] = pervIcon; blockCssObj[navsWrapSelector] = navsWrap; blockCssObj[paginationWrapSelector] = paginationWrap; blockCssObj[paginationSelector] = pagination; blockCssObj[paginationActiveSelector] = paginationActive; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); var sliderOptionsArgs = { autoplay: { label: "Auto play", value: 1 }, interval: { label: "Interval", value: "500" }, pauseOnHover: { label: "Pause On Hover", value: 1 }, pauseOnFocus: { label: "Pause On Focus", value: 1 }, lazyLoad: { label: "Lazy Load", value: 1 }, preloadPages: { label: "Preload Pages", value: 1 }, keyboard: { label: "Keyboard", value: 1 }, wheel: { label: "Wheel", value: 1 }, direction: { label: "Direction", value: "ltr" }, cover: { label: "Cover", value: 0 }, rewind: { label: "Rewind", value: 0 }, speed: { label: "Speed", value: 400 }, rewindSpeed: { label: "Rewind Speed", value: 400 }, rewindByDrag: { label: "Rewind By Drag", value: 0 }, width: { label: "Width", value: "" }, height: { label: "Height", value: "" }, fixedWidth: { label: "Fixed Width", value: "" }, fixedHeight: { label: "Fixed Height", value: "" }, heightRatio: { label: "Height Ratio", value: "" }, autoWidth: { label: "Auto Width", value: 0 }, autoHeight: { label: "Auto Height", value: 0 }, start: { label: "Start", value: 0 }, perPage: { label: "Per Page", value: 3 }, perMove: { label: "Per Move", value: 3 }, focus: { label: "Focus", value: "center" }, gap: { label: "Gap", value: "1em" }, padding: { label: "Padding", value: "" }, arrows: { label: "Arrows", value: 1 }, pagination: { label: "Pagination", value: 1 }, //easing: { label: 'Easing', value: 'cubic-bezier(0.25, 1, 0.5, 1)' }, paginationKeyboard: { label: "Pagination Keyboard", value: 1 }, paginationDirection: { label: "Pagination Direction", value: "paginationDirectltrion" }, drag: { label: "Drag", value: 1 }, noDrag: { label: "No Drag", value: "input, textarea, .rich-text" }, snap: { label: "Snap", value: 1 }, mediaQuery: { label: "Media Query", value: "max" } }; var sliderOptionsArgsRes = { rewind: { label: "Rewind", value: 0 }, speed: { label: "Speed", value: 400 }, rewindSpeed: { label: "Rewind Speed", value: 400 }, rewindByDrag: { label: "Rewind By Drag", value: 0 }, width: { label: "Width", value: "" }, height: { label: "Height", value: "" }, fixedWidth: { label: "Fixed Width", value: "" }, fixedHeight: { label: "Fixed Height", value: "" }, heightRatio: { label: "Height Ratio", value: "" }, perPage: { label: "Per Page", value: 3 }, perMove: { label: "Per Move", value: 3 }, focus: { label: "Focus", value: "center" }, gap: { label: "Gap", value: "1em" }, padding: { label: "Padding", value: "" }, arrows: { label: "Arrows", value: 1 }, pagination: { label: "Pagination", value: 1 }, paginationKeyboard: { label: "Pagination Keyboard", value: 1 }, paginationDirection: { label: "Pagination Direction", value: "paginationDirectltrion" }, drag: { label: "Drag", value: 1 }, snap: { label: "Snap", value: 1 }, keyboard: { label: "Keyboard", value: 1 }, direction: { label: "Direction", value: "ltr" }, easing: { label: "Easing", value: "cubic-bezier(0.25, 1, 0.5, 1)" } }; function onChangeBreakPoint(x, _index) { var asdsdsd = wp.data.dispatch("postgrid-shop").setBreakPoint(x.value); asdsdsd.then(res => { setBreakPointX(res.breakpoint); myStore.generateBlockCss(blockCssY.items, blockId); }); const { __experimentalGetPreviewDeviceType: getPreviewDeviceType } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.select)("core/edit-post"); const gutenbergDeviceType = getPreviewDeviceType(); } const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var args = {}; Object.entries(sliderOptionsRes).map(item => { var id = item[0]; var vals = item[1]; Object.entries(vals).map(arg => { var view = arg[0]; var viewVal = arg[1]; var viewPoint = ""; if (view == "Mobile") { viewPoint = "360"; } else if (view == "Tablet") { viewPoint = "780"; } else if (view == "Desktop") { viewPoint = "1024"; } if (args[viewPoint] == undefined) { args[viewPoint] = {}; } if (args[viewPoint][id] == undefined) { args[viewPoint][id] = ""; } args[viewPoint][id] = viewVal; }); }); if (Object.entries(args).length > 0) { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX["breakpoints"] = args; setAttributes({ sliderOptions: sliderOptionsX }); } }, [sliderOptionsRes]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_9__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_9__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } const addSlide = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/content-slider-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); //setActiveTab(slide.clientId); }; function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var navsWrapX = attributes.navsWrap; var pervX = attributes.perv; var pervIconX = attributes.pervIcon; var nextX = attributes.next; var nextIconX = attributes.nextIcon; var paginationWrapX = attributes.paginationWrap; var paginationX = attributes.pagination; var paginationActiveX = attributes.paginationActive; var sliderOptionsX = attributes.sliderOptions; var sliderOptionsResX = attributes.sliderOptionsRes; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; // if (sliderOptionsResX != undefined) { // var sliderOptionsResY = { // ...sliderOptionsResX, // options: sliderOptionsRes.options, // }; // setAttributes({ sliderOptionsRes: sliderOptionsResY }); // blockCssObj[sliderOptionsResSelector] = sliderOptionsResY; // } if (sliderOptionsX != undefined) { var sliderOptionsY = { ...sliderOptionsX, options: sliderOptions.options }; setAttributes({ sliderOptions: sliderOptionsY }); blockCssObj[sliderOptionsSelector] = sliderOptionsY; } if (paginationActiveX != undefined) { var paginationActiveY = { ...paginationActiveX, options: paginationActive.options }; setAttributes({ paginationActive: paginationActiveY }); blockCssObj[paginationActiveSelector] = paginationActiveY; } if (paginationX != undefined) { var paginationY = { ...paginationX, options: pagination.options }; setAttributes({ pagination: paginationY }); blockCssObj[paginationSelector] = paginationY; } if (paginationWrapX != undefined) { var paginationWrapY = { ...paginationWrapX, options: paginationWrap.options }; setAttributes({ paginationWrap: paginationWrapY }); blockCssObj[paginationWrapSelector] = paginationWrapY; } if (nextIconX != undefined) { var nextIconY = { ...nextIconX, options: nextIcon.options }; setAttributes({ nextIcon: nextIconY }); blockCssObj[nextIconSelector] = nextIconY; } if (nextX != undefined) { var nextY = { ...nextX, options: next.options }; setAttributes({ next: nextY }); blockCssObj[nextSelector] = nextY; } if (pervIconX != undefined) { var pervIconY = { ...pervIconX, options: pervIcon.options }; setAttributes({ pervIcon: pervIconY }); blockCssObj[pervIconSelector] = pervIconY; } if (pervX != undefined) { var pervY = { ...pervX, options: perv.options }; setAttributes({ perv: pervY }); blockCssObj[pervSelector] = pervY; } if (navsWrapX != undefined) { var navsWrapY = { ...navsWrapX, options: navsWrap.options }; setAttributes({ navsWrap: navsWrapY }); blockCssObj[navsWrapSelector] = navsWrapY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function applyFlex(attr, newVal) { onChangeStyleWrapper("styles", newVal, attr); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleNext(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, next); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ next: object }); var elementSelector = myStore.getElementSelector(sudoScource, nextSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNext(sudoScource, key) { var object = myStore.deletePropertyDeep(next, [sudoScource, key, breakPointX]); setAttributes({ next: object }); var elementSelector = myStore.getElementSelector(sudoScource, nextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNext(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, next); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ next: object }); } function onBulkAddNext(sudoScource, cssObj) { let obj = Object.assign({}, next); obj[sudoScource] = cssObj; setAttributes({ next: obj }); var selector = myStore.getElementSelector(sudoScource, nextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePrev(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, perv); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ perv: object }); var elementSelector = myStore.getElementSelector(sudoScource, pervSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrev(sudoScource, key) { var object = myStore.deletePropertyDeep(perv, [sudoScource, key, breakPointX]); setAttributes({ perv: object }); var elementSelector = myStore.getElementSelector(sudoScource, pervSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrev(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, perv); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ perv: object }); } function onBulkAddPrev(sudoScource, cssObj) { let obj = Object.assign({}, perv); obj[sudoScource] = cssObj; setAttributes({ perv: obj }); var selector = myStore.getElementSelector(sudoScource, pervSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePagination(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, pagination); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ pagination: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePagination(sudoScource, key) { var object = myStore.deletePropertyDeep(pagination, [sudoScource, key, breakPointX]); setAttributes({ pagination: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePagination(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, pagination); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ pagination: object }); } function onBulkAddPagination(sudoScource, cssObj) { let obj = Object.assign({}, pagination); obj[sudoScource] = cssObj; setAttributes({ pagination: obj }); var selector = myStore.getElementSelector(sudoScource, paginationSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePaginationActive(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, paginationActive); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ paginationActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationActiveSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePaginationActive(sudoScource, key) { var object = myStore.deletePropertyDeep(paginationActive, [sudoScource, key, breakPointX]); setAttributes({ paginationActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationActiveSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePaginationActive(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, paginationActive); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ paginationActive: object }); } function onBulkAddPaginationActive(sudoScource, cssObj) { let obj = Object.assign({}, paginationActive); obj[sudoScource] = cssObj; setAttributes({ paginationActive: obj }); var selector = myStore.getElementSelector(sudoScource, paginationActiveSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePaginationWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, paginationWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ paginationWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePaginationWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(paginationWrap, [sudoScource, key, breakPointX]); setAttributes({ paginationWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePaginationWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, paginationWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ paginationWrap: object }); } function onBulkAddPaginationWrap(sudoScource, cssObj) { let obj = Object.assign({}, paginationWrap); obj[sudoScource] = cssObj; setAttributes({ paginationWrap: obj }); var selector = myStore.getElementSelector(sudoScource, paginationWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleNextIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, nextIcon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ nextIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, nextIconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNextIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(nextIcon, [sudoScource, key, breakPointX]); setAttributes({ nextIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, nextIconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNextIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, nextIcon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ nextIcon: object }); } function onBulkAddNextIcon(sudoScource, cssObj) { let obj = Object.assign({}, nextIcon); obj[sudoScource] = cssObj; setAttributes({ nextIcon: obj }); var selector = myStore.getElementSelector(sudoScource, nextIconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePervIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, pervIcon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ pervIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, pervIconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePervIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(pervIcon, [sudoScource, key, breakPointX]); setAttributes({ pervIcon: object }); var elementSelector = myStore.getElementSelector(sudoScource, pervIconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePervIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, pervIcon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ pervIcon: object }); } function onBulkAddPervIcon(sudoScource, cssObj) { let obj = Object.assign({}, pervIcon); obj[sudoScource] = cssObj; setAttributes({ pervIcon: obj }); var selector = myStore.getElementSelector(sudoScource, pervIconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleNavsWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, navsWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ navsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, navsWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNavsWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(navsWrap, [sudoScource, key, breakPointX]); setAttributes({ navsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, navsWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNavsWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, navsWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ navsWrap: object }); } function onBulkAddNavsWrap(sudoScource, cssObj) { let obj = Object.assign({}, navsWrap); obj[sudoScource] = cssObj; setAttributes({ navsWrap: obj }); var selector = myStore.getElementSelector(sudoScource, navsWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } const [nextIconHtml, setNextIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const [pervIconHtml, setPervIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = nextIcon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setNextIconHtml(iconHtml); }, [nextIcon.options]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = pervIcon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setPervIconHtml(iconHtml); }, [pervIcon.options]); const ALLOWED_BLOCKS = ["post-grid/post-query", "post-grid/content-slider-item"]; const MY_TEMPLATE = [["post-grid/content-slider-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, orientation: "horizontal", //templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender }); var RemoveSliderArg = function ({ index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var sliderOptionsX = { ...sliderOptions }; delete sliderOptionsX[index]; setAttributes({ sliderOptions: sliderOptionsX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })); }; var RemoveSliderArgRes = function ({ index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var sliderOptionsResX = { ...sliderOptionsRes }; delete sliderOptionsResX[index]; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addSlide(); } }, "Add Slide Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Slider Options", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "normal", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "normal", title: "Normal", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-normal" }, { name: "responsive", title: "Responsive", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-responsive" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "normal" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Slider Options"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_16__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: sliderOptionsArgs, onChange: (option, index) => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[index] = option.value; setAttributes({ sliderOptions: sliderOptionsX }); }, values: "" })), Object.entries(sliderOptions).map((item, index) => { var id = item[0]; var value = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "autoplay" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Autoplay?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "rewind" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Rewind?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "interval" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Interval?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "speed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Speed?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "rewindSpeed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Rewind Speed?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "start" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Start?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "perPage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Per Page?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "perMove" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Per Move?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, type: "number", onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "gap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Gap?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "padding" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Padding?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "focus" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Focus?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "width" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Width?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "height" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Height?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "fixedWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Fixed Width?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "fixedHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Fixed Height?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "heightRatio" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Height Ratio?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "easing" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Easing?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "pauseOnHover" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pause On Hover?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "pauseOnFocus" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pause On Focus?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "rewindByDrag" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Rewind By Drag?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "autoWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Auto Width?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "autoHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Auto Height?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "arrows" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Navigation?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "pagination" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pagination?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "paginationKeyboard" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pagination Keyboard?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "drag" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Drag?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "snap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Snap?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "noDrag" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "noDrag?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value, onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "paginationDirection" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pagination Direction?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "ltr", value: "ltr" }, { label: "rtl", value: "rtl" }, { label: "ttb", value: "ttb" }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "direction" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Direction?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "ltr", value: "ltr" }, { label: "rtl", value: "rtl" }, { label: "ttb", value: "ttb" }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "lazyLoad" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "LazyLoad?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }, { label: "Nearby", value: "nearby" }, { label: "Sequential", value: "sequential" }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "keyboard" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Keyboard?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }, { label: "global", value: "global" }, { label: "focused", value: "focused" }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "mediaQuery" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Media Query?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "min", value: "min" }, { label: "max", value: "max" }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "wheel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Wheel?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } })), id == "cover" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Cover?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsX = { ...sliderOptions }; sliderOptionsX[id] = newVal; setAttributes({ sliderOptions: sliderOptionsX }); } }))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "responsive" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Slider Options"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_16__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: sliderOptionsArgsRes, onChange: (option, index) => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[index] == undefined) { sliderOptionsResX[index] = {}; } if (sliderOptionsResX[index][breakPointX] == undefined) { sliderOptionsResX[index][breakPointX] = option.value; } setAttributes({ sliderOptionsRes: sliderOptionsResX }); }, values: "" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_toggle__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom", variant: "secondary", iconList: breakPointList, buttonTitle: "Break Point Switch", onChange: onChangeBreakPoint, activeIcon: _breakpoints__WEBPACK_IMPORTED_MODULE_9__["default"][breakPointX].icon, value: breakPointX })), Object.entries(sliderOptionsRes).map((item, index) => { var id = item[0]; var value = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "autoplay" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Autoplay?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "rewind" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Rewind?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "interval" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Interval?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], type: "number", onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "speed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Speed?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], type: "number", onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "rewindSpeed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Rewind Speed?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], type: "number", onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "start" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Start?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], type: "number", onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "perPage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Per Page?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], type: "number", onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "perMove" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Per Move?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], type: "number", onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "gap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Gap?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "padding" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Padding?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "focus" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Focus?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "width" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Width?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "height" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Height?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "fixedWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Fixed Width?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "fixedHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Fixed Height?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "heightRatio" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Height Ratio?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: value[breakPointX] == undefined ? "" : value[breakPointX], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "pauseOnHover" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pause On Hover?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "pauseOnFocus" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pause On Focus?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "rewindByDrag" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Rewind By Drag?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "autoWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Auto Width?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "autoHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Auto Height?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "arrows" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Navigation?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "pagination" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pagination?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "paginationKeyboard" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pagination Keyboard?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "drag" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Drag?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "snap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Snap?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "noDrag" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "No Drag?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "paginationDirection" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Pagination Direction?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "ltr", value: "ltr" }, { label: "rtl", value: "rtl" }, { label: "ttb", value: "ttb" }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "direction" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Direction?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "ltr", value: "ltr" }, { label: "rtl", value: "rtl" }, { label: "ttb", value: "ttb" }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "lazyLoad" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "LazyLoad?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }, { label: "Nearby", value: "nearby" }, { label: "Sequential", value: "sequential" }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "keyboard" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Keyboard?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }, { label: "global", value: "global" }, { label: "focused", value: "focused" }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "mediaQuery" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Media Query?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "min", value: "min" }, { label: "max", value: "max" }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "wheel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Wheel?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } })), id == "cover" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveSliderArgRes, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Cover?")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: value[breakPointX] == undefined ? "" : value[breakPointX], options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var sliderOptionsResX = { ...sliderOptionsRes }; if (sliderOptionsResX[id][breakPointX] == undefined) { sliderOptionsResX[id][breakPointX] = ""; } sliderOptionsResX[id][breakPointX] = newVal; setAttributes({ sliderOptionsRes: sliderOptionsResX }); } }))); })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_25__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_26__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Navigation", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Nav Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: navsWrap, onChange: onChangeStyleNavsWrap, onAdd: onAddStyleNavsWrap, onRemove: onRemoveStyleNavsWrap, onBulkAdd: onBulkAddNavsWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prev", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Previuos Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: perv.options.text, onChange: newVal => { var options = { ...perv.options, text: newVal }; setAttributes({ perv: { ...perv, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: perv, onChange: onChangeStylePrev, onAdd: onAddStylePrev, onRemove: onRemoveStylePrev, onBulkAdd: onBulkAddPrev })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prev Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { library: pervIcon.options.library, srcType: pervIcon.options.srcType, iconSrc: pervIcon.options.iconSrc, onChange: arg => { var options = { ...pervIcon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ pervIcon: { ...pervIcon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: pervIcon.options.position, options: [{ label: "None", value: "" }, { label: "After", value: "after" }, { label: "Before", value: "before" }], onChange: newVal => { var options = { ...pervIcon.options, position: newVal }; setAttributes({ pervIcon: { ...pervIcon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: pervIcon, onChange: onChangeStylePervIcon, onAdd: onAddStylePervIcon, onRemove: onRemoveStylePervIcon, onBulkAdd: onBulkAddPervIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Next", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Next Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: next.options.text, onChange: newVal => { var options = { ...next.options, text: newVal }; setAttributes({ next: { ...next, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: next, onChange: onChangeStyleNext, onAdd: onAddStyleNext, onRemove: onRemoveStyleNext, onBulkAdd: onBulkAddNext })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Next Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { library: nextIcon.options.library, srcType: nextIcon.options.srcType, iconSrc: nextIcon.options.iconSrc, onChange: arg => { var options = { ...nextIcon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ nextIcon: { ...nextIcon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: nextIcon.options.position, options: [{ label: "None", value: "" }, { label: "After", value: "after" }, { label: "Before", value: "before" }], onChange: newVal => { var options = { ...nextIcon.options, position: newVal }; setAttributes({ nextIcon: { ...nextIcon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: nextIcon, onChange: onChangeStyleNextIcon, onAdd: onAddStyleNextIcon, onRemove: onRemoveStyleNextIcon, onBulkAdd: onBulkAddNextIcon }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Pagination", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Pagination Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: paginationWrap, onChange: onChangeStylePaginationWrap, onAdd: onAddStylePaginationWrap, onRemove: onRemoveStylePaginationWrap, onBulkAdd: onBulkAddPaginationWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Pagination Idle", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: pagination, onChange: onChangeStylePagination, onAdd: onAddStylePagination, onRemove: onRemoveStylePagination, onBulkAdd: onBulkAddPagination })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Pagination Active", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: paginationActive, onChange: onChangeStylePaginationActive, onAdd: onAddStylePaginationActive, onRemove: onRemoveStylePaginationActive, onBulkAdd: onBulkAddPaginationActive }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_22__["default"], { blockName: "content-slider", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_27__["default"], { slug: "content-slider" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/content-slider-item", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_28__["default"], { blockName: "content-slider", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_splidejs_react_splide__WEBPACK_IMPORTED_MODULE_11__.Splide, { hasTrack: false, options: sliderOptions }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_splidejs_react_splide__WEBPACK_IMPORTED_MODULE_11__.SplideTrack, null, innerBlocksProps.children), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "splide__arrows" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "perv splide__arrow splide__arrow--prev" }, pervIcon.options.position == "before" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: pervIconHtml } }), perv.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, " ", perv.options.text, " "), pervIcon.options.position == "after" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: pervIconHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "next splide__arrow splide__arrow--next" }, nextIcon.options.position == "before" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: nextIconHtml } }), next.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, " ", next.options.text, " "), nextIcon.options.position == "after" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: nextIconHtml } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("ul", { className: "splide__pagination " }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var perv = attributes.perv; var next = attributes.next; var pagination = attributes.pagination; var paginationActive = attributes.paginationActive; var pervIcon = attributes.pervIcon; var nextIcon = attributes.nextIcon; var navsWrap = attributes.navsWrap; var paginationWrap = attributes.paginationWrap; var sliderOptions = attributes.sliderOptions; var sliderOptionsRes = attributes.sliderOptionsRes; var blockId = attributes.blockId; var pervIconHtml = `<span className="${pervIcon.options.iconSrc}"></span>`; var nextIconHtml = `<span className="${nextIcon.options.iconSrc}"></span>`; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} pg-content-slider` }); const { children, ...innerBlocksProps } = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps.save(blockProps); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, children); //return null; } }); /***/ }), /***/ "./src/blocks/content-slider/variations.js": /*!*************************************************!*\ !*** ./src/blocks/content-slider/variations.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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__); /** * WordPress dependencies */ /** * Template option choices for predefined columns layouts. */ const variations = [{ name: 'preset-1', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-1'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-1'), isPro: false, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, left: { Desktop: '0px' }, top: { Desktop: '0px' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, paddingTop: { Desktop: '30px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "12.25", y: "7.53", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M16.45,11.77a.13.13,0,0,1-.11,0,.15.15,0,0,1,0-.21l1.13-1.14L16.34,9.24A.16.16,0,1,1,16.56,9l1.35,1.35-1.35,1.35A.13.13,0,0,1,16.45,11.77Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "7.53", width: "9.63", height: "5.68", transform: "translate(9.63 20.74) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M5.44,9a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22L4.41,10.37l1.14,1.14a.16.16,0,1,1-.22.22L4.08,10.48a.16.16,0,0,1,0-.22L5.33,9A.16.16,0,0,1,5.44,9Z" })) }, { name: 'preset-2', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-2'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-2'), isPro: false, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, left: { Desktop: '0px' }, top: { Desktop: '0px' }, justifyContent: { Desktop: 'center' }, width: { Desktop: '100%' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, paddingTop: { Desktop: '30px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "77.46", y: "7.53", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M81.65,11.77a.13.13,0,0,1-.11,0,.14.14,0,0,1,0-.21l1.13-1.14L81.54,9.24A.16.16,0,1,1,81.76,9l1.35,1.35-1.35,1.35A.13.13,0,0,1,81.65,11.77Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "65.2", y: "7.53", width: "9.63", height: "5.68", transform: "translate(140.04 20.74) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M70.64,9a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22l-1.13,1.13,1.13,1.14a.16.16,0,1,1-.22.22l-1.24-1.25a.16.16,0,0,1,0-.22L70.53,9A.16.16,0,0,1,70.64,9Z" })) }, { name: 'preset-3', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-3'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-3'), isPro: false, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, right: { Desktop: '0px' }, top: { Desktop: '0px' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, paddingTop: { Desktop: '30px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "142.66", y: "7.53", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M146.85,11.77a.13.13,0,0,1-.11,0,.15.15,0,0,1,0-.21l1.14-1.14-1.14-1.13A.16.16,0,0,1,147,9l1.36,1.35L147,11.72A.13.13,0,0,1,146.85,11.77Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "130.41", y: "7.53", width: "9.63", height: "5.68", transform: "translate(270.44 20.74) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M135.84,9A.16.16,0,0,1,136,9a.16.16,0,0,1,0,.22l-1.13,1.13L136,11.51a.16.16,0,0,1-.22.22l-1.24-1.25a.16.16,0,0,1,0-.22L135.73,9A.16.16,0,0,1,135.84,9Z" })) }, { name: 'preset-4', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-4'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-4'), isPro: false, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, left: { Desktop: '0px' }, top: { Desktop: '0px' }, justifyContent: { Desktop: 'space-between' }, width: { Desktop: '100%' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, paddingTop: { Desktop: '30px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "73.83", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "53.99", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "57.47", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "19.41", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "142.66", y: "7.53", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M146.85,11.77a.13.13,0,0,1-.11,0,.15.15,0,0,1,0-.21l1.14-1.14-1.14-1.13A.16.16,0,0,1,147,9l1.36,1.35L147,11.72A.13.13,0,0,1,146.85,11.77Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "7.53", width: "9.63", height: "5.68", transform: "translate(9.63 20.74) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M5.44,9a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22L4.41,10.37l1.14,1.14a.16.16,0,1,1-.22.22L4.08,10.48a.16.16,0,0,1,0-.22L5.33,9A.16.16,0,0,1,5.44,9Z" })) }, { name: 'preset-5', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-5'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-5'), isPro: false, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { "display": { "Desktop": "flex" }, "position": { "Desktop": "absolute" }, "left": { "Desktop": "0px" }, "top": { "Desktop": "50%" }, "justifyContent": { "Desktop": "space-between" }, "width": { "Desktop": "100%" }, "transform": { "Desktop": "translateY(-50%) " } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, paddingTop: { Desktop: '30px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "67.89", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.14", cy: "67.89", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "67.89", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "48.05", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "51.53", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "13.47", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "48.05", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "51.53", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "13.47", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "48.05", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "51.53", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "13.47", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "142.66", y: "24.82", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M146.85,29.06a.16.16,0,0,1-.11,0,.16.16,0,0,1,0-.22l1.14-1.13-1.14-1.13a.16.16,0,0,1,.22-.22l1.36,1.35L147,29A.16.16,0,0,1,146.85,29.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "24.82", width: "9.63", height: "5.68", transform: "translate(9.63 55.32) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M5.44,26.26a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22L4.41,27.66l1.14,1.13a.16.16,0,0,1-.22.22L4.08,27.77a.16.16,0,0,1,0-.22l1.25-1.24A.16.16,0,0,1,5.44,26.26Z" })) }, { name: 'preset-6', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-6'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-6'), isPro: false, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, left: { Desktop: '0px' }, bottom: { Desktop: '0px' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, position: { Desktop: 'absolute' }, width: { Desktop: '100%' }, top: { Desktop: '0px' }, left: { Desktop: '0px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "12.25", y: "68.75", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M16.45,73a.15.15,0,0,1-.11,0,.16.16,0,0,1,0-.22l1.13-1.14-1.13-1.13a.16.16,0,0,1,.22-.22l1.35,1.35L16.56,73A.15.15,0,0,1,16.45,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "68.75", width: "9.63", height: "5.68", transform: "translate(9.63 143.19) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M5.44,70.19a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22L4.41,71.59l1.14,1.14a.16.16,0,0,1-.22.22L4.08,71.7a.16.16,0,0,1,0-.22l1.25-1.24A.16.16,0,0,1,5.44,70.19Z" })) }, { name: 'preset-7', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-7'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-7'), isPro: true, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '70px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, right: { Desktop: '0px' }, bottom: { Desktop: '0px' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, position: { Desktop: 'absolute' }, width: { Desktop: '100%' }, top: { Desktop: '0px' }, left: { Desktop: '0px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "142.66", y: "68.75", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M146.85,73a.15.15,0,0,1-.11,0,.16.16,0,0,1,0-.22l1.14-1.14-1.14-1.13a.16.16,0,0,1,.22-.22l1.36,1.35L147,73A.15.15,0,0,1,146.85,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "130.41", y: "68.75", width: "9.63", height: "5.68", transform: "translate(270.44 143.19) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M135.84,70.19a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22l-1.13,1.13L136,72.73a.16.16,0,0,1-.22.22l-1.24-1.25a.16.16,0,0,1,0-.22l1.24-1.24A.16.16,0,0,1,135.84,70.19Z" })) }, { name: 'preset-8', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-8'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-8'), isPro: true, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, padding: { Desktop: '30px 0px 0px 0px' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, position: { Desktop: 'absolute' }, width: { Desktop: '100%' }, top: { Desktop: '0px' }, left: { Desktop: '0px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "77.46", y: "68.75", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M81.65,73a.15.15,0,0,1-.11,0,.16.16,0,0,1,0-.22l1.13-1.14-1.13-1.13a.16.16,0,0,1,.22-.22l1.35,1.35L81.76,73A.15.15,0,0,1,81.65,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "65.2", y: "68.75", width: "9.63", height: "5.68", transform: "translate(140.04 143.19) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M70.64,70.19a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22l-1.13,1.13,1.13,1.14a.16.16,0,0,1-.22.22L69.29,71.7a.16.16,0,0,1,0-.22l1.24-1.24A.16.16,0,0,1,70.64,70.19Z" })) }, { name: 'preset-9', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-9'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('preset-9'), isPro: true, atts: { wrapper: { options: { class: '' }, styles: { padding: { Desktop: '50px 0px 50px 0px' } } }, navsWrap: { options: { class: '' }, styles: { display: { Desktop: 'flex' }, position: { Desktop: 'absolute' }, left: { Desktop: '0px' }, bottom: { Desktop: '0px' }, justifyContent: { Desktop: 'space-between' }, width: { Desktop: '100%' } } }, perv: { options: { text: 'Prev', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, margin: { Desktop: '0px 10px 0px 0px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, pervIcon: { options: { position: 'before', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-left' }, styles: {} }, next: { options: { text: 'Next', class: '' }, styles: { padding: { Desktop: '5px 30px 5px 30px' }, backgroundColor: { Desktop: '#1418FF8F' }, color: { Desktop: '#fff' } } }, nextIcon: { options: { position: 'after', class: '', library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fas fa-chevron-right' }, styles: {} }, paginationWrap: { options: { tag: 'ul', class: '' }, styles: { display: { Desktop: 'flex' }, justifyContent: { Desktop: 'center' }, position: { Desktop: 'absolute' }, width: { Desktop: '100%' }, top: { Desktop: '0px' }, left: { Desktop: '0px' } } }, pagination: { options: { tag: 'span', class: '' }, styles: { backgroundColor: { Desktop: '#1418FF8F' }, width: { Desktop: '15px' }, height: { Desktop: '15px' }, margin: { Desktop: '0px 10px 0px 0px' }, borderRadius: { Desktop: ' 20px 20px 20px 20px' } } }, paginationActive: { options: { class: '' }, styles: { backgroundColor: { Desktop: '#0003B6F5' } } }, sliderOptions: { perPage: 3, perMove: 1, gap: '1em' }, sliderOptionsRes: {} }, innerBlocks: [['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}], ['post-grid/content-slider-item', {}]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "70.84", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "76.15", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#3c3c3b", cx: "81.45", cy: "9.35", r: "1.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "4.39", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "7.81", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "57.76", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "61.18", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "53.37", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "111.13", y: "52.96", width: "36.77", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "114.54", y: "56.44", width: "29.93", height: "1.91", rx: "0.69" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "106.73", y: "18.38", width: "45.55", height: "28.38" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "142.66", y: "68.75", width: "9.63", height: "5.68" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M146.85,73a.15.15,0,0,1-.11,0,.16.16,0,0,1,0-.22l1.14-1.14-1.14-1.13a.16.16,0,0,1,.22-.22l1.36,1.35L147,73A.15.15,0,0,1,146.85,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "68.75", width: "9.63", height: "5.68", transform: "translate(9.63 143.19) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M5.44,70.19a.16.16,0,0,1,.11,0,.16.16,0,0,1,0,.22L4.41,71.59l1.14,1.14a.16.16,0,0,1-.22.22L4.08,71.7a.16.16,0,0,1,0-.22l1.25-1.24A.16.16,0,0,1,5.44,70.19Z" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/date-countdown/index.js": /*!********************************************!*\ !*** ./src/blocks/date-countdown/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_display__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-display */ "./src/components/css-display/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./variations */ "./src/blocks/date-countdown/variations.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./block.json */ "./src/blocks/date-countdown/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_25__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.6894 56.4907H3.24769C1.4508 56.4907 -0.00585938 57.9474 -0.00585938 59.7443V101.179C-0.00585938 102.976 1.4508 104.432 3.24769 104.432H36.6894C38.4862 104.432 39.9429 102.976 39.9429 101.179V59.7443C39.9429 57.9474 38.4862 56.4907 36.6894 56.4907Z", fill: "url(#paint0_linear_61_611)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M9.34427 96.5078V91.6577L20.7895 81.1646C21.7629 80.2319 22.5793 79.3925 23.2387 78.6463C23.9085 77.9001 24.4162 77.1695 24.7616 76.4544C25.107 75.729 25.2797 74.9465 25.2797 74.1071C25.2797 73.1744 25.0651 72.3712 24.636 71.6976C24.2068 71.0136 23.6207 70.4902 22.8776 70.1275C22.1344 69.7544 21.2919 69.5679 20.3499 69.5679C19.366 69.5679 18.5078 69.7648 17.7751 70.1586C17.0424 70.5524 16.4773 71.1172 16.0795 71.853C15.6818 72.5888 15.4829 73.4646 15.4829 74.4802H9.03027C9.03027 72.3971 9.5065 70.5887 10.459 69.0549C11.4114 67.5211 12.7459 66.3345 14.4624 65.495C16.179 64.6556 18.1571 64.2358 20.397 64.2358C22.6996 64.2358 24.704 64.64 26.41 65.4484C28.1266 66.2464 29.4611 67.3553 30.4135 68.7751C31.366 70.1949 31.8422 71.8219 31.8422 73.6563C31.8422 74.8584 31.6015 76.0451 31.12 77.2161C30.649 78.3872 29.8065 79.6878 28.5923 81.118C27.3782 82.5378 25.6669 84.2426 23.4585 86.2324L18.7642 90.7872V91.0048H32.2661V96.5078H9.34427Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M85.7426 56.4907H52.3009C50.504 56.4907 49.0474 57.9474 49.0474 59.7443V101.179C49.0474 102.976 50.504 104.432 52.3009 104.432H85.7426C87.5395 104.432 88.9961 102.976 88.9961 101.179V59.7443C88.9961 57.9474 87.5395 56.4907 85.7426 56.4907Z", fill: "url(#paint1_linear_61_611)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M68.312 96.5078C66.115 96.5078 64.1562 96.1037 62.4359 95.2953C60.7259 94.4869 59.3683 93.3729 58.363 91.9531C57.3578 90.5333 56.8344 88.9062 56.793 87.0718H63.322C63.3945 88.3051 63.9127 89.3052 64.8765 90.0721C65.8403 90.839 66.9855 91.2224 68.312 91.2224C69.3691 91.2224 70.3018 90.9893 71.1102 90.5229C71.9289 90.0462 72.5662 89.3881 73.0222 88.5487C73.4886 87.6988 73.7218 86.7247 73.7218 85.6261C73.7218 84.5069 73.4834 83.5223 73.0067 82.6725C72.5403 81.8227 71.8926 81.1595 71.0635 80.6827C70.2345 80.206 69.2862 79.9625 68.2187 79.9521C67.286 79.9521 66.3792 80.1438 65.4983 80.5273C64.6278 80.9107 63.949 81.4341 63.4619 82.0974L57.477 81.0247L58.9849 64.2358H78.4475V69.7389H64.5345L63.7106 77.7136H63.8972C64.4568 76.926 65.3014 76.2731 66.431 75.7549C67.5607 75.2367 68.825 74.9776 70.2241 74.9776C72.1413 74.9776 73.8513 75.4284 75.354 76.3301C76.8567 77.2317 78.0434 78.4701 78.9139 80.0454C79.7844 81.6103 80.2145 83.4135 80.2042 85.4551C80.2145 87.6004 79.7171 89.5073 78.7118 91.1758C77.7169 92.834 76.323 94.1398 74.5301 95.0932C72.7476 96.0363 70.6749 96.5078 68.312 96.5078Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M156.741 56.4907H123.299C121.502 56.4907 120.045 57.9474 120.045 59.7443V101.179C120.045 102.976 121.502 104.432 123.299 104.432H156.741C158.538 104.432 159.994 102.976 159.994 101.179V59.7443C159.994 57.9474 158.538 56.4907 156.741 56.4907Z", fill: "url(#paint2_linear_61_611)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M139.31 96.5078C137.113 96.5078 135.154 96.1037 133.434 95.2953C131.724 94.4869 130.366 93.3729 129.361 91.9531C128.356 90.5333 127.832 88.9062 127.791 87.0718H134.32C134.393 88.3051 134.911 89.3052 135.875 90.0721C136.838 90.839 137.984 91.2224 139.31 91.2224C140.367 91.2224 141.3 90.9893 142.108 90.5229C142.927 90.0462 143.564 89.3881 144.02 88.5487C144.487 87.6988 144.72 86.7247 144.72 85.6261C144.72 84.5069 144.481 83.5223 144.005 82.6725C143.538 81.8227 142.891 81.1595 142.062 80.6827C141.232 80.206 140.284 79.9625 139.217 79.9521C138.284 79.9521 137.377 80.1438 136.496 80.5273C135.626 80.9107 134.947 81.4341 134.46 82.0974L128.475 81.0247L129.983 64.2358H149.446V69.7389H135.533L134.709 77.7136H134.895C135.455 76.926 136.299 76.2731 137.429 75.7549C138.559 75.2367 139.823 74.9776 141.222 74.9776C143.139 74.9776 144.849 75.4284 146.352 76.3301C147.855 77.2317 149.041 78.4701 149.912 80.0454C150.782 81.6103 151.213 83.4135 151.202 85.4551C151.213 87.6004 150.715 89.5073 149.71 91.1758C148.715 92.834 147.321 94.1398 145.528 95.0932C143.746 96.0363 141.673 96.5078 139.31 96.5078Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M139.324 41C139.777 41 140.229 41 140.681 41.4176L150.632 50.606C151.084 51.0236 151.084 51.859 150.632 52.2766C149.727 52.6943 148.822 52.6943 148.37 52.2766L139.777 44.3412L130.731 52.2766C130.279 52.6943 128.922 52.6943 128.469 52.2766C127.565 51.859 127.565 51.0236 128.469 50.606L138.42 41.4176C138.42 41 138.872 41 139.324 41Z", fill: "url(#paint3_linear_61_611)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M139.324 119.716C139.777 119.716 140.229 119.716 140.681 119.299L150.632 110.11C151.084 109.693 151.084 108.857 150.632 108.44C149.727 108.022 148.822 108.022 148.37 108.44L139.777 116.375L130.731 108.44C130.279 108.022 128.922 108.022 128.469 108.44C127.565 108.857 127.565 109.693 128.469 110.11L138.42 119.299C138.42 119.716 138.872 119.716 139.324 119.716Z", fill: "url(#paint4_linear_61_611)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_611", x1: "-0.00585938", y1: "80.4614", x2: "39.9429", y2: "80.4614", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_611", x1: "49.0474", y1: "80.4614", x2: "88.9961", y2: "80.4614", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_611", x1: "120.045", y1: "80.4614", x2: "159.994", y2: "80.4614", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_611", x1: "139.381", y1: "52.5898", x2: "139.381", y2: "41", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_611", x1: "139.381", y1: "108.126", x2: "139.381", y2: "119.716", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var postId = context["postId"]; var postType = context["postType"]; var inner = attributes.inner; var editMode = attributes.editMode; let items = attributes.items; let dayWrap = attributes.dayWrap; let day = attributes.day; let hourWrap = attributes.hourWrap; let hour = attributes.hour; let minuteWrap = attributes.minuteWrap; let minute = attributes.minute; let secondWrap = attributes.secondWrap; let second = attributes.second; var countdownWrapper = attributes.countdownWrapper; var expiredArg = attributes.expiredArg; var dateCountdown = attributes.dateCountdown; var scheduleTime = attributes.scheduleTime; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var separator = attributes.separator; var label = attributes.label; var count = attributes.count; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const countdownWrapperSelector = blockClass + " .countdown-wrapper"; const labelSelector = blockClass + " .label"; const countSelector = blockClass + " .count"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const iconSelector = blockClass + " .date-countdown-icon"; var innerSelector = blockClass + " .inner"; // day hours minutes seconds var separatorSelector = blockClass + " .separator"; var itemsSelector = blockClass + " .items"; var secondWrapSelector = blockClass + " .second-wrapper"; var secondSelector = blockClass + " .second-countdown"; var minuteWrapSelector = blockClass + " .minute-wrapper"; var minuteSelector = blockClass + " .minute-countdown"; var hourWrapSelector = blockClass + " .hour-wrapper"; var hourSelector = blockClass + " .hour-countdown"; var dayWrapSelector = blockClass + " .day-wrapper"; var daySelector = blockClass + " .day-countdown"; const innerEnable = inner.options.enable == undefined ? true : inner.options.enable; const secondEnable = second.options.enable == undefined ? true : second.options.enable; const minuteEnable = minute.options.enable == undefined ? true : minute.options.enable; const hourEnable = hour.options.enable == undefined ? true : hour.options.enable; const dayEnable = day.options.enable == undefined ? true : day.options.enable; const iconEnable = icon.options.enable == undefined ? true : icon.options.enable; const separatorEnable = separator.options.enable == undefined ? true : separator.options.enable; const labelEnable = label.options.enable == undefined ? true : label.options.enable; const prefixEnable = prefix.options.enable == undefined ? true : prefix.options.enable; const postfixEnable = postfix.options.enable == undefined ? true : postfix.options.enable; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.store); var scheduleTimeSet = [{ id: "startTime", value: "" }, { id: "endTime", value: "" }]; function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var dateCountdownX = attributes.dateCountdown; var scheduleTimeX = attributes.scheduleTime; var countdownWrapperX = attributes.countdownWrapper; var innerX = attributes.inner; var itemsX = attributes.items; var secondWrapX = attributes.secondWrap; var secondX = attributes.second; var minuteWrapX = attributes.minuteWrap; var minuteX = attributes.minute; var hourWrapX = attributes.hourWrap; var hourX = attributes.hour; var dayWrapX = attributes.dayWrap; var dayX = attributes.day; var iconX = attributes.icon; var separatorX = attributes.separator; var labelX = attributes.label; var countX = attributes.count; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; // if (dateCountdownX != undefined) { // var dateCountdownY = { // ...dateCountdownX, // options: dateCountdown.options, // }; // setAttributes({ dateCountdown: dateCountdownY }); // blockCssObj[dateCountdownSelector] = dateCountdownY; // } // if (scheduleTimeX != undefined) { // var scheduleTimeY = { // ...scheduleTimeX, // options: scheduleTime.options, // }; // setAttributes({ scheduleTime: scheduleTimeY }); // blockCssObj[scheduleTimeSelector] = scheduleTimeY; // } if (countdownWrapperX != undefined) { var countdownWrapperY = { ...countdownWrapperX, options: countdownWrapper.options }; setAttributes({ countdownWrapper: countdownWrapperY }); blockCssObj[countdownWrapperSelector] = countdownWrapperY; } if (innerX != undefined) { var innerY = { ...innerX, options: inner.options }; setAttributes({ inner: innerY }); blockCssObj[innerSelector] = innerY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemsSelector] = itemsY; } if (secondWrapX != undefined) { var secondWrapY = { ...secondWrapX, options: secondWrap.options }; setAttributes({ secondWrap: secondWrapY }); blockCssObj[secondWrapSelector] = secondWrapY; } if (secondX != undefined) { var secondY = { ...secondX, options: second.options }; setAttributes({ second: secondY }); blockCssObj[secondSelector] = secondY; } if (minuteWrapX != undefined) { var minuteWrapY = { ...minuteWrapX, options: minuteWrap.options }; setAttributes({ minuteWrap: minuteWrapY }); blockCssObj[minuteWrapSelector] = minuteWrapY; } if (minuteX != undefined) { var minuteY = { ...minuteX, options: minute.options }; setAttributes({ minute: minuteY }); blockCssObj[minuteSelector] = minuteY; } if (hourWrapX != undefined) { var hourWrapY = { ...hourWrapX, options: hourWrap.options }; setAttributes({ hourWrap: hourWrapY }); blockCssObj[hourWrapSelector] = hourWrapY; } if (hourX != undefined) { var hourY = { ...hourX, options: hour.options }; setAttributes({ hour: hourY }); blockCssObj[hourSelector] = hourY; } if (dayWrapX != undefined) { var dayWrapY = { ...dayWrapX, options: dayWrap.options }; setAttributes({ dayWrap: dayWrapY }); blockCssObj[dayWrapSelector] = dayWrapY; } if (dayX != undefined) { var dayY = { ...dayX, options: day.options }; setAttributes({ day: dayY }); blockCssObj[daySelector] = dayY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (labelX != undefined) { var labelY = { ...labelX, options: label.options }; setAttributes({ label: labelY }); blockCssObj[labelSelector] = labelY; } if (countX != undefined) { var countY = { ...countX, options: count.options }; setAttributes({ count: countY }); blockCssObj[countSelector] = countY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var cssStyle = blockCssRules; setAttributes({ blockCssY: { items: cssStyle } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function addScheduleTime(option, index) { var scheduleTimeX = dateCountdown.scheduleTime.push(option); setAttributes({ dateCountdown: { ...dateCountdown, scheduleTime: dateCountdown.scheduleTime } }); } var scheduleArgsBasic = { startTime: { label: "Start Time", description: "Visible as soon as possible", args: { id: "startTime", value: "" } }, EndTime: { label: "End Time", description: "Visible as soon as possible", args: { id: "EndTime", value: "" } } }; let scheduleArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("scheduleArgs", scheduleArgsBasic); var expiredArgsBasic = { redirectURL: { label: "Redirect URL", description: "Visible as soon as possible", args: { id: "redirectURL", value: "", delay: "" } }, wcHideCartButton: { label: "Hide Cart Button", description: "Visible as soon as possible", args: { id: "wcHideCartButton" }, isPro: true }, showExpiredMsg: { label: "Show Expired Message", description: "Visible as soon as possible", args: { id: "showExpiredMsg" } }, hideCountdown: { label: "Hide Countdown", description: "Visible as soon as possible", args: { id: "hideCountdown" } }, showElement: { label: "Show Element", description: "Visible as soon as possible", args: { id: "showElement", value: "" }, isPro: true }, showPopup: { label: "Show Popup", description: "Visible as soon as possible", args: { id: "showPopup" }, isPro: true } }; let expiredArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("expiredArgs", expiredArgsBasic); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.store).getBlocks(clientId).length > 0, [clientId]); var visibleArgsBasic = { weekDays: { label: "is Week day", description: "Show when specific week days", args: { id: "weekDays", value: "", values: [], compare: "=" }, isPro: true } }; let visibleArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("pgFormvisibleArgs", visibleArgsBasic); var typeArgsBasic = { fixed: { label: "Fixed", value: "fixed" }, everGreen: { label: "Ever Green", value: "everGreen", isPro: true }, scheduled: { label: "Scheduled", value: "scheduled", isPro: true } }; let typeArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("pgDateCountdownTypes", typeArgsBasic); function setType(option, index) { var options = { ...dateCountdown.options, type: option.value }; setAttributes({ dateCountdown: { ...dateCountdown, options: options } }); } var weekDayNumn = { 0: { label: "Sunday", value: 0 }, 1: { label: "Monday", value: 1 }, 2: { label: "Tuesday", value: 2 }, 3: { label: "Wednesday", value: 3 }, 4: { label: "Thursday", value: 4 }, 5: { label: "Friday", value: 5 }, 6: { label: "Saturday", value: 6 } }; const [productData, setProductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { setProductData(res); }); }, []); const [remindTime, setRemindTime] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindDay, setRemindDay] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindHour, setRemindHour] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindMinute, setRemindMinute] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindSecond, setRemindSecond] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { const dateInput1 = dateCountdown.options.startDate; const dateInput2 = dateCountdown.options.endDate; const currentDate = new Date(); if (dateInput1.length == 0 || dateInput2.length == 0) { return; } var date1 = ""; var date2 = ""; var startDate = ""; if (dateCountdown.options.startDateSrc?.length == 0) { date1 = new Date(dateInput1); } else { date1 = productData?.date_on_sale_from != null ? new Date(productData.date_on_sale_from.date) : new Date(dateInput1); } if (dateCountdown.options.endDateSrc.length == 0) { date2 = new Date(dateInput2); } else { date2 = productData?.date_on_sale_to != null ? new Date(productData.date_on_sale_to.date) : new Date(dateInput2); } if (currentDate > date1) { startDate = currentDate; } else if (currentDate < date1) { startDate = currentDate; } else { startDate = date1; } const timeDifference = date2 - startDate; setRemindTime(timeDifference); if (currentDate < date1) { setRemindTime(0); } }, [clientId, dateCountdown.options.startDate, dateCountdown.options.startDateSrc, dateCountdown.options.endDateSrc, dateCountdown.options.endDate]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (remindTime > 0) { const intervalId = setInterval(() => { const remindTimeX = remindTime - 1000; setRemindTime(remindTimeX); const days = Math.floor(remindTimeX / (1000 * 60 * 60 * 24)); const hours = Math.floor(remindTimeX % (1000 * 60 * 60 * 24) / (1000 * 60 * 60)); const minutes = Math.floor(remindTimeX % (1000 * 60 * 60) / (1000 * 60)); const seconds = Math.floor(remindTimeX % (1000 * 60) / 1000); const formattedDays = String(days).padStart(2, "0"); const formattedHours = String(hours).padStart(2, "0"); const formattedMinutes = String(minutes).padStart(2, "0"); const formattedSeconds = String(seconds).padStart(2, "0"); setRemindDay(formattedDays); setRemindHour(formattedHours); setRemindMinute(formattedMinutes); setRemindSecond(formattedSeconds); if (remindTimeX <= 0) { clearInterval(intervalId); } }, 1000); return () => clearInterval(intervalId); } }, [remindTime, dateCountdown.options.startDate, dateCountdown.options.endDate]); // day hours minutes seconds // Ever Green Start const [remindTimes, setRemindTimes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindDays, setRemindDays] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindHours, setRemindHours] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindMinutes, setRemindMinutes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); const [remindSeconds, setRemindSeconds] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { const days = dateCountdown.options.everGreenTime.day; const hours = dateCountdown.options.everGreenTime.hour; const minutes = dateCountdown.options.everGreenTime.minute; const currentTime = new Date().getTime(); const endTime = currentTime + days * 24 * 60 * 60 * 1000 + hours * 60 * 60 * 1000 + minutes * 60 * 1000; const duration = endTime - currentTime; setRemindTimes(duration); }, [dateCountdown.options.everGreenTime]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (remindTimes > 0) { const intervalId = setInterval(() => { const remindTimesX = remindTimes - 1000; setRemindTimes(remindTimesX); const days = Math.floor(remindTimesX / (1000 * 60 * 60 * 24)); const hours = Math.floor(remindTimesX % (1000 * 60 * 60 * 24) / (1000 * 60 * 60)); const minutes = Math.floor(remindTimesX % (1000 * 60 * 60) / (1000 * 60)); const seconds = Math.floor(remindTimesX % (1000 * 60) / 1000); const formattedDays = String(days).padStart(2, "0"); const formattedHours = String(hours).padStart(2, "0"); const formattedMinutes = String(minutes).padStart(2, "0"); const formattedSeconds = String(seconds).padStart(2, "0"); setRemindDays(formattedDays); setRemindHours(formattedHours); setRemindMinutes(formattedMinutes); setRemindSeconds(formattedSeconds); }, 1000); return () => clearInterval(intervalId); } }, [remindTimes]); // Ever Green End function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; wrapper[sudoSource] = sudoSourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, wrapperSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryCountdownWrapper(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; countdownWrapper[sudoSource] = sudoSourceArgs; }); var countdownWrapperX = Object.assign({}, countdownWrapper); setAttributes({ countdownWrapper: countdownWrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, countdownWrapperSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryInner(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; inner[sudoSource] = sudoSourceArgs; }); var innerX = Object.assign({}, inner); setAttributes({ inner: innerX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, innerSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // css library date countdown function onPickCssLibraryItems(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; items[sudoSource] = sudoSourceArgs; }); var itemsX = Object.assign({}, items); setAttributes({ items: itemsX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, itemsSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySecondWrap(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; secondWrap[sudoSource] = sudoSourceArgs; }); var secondWrapX = Object.assign({}, secondWrap); setAttributes({ secondWrap: secondWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, secondWrapSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySecondCountdown(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; second[sudoSource] = sudoSourceArgs; }); var secondX = Object.assign({}, second); setAttributes({ second: secondX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, secondSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryMinuteWrap(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; minuteWrap[sudoSource] = sudoSourceArgs; }); var minuteWrapX = Object.assign({}, minuteWrap); setAttributes({ minuteWrap: minuteWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, minuteWrapSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryMinuteCountdown(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; minute[sudoSource] = sudoSourceArgs; }); var minuteX = Object.assign({}, minute); setAttributes({ minute: minuteX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, minuteSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryHourWrap(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; hourWrap[sudoSource] = sudoSourceArgs; }); var hourWrapX = Object.assign({}, hourWrap); setAttributes({ hourWrap: hourWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, hourWrapSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryHourCountdown(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; hour[sudoSource] = sudoSourceArgs; }); var hourX = Object.assign({}, hour); setAttributes({ hour: hourX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, hourSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryDayWrap(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; dayWrap[sudoSource] = sudoSourceArgs; }); var dayWrapX = Object.assign({}, dayWrap); setAttributes({ dayWrap: dayWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, dayWrapSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryDayCountdown(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; day[sudoSource] = sudoSourceArgs; }); var dayX = Object.assign({}, day); setAttributes({ day: dayX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, daySelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySeparator(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; separator[sudoSource] = sudoSourceArgs; }); var separatorX = Object.assign({}, separator); setAttributes({ separator: separatorX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, separatorSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // css library date countdown end function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; icon[sudoSource] = sudoSourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, iconSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryLabel(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; label[sudoSource] = sudoSourceArgs; }); var labelX = Object.assign({}, label); setAttributes({ label: labelX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, labelSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryCount(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; count[sudoSource] = sudoSourceArgs; }); var countX = Object.assign({}, count); setAttributes({ count: countX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, countSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; prefix[sudoSource] = sudoSourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, prefixSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; postfix[sudoSource] = sudoSourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoSource = x[0]; var sudoSourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoSource, postfixSelector); var sudoObj = {}; Object.entries(sudoSourceArgs).map(y => { var cssProperty = y[0]; var cssPropertyVal = y[1]; var cssPropertyKey = myStore.cssAttrParse(cssProperty); sudoObj[cssPropertyKey] = cssPropertyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } var RemoveScheduleArgGroup = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var scheduleX = { ...scheduleArg }; delete scheduleX[index]; setAttributes({ scheduleArg: scheduleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveScheduleArgArgs = function ({ title, index, groupId }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var scheduleArgX = { ...scheduleArg }; scheduleArgX[groupId].args.splice(index, 1); setAttributes({ scheduleArg: scheduleArgX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveExpiredArgGroup = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var expiredArgX = { ...expiredArg }; delete expiredArgX[index]; setAttributes({ expiredArg: expiredArgX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveExpiredArgArgs = function ({ title, index, groupId }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var expiredArgX = { ...expiredArg }; expiredArgX[groupId].args.splice(index, 1); setAttributes({ expiredArg: expiredArgX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; function onChangeStyleWrapper(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoSource, wrapperSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoSource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoSource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoSource, wrapperSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleCountdownWrapper(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, countdownWrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ countdownWrapper: object }); var elementSelector = myStore.getElementSelector(sudoSource, countdownWrapperSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCountdownWrapper(sudoSource, key) { var object = myStore.deletePropertyDeep(countdownWrapper, [sudoSource, key, breakPointX]); setAttributes({ countdownWrapper: object }); var elementSelector = myStore.getElementSelector(sudoSource, countdownWrapperSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCountdownWrapper(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, countdownWrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ countdownWrapper: object }); } function onChangeStyleInner(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, inner); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inner: object }); var elementSelector = myStore.getElementSelector(sudoSource, innerSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInner(sudoSource, key) { var object = myStore.deletePropertyDeep(inner, [sudoSource, key, breakPointX]); setAttributes({ inner: object }); var elementSelector = myStore.getElementSelector(sudoSource, innerSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInner(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, inner); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inner: object }); } // Css edit // items style functions // items style functions end function onChangeStyleItems(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, items); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoSource, itemsSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItems(sudoSource, key) { var object = myStore.deletePropertyDeep(items, [sudoSource, key, breakPointX]); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoSource, itemsSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItems(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, items); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ items: object }); } // items style functions end // second style function // second wrap function onChangeStyleSecondWrap(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, secondWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ secondWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, secondWrapSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSecondWrap(sudoSource, key) { var object = myStore.deletePropertyDeep(secondWrap, [sudoSource, key, breakPointX]); setAttributes({ secondWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, secondWrapSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSecondWrap(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, secondWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ secondWrap: object }); } // second count function onChangeStyleSecondCountdown(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, second); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ second: object }); var elementSelector = myStore.getElementSelector(sudoSource, secondSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSecondCountdown(sudoSource, key) { var object = myStore.deletePropertyDeep(second, [sudoSource, key, breakPointX]); setAttributes({ second: object }); var elementSelector = myStore.getElementSelector(sudoSource, secondSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSecondCountdown(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, second); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ second: object }); } // second style function end // minute style function // minute count wrap function onChangeStyleMinuteWrap(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, minuteWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ minuteWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, minuteWrapSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleMinuteWrap(sudoSource, key) { var object = myStore.deletePropertyDeep(minuteWrap, [sudoSource, key, breakPointX]); setAttributes({ minuteWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, minuteWrapSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleMinuteWrap(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, minuteWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ minuteWrap: object }); } // minute count function onChangeStyleMinuteCountdown(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, minute); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ minute: object }); var elementSelector = myStore.getElementSelector(sudoSource, minuteSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleMinuteCountdown(sudoSource, key) { var object = myStore.deletePropertyDeep(minute, [sudoSource, key, breakPointX]); setAttributes({ minute: object }); var elementSelector = myStore.getElementSelector(sudoSource, minuteSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleMinuteCountdown(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, minute); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ minute: object }); } // minute style function end // hour style function // hour wrap function onChangeStyleHourWrap(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, hourWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ hourWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, hourWrapSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHourWrap(sudoSource, key) { var object = myStore.deletePropertyDeep(hourWrap, [sudoSource, key, breakPointX]); setAttributes({ hourWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, hourWrapSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHourWrap(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, hourWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ hourWrap: object }); } // hour count function onChangeStyleHourCountdown(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, hour); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ hour: object }); var elementSelector = myStore.getElementSelector(sudoSource, hourSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHourCountdown(sudoSource, key) { var object = myStore.deletePropertyDeep(hour, [sudoSource, key, breakPointX]); setAttributes({ hour: object }); var elementSelector = myStore.getElementSelector(sudoSource, hourSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHourCountdown(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, hour); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ hour: object }); } // hour style function end // day style function // day wrap function onChangeStyleDayWrap(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, dayWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ dayWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, dayWrapSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleDayWrap(sudoSource, key) { var object = myStore.deletePropertyDeep(dayWrap, [sudoSource, key, breakPointX]); setAttributes({ dayWrap: object }); var elementSelector = myStore.getElementSelector(sudoSource, dayWrapSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleDayWrap(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, dayWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ dayWrap: object }); } // day count function onChangeStyleDayCountdown(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, day); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ day: object }); var elementSelector = myStore.getElementSelector(sudoSource, daySelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleDayCountdown(sudoSource, key) { var object = myStore.deletePropertyDeep(day, [sudoSource, key, breakPointX]); setAttributes({ day: object }); var elementSelector = myStore.getElementSelector(sudoSource, daySelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleDayCountdown(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, day); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ day: object }); } // day style function end // Separator style functions function onChangeStyleSeparator(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoSource, separatorSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSeparator(sudoSource, key) { var object = myStore.deletePropertyDeep(separator, [sudoSource, key, breakPointX]); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoSource, separatorSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSeparator(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ separator: object }); } // Css edit function onChangeStyleIcon(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoSource, iconSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoSource, key) { var object = myStore.deletePropertyDeep(icon, [sudoSource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoSource, iconSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleLabel(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoSource, labelSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoSource, key) { var object = myStore.deletePropertyDeep(label, [sudoSource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoSource, labelSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } // count function onChangeStyleCount(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, count); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ count: object }); var elementSelector = myStore.getElementSelector(sudoSource, countSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCount(sudoSource, key) { var object = myStore.deletePropertyDeep(count, [sudoSource, key, breakPointX]); setAttributes({ count: object }); var elementSelector = myStore.getElementSelector(sudoSource, countSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCount(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, count); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ count: object }); } // count function onChangeStylePrefix(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoSource, prefixSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoSource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoSource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoSource, prefixSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoSource, postfixSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoSource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoSource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoSource, postfixSelector); var cssProperty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssProperty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoSource, key) { var path = [sudoSource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } // add bulk style start function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCountdownWrapper(sudoScource, cssObj) { let obj = Object.assign({}, countdownWrapper); obj[sudoScource] = cssObj; setAttributes({ countdownWrapper: obj }); var selector = myStore.getElementSelector(sudoScource, countdownWrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddInner(sudoScource, cssObj) { let obj = Object.assign({}, inner); obj[sudoScource] = cssObj; setAttributes({ inner: obj }); var selector = myStore.getElementSelector(sudoScource, innerSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSecondWrap(sudoScource, cssObj) { let obj = Object.assign({}, secondWrap); obj[sudoScource] = cssObj; setAttributes({ secondWrap: obj }); var selector = myStore.getElementSelector(sudoScource, secondWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSecond(sudoScource, cssObj) { let obj = Object.assign({}, second); obj[sudoScource] = cssObj; setAttributes({ second: obj }); var selector = myStore.getElementSelector(sudoScource, secondSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddMinuteWrap(sudoScource, cssObj) { let obj = Object.assign({}, minuteWrap); obj[sudoScource] = cssObj; setAttributes({ minuteWrap: obj }); var selector = myStore.getElementSelector(sudoScource, minuteWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddMinute(sudoScource, cssObj) { let obj = Object.assign({}, minute); obj[sudoScource] = cssObj; setAttributes({ minute: obj }); var selector = myStore.getElementSelector(sudoScource, minuteSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHourWrap(sudoScource, cssObj) { let obj = Object.assign({}, hourWrap); obj[sudoScource] = cssObj; setAttributes({ hourWrap: obj }); var selector = myStore.getElementSelector(sudoScource, hourWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddHour(sudoScource, cssObj) { let obj = Object.assign({}, hour); obj[sudoScource] = cssObj; setAttributes({ hour: obj }); var selector = myStore.getElementSelector(sudoScource, hourSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddDayWrap(sudoScource, cssObj) { let obj = Object.assign({}, dayWrap); obj[sudoScource] = cssObj; setAttributes({ dayWrap: obj }); var selector = myStore.getElementSelector(sudoScource, dayWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddDay(sudoScource, cssObj) { let obj = Object.assign({}, day); obj[sudoScource] = cssObj; setAttributes({ day: obj }); var selector = myStore.getElementSelector(sudoScource, daySelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSeparator(sudoScource, cssObj) { let obj = Object.assign({}, separator); obj[sudoScource] = cssObj; setAttributes({ separator: obj }); var selector = myStore.getElementSelector(sudoScource, separatorSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCount(sudoScource, cssObj) { let obj = Object.assign({}, count); obj[sudoScource] = cssObj; setAttributes({ count: obj }); var selector = myStore.getElementSelector(sudoScource, countSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // add bulk style end // reset style start function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetCountdownWrapper(sudoScources) { let obj = Object.assign({}, countdownWrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, countdownWrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ countdownWrapper: obj }); } function onResetInner(sudoScources) { let obj = Object.assign({}, inner); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, innerSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ inner: obj }); } function onResetItems(sudoScources) { let obj = Object.assign({}, items); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, itemsSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ items: obj }); } function onResetSecondWrap(sudoScources) { let obj = Object.assign({}, secondWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, secondWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ secondWrap: obj }); } function onResetSecond(sudoScources) { let obj = Object.assign({}, second); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, secondSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ second: obj }); } function onResetMinuteWrap(sudoScources) { let obj = Object.assign({}, minuteWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, minuteWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ minuteWrap: obj }); } function onResetMinute(sudoScources) { let obj = Object.assign({}, minute); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, minuteSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ minute: obj }); } function onResetHourWrap(sudoScources) { let obj = Object.assign({}, hourWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, hourWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ hourWrap: obj }); } function onResetHour(sudoScources) { let obj = Object.assign({}, hour); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, hourSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ hour: obj }); } function onResetDayWrap(sudoScources) { let obj = Object.assign({}, dayWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, dayWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ dayWrap: obj }); } function onResetDay(sudoScources) { let obj = Object.assign({}, day); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, daySelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ day: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } function onResetSeparator(sudoScources) { let obj = Object.assign({}, separator); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ separator: obj }); } function onResetLabel(sudoScources) { let obj = Object.assign({}, label); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ label: obj }); } function onResetCount(sudoScources) { let obj = Object.assign({}, count); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, countSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ count: obj }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } // reset style end String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[countdownWrapperSelector] = countdownWrapper; blockCssObj[labelSelector] = label; blockCssObj[iconSelector] = icon; blockCssObj[innerSelector] = inner; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; blockCssObj[separatorSelector] = separator; blockCssObj[itemsSelector] = items; blockCssObj[secondWrapSelector] = secondWrap; blockCssObj[secondSelector] = second; blockCssObj[minuteWrapSelector] = minuteWrap; blockCssObj[minuteSelector] = minute; blockCssObj[hourWrapSelector] = hourWrap; blockCssObj[hourSelector] = hour; blockCssObj[dayWrapSelector] = dayWrap; blockCssObj[daySelector] = day; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var itemX = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: itemX } }); }, [blockId]); var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {}, [second]); const CustomTagWrapper = `${wrapper.options.tag}`; const CustomTagPostTitle = `${second.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3 pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pb-3 mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Date Countdown Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: typeArgs[dateCountdown.options == undefined ? dateCountdown.type : dateCountdown.options.type] == undefined ? "Choose" : typeArgs[dateCountdown.options == undefined ? dateCountdown.type : dateCountdown.options.type].label, options: typeArgs, onChange: setType, value: [] })), dateCountdown.options.type == "fixed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, dateCountdown.options.startDateSrc?.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "block mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 mb-2 " }, "Start Date?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("br", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { type: "datetime-local", className: "b-2", value: dateCountdown.options.startDate, onChange: newVal => { var options = { ...dateCountdown.options, startDate: newVal }; setAttributes({ dateCountdown: { ...dateCountdown, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Start Date Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.SelectControl, { label: "", value: dateCountdown.options.startDateSrc, options: [{ label: "Choose", value: "" }, { label: "WooCommerce Sale price dates", value: "wc_sale_price_date_from" }], onChange: newVal => { var options = { ...dateCountdown.options, startDateSrc: newVal }; setAttributes({ dateCountdown: { ...dateCountdown, options: options } }); } })), dateCountdown.options.endDateSrc.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "block mb-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 mb-2 " }, "End Date?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { type: "datetime-local", className: "mr-2", value: dateCountdown.options.endDate, onChange: newVal => { var options = { ...dateCountdown.options, endDate: newVal }; setAttributes({ dateCountdown: { ...dateCountdown, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "End Date Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.SelectControl, { label: "", value: dateCountdown.options.endDateSrc, options: [{ label: "Choose", value: "" }, { label: "WooCommerce Sale price dates", value: "wc_sale_price_date_to" }], onChange: newVal => { var options = { ...dateCountdown.options, endDateSrc: newVal }; setAttributes({ dateCountdown: { ...dateCountdown, options: options } }); } }))), dateCountdown.options.type == "everGreen" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { label: "Day", type: "number", className: "mr-2", placeholder: "Enter Day", value: dateCountdown.options.everGreenTime.day, onChange: newVal => { var options = { ...dateCountdown.options }; var everGreenTimeX = { ...options.everGreenTime, day: newVal }; // var everGreenX = {...options, day: newVal} var optionX = { ...options, everGreenTime: everGreenTimeX }; setAttributes({ dateCountdown: { ...dateCountdown, options: optionX } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { label: "Hour", type: "number", className: "mr-2", placeholder: "Enter Hour", value: dateCountdown.options.everGreenTime.hour, onChange: newVal => { var options = { ...dateCountdown.options }; var everGreenTimeX = { ...options.everGreenTime, hour: newVal }; var optionX = { ...options, everGreenTime: everGreenTimeX }; setAttributes({ dateCountdown: { ...dateCountdown, options: optionX } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { label: "Minute", type: "number", className: "mr-2", placeholder: "Enter Minute", value: dateCountdown.options.everGreenTime.minute, onChange: newVal => { var options = { ...dateCountdown.options, durationMinute: newVal }; var everGreenTimeX = { ...options.everGreenTime, minute: newVal }; var optionX = { ...options, everGreenTime: everGreenTimeX }; setAttributes({ dateCountdown: { ...dateCountdown, options: optionX } }); } }))), dateCountdown.options.type == "scheduled" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { onClick: ev => { var scheduleTimeX = scheduleTime.concat({ startTime: "", endTime: "", weekdays: { value: "0", values: [], compare: "=" } }); setAttributes({ scheduleTime: scheduleTimeX }); } }, "Add Schedule Time")), scheduleTime.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "bg-red-400 text-white my-3 px-3 py-2 text-center" }, "No Schedule added"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_5__.ReactSortable, { list: scheduleTime, handle: ".handle", setList: item => { setAttributes({ scheduleTime: scheduleTime }); } }, scheduleTime.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var scheduleTimeX = [...scheduleTime]; scheduleTimeX.splice(index, 1); setAttributes({ scheduleTime: scheduleTimeX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })), index), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Start Time"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { type: "time", value: item.startTime, onChange: newVal => { var scheduleTimeX = [...scheduleTime]; scheduleTimeX[index].startTime = newVal; setAttributes({ scheduleTime: scheduleTimeX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "End Time"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { type: "time", value: item.endTime, onChange: newVal => { var scheduleTimeX = [...scheduleTime]; scheduleTimeX[index].endTime = newVal; setAttributes({ scheduleTime: scheduleTimeX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Compare"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.SelectControl, { label: "", value: item.weekdays?.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: "<", value: "<" }, { label: ">=", value: ">=" }, { label: "<=", value: "<=" }, { label: "between", value: "between" }, { label: "exist", value: "exist" }], onChange: newVal => { var scheduleTimeX = [...scheduleTime]; scheduleTimeX[index].weekdays.compare = newVal; setAttributes({ scheduleTime: scheduleTimeX }); } })), (item.weekdays?.compare == "=" || item.weekdays?.compare == "!=" || item.weekdays?.compare == ">" || item.weekdays?.compare == "<" || item.weekdays?.compare == ">=" || item.weekdays?.compare == "<=") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: item.weekdays?.value?.length == 0 ? "Choose Day" : weekDayNumn[item.weekdays?.value]?.label, options: [{ label: "Sunday", value: 0 }, { label: "Monday", value: 1 }, { label: "Tuesday", value: 2 }, { label: "Wednesday", value: 3 }, { label: "Thursday", value: 4 }, { label: "Friday", value: 5 }, { label: "Saturday", value: 6 }], onChange: newVal => { var scheduleTimeX = [...scheduleTime]; scheduleTimeX[index].weekdays.value = newVal.value; setAttributes({ scheduleTime: scheduleTimeX }); }, value: item.weekdays.value }))), (item.weekdays?.compare == "between" || item.weekdays?.compare == "exist") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { htmlFor: "" }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose Days", options: [{ label: "Sunday", value: 0 }, { label: "Monday", value: 1 }, { label: "Tuesday", value: 2 }, { label: "Wednesday", value: 3 }, { label: "Thursday", value: 4 }, { label: "Friday", value: 5 }, { label: "Saturday", value: 6 }], onChange: newVal => { var scheduleTimeX = [...scheduleTime]; if (scheduleTimeX[index].weekdays.values.includes(newVal.value)) { // Remove the value if already selected scheduleTimeX[index].weekdays.values = scheduleTimeX[index].weekdays.values.filter(value => value !== newVal.value); } else { // Add the value if not already selected scheduleTimeX[index].weekdays.values.push(newVal.value); } setAttributes({ scheduleTime: scheduleTimeX }); }, value: item.weekdays.values })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("br", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, item.weekdays.values.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between my-1", key: i }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, weekDayNumn[x].label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-red-500 text-white p-1 cursor-pointer hover:", onClick: ev => { var scheduleTimeX = [...scheduleTime]; // Remove the value when the "X" is clicked scheduleTimeX[index].weekdays.values = scheduleTimeX[index].weekdays.values.filter(value => value !== x); setAttributes({ scheduleTime: scheduleTimeX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] }))); }))))))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Expired Arguments", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className="bg-blue-500 p-2 px-4 text-white inline-block cursor-pointer rounded-sm" className: "pg-font flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var expiredArgX = { ...expiredArg }; var index = Object.entries(expiredArgX).length; expiredArgX[index] = { logic: "OR", title: "", args: [] }; setAttributes({ expiredArg: expiredArgX }); } }, "Add Group"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, Object.entries(expiredArg).map((group, groupIndex) => { var groupId = group[0]; var groupData = group[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgGroup, { title: groupIndex, index: groupId }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Condition", options: expiredArgs, onChange: (option, index) => { var expiredArgX = { ...expiredArg }; expiredArgX[groupId]["args"].push(option.args); setAttributes({ expiredArg: expiredArgX }); }, values: "" })), expiredArg[groupId]["args"] != undefined && expiredArg[groupId]["args"].map((item, index) => { var id = item.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "redirectURL" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgArgs, { title: expiredArgs[id] == undefined ? id : expiredArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Write URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { className: "mr-2", placeholder: "Enter URL", value: item.value, onChange: newVal => { var expiredArgX = { ...expiredArg }; expiredArgX[groupId]["args"][index].value = newVal; setAttributes({ expiredArg: expiredArgX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Delay"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { className: "mr-2", placeholder: "Add delay in millisecond", value: item.delay, onChange: newVal => { var expiredArgX = { ...expiredArg }; expiredArgX[groupId]["args"][index].delay = newVal; setAttributes({ expiredArg: expiredArgX }); } })))), id == "wcHideCartButton" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgArgs, { title: expiredArgs[id] == undefined ? id : expiredArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "showExpiredMsg" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgArgs, { title: expiredArgs[id] == undefined ? id : expiredArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "hideCountdown" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgArgs, { title: expiredArgs[id] == undefined ? id : expiredArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "showElement" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgArgs, { title: expiredArgs[id] == undefined ? id : expiredArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "ID/Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { className: "mr-2", placeholder: ".element or #element", value: item.value, onChange: newVal => { var expiredArgX = { ...expiredArg }; expiredArgX[groupId]["args"][index].value = newVal; setAttributes({ expiredArg: expiredArgX }); } })))), id == "showPopup" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveExpiredArgArgs, { title: expiredArgs[id] == undefined ? id : expiredArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."))); })); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_26__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_27__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Countdown Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: countdownWrapper, onChange: onChangeStyleCountdownWrapper, onAdd: onAddStyleCountdownWrapper, onRemove: onRemoveStyleCountdownWrapper, onBulkAdd: onBulkAddCountdownWrapper, onReset: onResetCountdownWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: countdownWrapper, onChange: onPickCssLibraryCountdownWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Message Area", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.ToggleControl, { label: "Enable on Expired?", className: "my-4", style: { color: "#1f2937" }, help: innerEnable ? "Message area enabled" : "Message area disabled.", checked: innerEnable ? true : false, onChange: e => { var options = { ...inner.options, enable: inner.options.enable ? false : true }; setAttributes({ inner: { ...inner, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: inner, onChange: onChangeStyleInner, onAdd: onAddStyleInner, onRemove: onRemoveStyleInner, onBulkAdd: onBulkAddInner, onReset: onResetInner })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: inner, onChange: onPickCssLibraryInner })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: items, onChange: onChangeStyleItems, onAdd: onAddStyleItems, onRemove: onRemoveStyleItems, onBulkAdd: onBulkAddItems, onReset: onResetItems })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: items, onChange: onPickCssLibraryItems })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Second", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: second.options.label, onChange: newVal => { var options = { ...second.options, label: newVal }; setAttributes({ second: { styles: second.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: second.options.prefix, onChange: newVal => { var options = { ...second.options, prefix: newVal }; setAttributes({ second: { styles: second.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: second.options.postfix, onChange: newVal => { var options = { ...second.options, postfix: newVal }; setAttributes({ second: { styles: second.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Second Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [ // { // name: "options", // title: "Options", // icon: settings, // className: "tab-settings", // }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: secondWrap, onChange: onChangeStyleSecondWrap, onAdd: onAddStyleSecondWrap, onRemove: onRemoveStyleSecondWrap, onBulkAdd: onBulkAddSecondWrap, onReset: onResetSecondWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: secondWrap, onChange: onPickCssLibrarySecondWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Second Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [ // { // name: "options", // title: "Options", // icon: settings, // className: "tab-settings", // }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: second, onChange: onChangeStyleSecondCountdown, onAdd: onAddStyleSecondCountdown, onRemove: onRemoveStyleSecondCountdown, onBulkAdd: onBulkAddSecond, onReset: onResetSecond })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: second, onChange: onPickCssLibrarySecondCountdown }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Minute", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: minute.options.label, onChange: newVal => { var options = { ...minute.options, label: newVal }; setAttributes({ minute: { styles: minute.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: minute.options.prefix, onChange: newVal => { var options = { ...minute.options, prefix: newVal }; setAttributes({ minute: { styles: minute.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: minute.options.postfix, onChange: newVal => { var options = { ...minute.options, postfix: newVal }; setAttributes({ minute: { styles: minute.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Minute Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: minuteWrap, onChange: onChangeStyleMinuteWrap, onAdd: onAddStyleMinuteWrap, onRemove: onRemoveStyleMinuteWrap, onBulkAdd: onBulkAddMinuteWrap, onReset: onResetMinuteWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: minuteWrap, onChange: onPickCssLibraryMinuteWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Minute Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: minute, onChange: onChangeStyleMinuteCountdown, onAdd: onAddStyleMinuteCountdown, onRemove: onRemoveStyleMinuteCountdown, onBulkAdd: onBulkAddMinute, onReset: onResetMinute })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: minute, onChange: onPickCssLibraryMinuteCountdown }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Hour", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: hour.options.label, onChange: newVal => { var options = { ...hour.options, label: newVal }; setAttributes({ hour: { styles: hour.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: hour.options.prefix, onChange: newVal => { var options = { ...hour.options, prefix: newVal }; setAttributes({ hour: { styles: hour.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: hour.options.postfix, onChange: newVal => { var options = { ...hour.options, postfix: newVal }; setAttributes({ hour: { styles: hour.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Hour Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: hourWrap, onChange: onChangeStyleHourWrap, onAdd: onAddStyleHourWrap, onRemove: onRemoveStyleHourWrap, onBulkAdd: onBulkAddHourWrap, onReset: onResetHourWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: hourWrap, onChange: onPickCssLibraryHourWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Hour Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: hour, onChange: onChangeStyleHourCountdown, onAdd: onAddStyleHourCountdown, onRemove: onRemoveStyleHourCountdown, onBulkAdd: onBulkAddHour, onReset: onResetHour })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: hour, onChange: onPickCssLibraryHourCountdown }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Day", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: day.options.label, onChange: newVal => { var options = { ...day.options, label: newVal }; setAttributes({ day: { styles: day.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: day.options.prefix, onChange: newVal => { var options = { ...day.options, prefix: newVal }; setAttributes({ day: { styles: day.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix:", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: day.options.postfix, onChange: newVal => { var options = { ...day.options, postfix: newVal }; setAttributes({ day: { styles: day.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Day Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: dayWrap, onChange: onChangeStyleDayWrap, onAdd: onAddStyleDayWrap, onRemove: onRemoveStyleDayWrap, onBulkAdd: onBulkAddDayWrap, onReset: onResetDayWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: dayWrap, onChange: onPickCssLibraryDayWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Day Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: day, onChange: onChangeStyleDayCountdown, onAdd: onAddStyleDayCountdown, onRemove: onRemoveStyleDayCountdown, onBulkAdd: onBulkAddDay, onReset: onResetDay })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: day, onChange: onPickCssLibraryDayCountdown }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.ToggleControl, { label: "Enable Icon?", className: "my-4", help: iconEnable ? "Icon enabled" : "Icon disabled.", checked: iconEnable ? true : false, onChange: e => { var options = { ...icon.options, enable: icon.options.enable ? false : true }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Separator", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: separator.options.text, onChange: newVal => { var options = { ...separator.options, text: newVal }; setAttributes({ separator: { styles: separator.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.ToggleControl, { label: "Enable Separator?", className: "my-4", help: separatorEnable ? "Separator enabled" : "Separator disabled.", checked: separatorEnable ? true : false, onChange: e => { var options = { ...separator.options, enable: separator.options.enable ? false : true }; setAttributes({ separator: { ...separator, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.SelectControl, { label: "", value: separator.options.position, options: [{ label: "Choose Position", value: "" }, { label: "After Postfix", value: "afterPostfix" }, { label: "After Each Items", value: "afterEachItems" }], onChange: newVal => { var options = { ...separator.options, position: newVal }; setAttributes({ separator: { ...separator, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: separator, onChange: onChangeStyleSeparator, onAdd: onAddStyleSeparator, onRemove: onRemoveStyleSeparator, onBulkAdd: onBulkAddSeparator, onReset: onResetSeparator })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: separator, onChange: onPickCssLibrarySeparator })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Counter", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Counter CSS Class:"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.__experimentalInputControl, { value: count.options.class, onChange: newVal => { var options = { ...count.options, class: newVal }; setAttributes({ count: { styles: count.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: count, onChange: onChangeStyleCount, onAdd: onAddStyleCount, onRemove: onRemoveStyleCount, onBulkAdd: onBulkAddCount, onReset: onResetCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: count, onChange: onPickCssLibraryCount })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.ToggleControl, { label: "Enable Label?", className: "my-4", help: labelEnable ? "Label enabled" : "Label disabled.", checked: labelEnable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.SelectControl, { label: "", value: label.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...label.options, position: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel, onReset: onResetLabel })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: label, onChange: onPickCssLibraryLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.ToggleControl, { label: "Enable Prefix?", className: "my-4", help: prefixEnable ? "Prefix enabled" : "Prefix disabled.", checked: prefixEnable ? true : false, onChange: e => { var options = { ...prefix.options, enable: prefix.options.enable ? false : true }; setAttributes({ prefix: { ...prefix, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_34__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.ToggleControl, { label: "Enable Postfix?", className: "my-4", help: postfixEnable ? "Postfix enabled" : "Postfix disabled.", checked: postfixEnable ? true : false, onChange: e => { var options = { ...postfix.options, enable: postfix.options.enable ? false : true }; setAttributes({ postfix: { ...postfix, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_23__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_10__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_18__["default"], { blockName: "date-countdown", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_28__["default"], { slug: "date-countdown" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/text", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { blockName: "date-countdown", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, !editMode && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center inline-block mx-auto", onClick: e => { setAttributes({ editMode: editMode ? false : true }); } }, "Enable Edit Mode"), editMode && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "countdown-wrapper" }, iconEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), dayEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `${items.options.class} ${dayWrap.options.class}` }, labelEnable && label.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, day.options.label), prefixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, day.options.prefix), labelEnable && label.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, day.options.label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: `${day.options.class} ${count.options.class} ` }, dateCountdown.options.type == "fixed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindDay), dateCountdown.options.type == "everGreen" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindDays), dateCountdown.options.type == "scheduled" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "00")), labelEnable && label.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, day.options.label), postfixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, day.options.postfix), labelEnable && label.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, day.options.label), separatorEnable && separator.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: separator.options.class }, separator.options.text)), dayEnable && separatorEnable && separator.options.position == "afterEachItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: separator.options.class }, separator.options.text), hourEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `${items.options.class} ${hourWrap.options.class}` }, labelEnable && label.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, hour.options.label), prefixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, hour.options.prefix), labelEnable && label.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, hour.options.label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: `${hour.options.class} ${count.options.class} ` }, dateCountdown.options.type == "fixed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindHour), dateCountdown.options.type == "everGreen" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindHours), dateCountdown.options.type == "scheduled" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "00")), labelEnable && label.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, hour.options.label), postfixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, hour.options.postfix), labelEnable && label.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, hour.options.label), separatorEnable && separator.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: separator.options.class }, separator.options.text)), hourEnable && separatorEnable && separator.options.position == "afterEachItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: separator.options.class }, separator.options.text), minuteEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `${items.options.class} ${minuteWrap.options.class}` }, labelEnable && label.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, minute.options.label), prefixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, minute.options.prefix), labelEnable && label.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, minute.options.label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: `${minute.options.class} ${count.options.class} ` }, dateCountdown.options.type == "fixed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindMinute), dateCountdown.options.type == "everGreen" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindMinutes), dateCountdown.options.type == "scheduled" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "00")), labelEnable && label.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, minute.options.label), postfixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, minute.options.postfix), labelEnable && label.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, minute.options.label), separatorEnable && separator.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: separator.options.class }, separator.options.text)), minuteEnable && separatorEnable && separator.options.position == "afterEachItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: separator.options.class }, separator.options.text), secondEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `${items.options.class} ${secondWrap.options.class}` }, labelEnable && label.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, second.options.label), prefixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, second.options.prefix), labelEnable && label.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, second.options.label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: `${second.options.class} ${count.options.class} ` }, dateCountdown.options.type == "fixed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindSecond), dateCountdown.options.type == "everGreen" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, remindSeconds), dateCountdown.options.type == "scheduled" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "00")), labelEnable && label.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, second.options.label), postfixEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, second.options.postfix), labelEnable && label.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: label.options.class }, second.options.label))), innerEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "inner" }, innerBlocksProps.children))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/date-countdown/variations.js": /*!*************************************************!*\ !*** ./src/blocks/date-countdown/variations.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "preset-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-date-countdown" }, styles: {} }, count: { options: { enable: true, text: "", class: "count", position: "" }, styles: {} }, dateCountdown: { options: { tag: "div", class: "", type: "fixed", endDate: "2023-11-05T13:17", startDate: "2023-10-00T15:11", endDateSrc: "", startDateSrc: "", everGreenTime: { day: "1", hour: "1", minute: "10", second: "" }, scheduleTime: [{ startTime: "", endTime: "", weekdays: [] }], durationMinute: "10" } }, scheduleTime: [{ startTime: "05:11", endTime: "20:58", weekdays: { value: 3, values: [0, 4], compare: "=" }, chosen: false, selected: false }], countdownWrapper: { styles: { backgroundColor: { Desktop: "#9DD6DF" }, display: { Desktop: "flex" }, alignItems: { Desktop: "center" }, justifyContent: { Desktop: "center" }, width: { Desktop: "max-content" }, borderRadius: { Desktop: "20px 20px 20px 20px" }, padding: { Desktop: "30px 30px 30px 30px" }, gap: { Desktop: "20px" }, marginRight: { Desktop: "auto" }, marginLeft: { Desktop: "auto" } } }, inner: { options: { enable: true, tag: "div", class: "" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, items: { options: { tag: "div", class: "items", secondEnable: true, minuteEnable: true, hourEnable: true, dayEnable: true }, styles: { color: { Desktop: "#000000" }, margin: { Desktop: "0px 0px 0px 0px !important" }, fontSize: { Desktop: "30px" }, fontFamily: { Desktop: "Righteous" }, fontWeight: { Desktop: "600" }, fontStyle: { Desktop: "normal" } } }, secondWrap: { options: { enable: true, tag: "div", class: "second-wrapper", label: "", prefix: "" }, styles: {} }, second: { styles: { color: { Desktop: "#d9eaf2" }, backgroundColor: { Desktop: "#18978F" }, padding: { Desktop: "20px 20px 20px 20px" }, textDecoration: { Desktop: "none #000000 wavy 1px" }, transition: { Desktop: "all 0.4s ease 0s" }, fontSize: { Desktop: "5rem" }, fontWeight: { Desktop: "700" }, textShadow: { Desktop: "5px 5px 0px #4d4d4d" }, display: { Desktop: "flex" }, flexDirection: { Desktop: "column" }, alignItems: { Desktop: "center" }, borderRadius: { Desktop: "10px 10px 10px 10px" } }, options: { tag: "div", class: "second-countdown", label: "Seconds", prefix: "", postfix: "", enable: true } }, minuteWrap: { options: { enable: true, tag: "div", class: "minute-wrapper", label: "", prefix: "" }, styles: {} }, minute: { styles: { color: { Desktop: "#d9eaf2" }, backgroundColor: { Desktop: "#18978F" }, padding: { Desktop: "20px 20px 20px 20px" }, textDecoration: { Desktop: "none #000000 wavy 1px" }, transition: { Desktop: "all 0.4s ease 0s" }, fontSize: { Desktop: "5rem" }, fontWeight: { Desktop: "700" }, textShadow: { Desktop: "5px 5px 0px #4d4d4d" }, display: { Desktop: "flex" }, flexDirection: { Desktop: "column" }, alignItems: { Desktop: "center" }, borderRadius: { Desktop: "10px 10px 10px 10px" } }, options: { tag: "div", class: "minute-countdown", label: "Minutes", prefix: "", postfix: "", enable: true } }, hourWrap: { options: { enable: true, tag: "div", class: "hour-wrapper", label: "", prefix: "" }, styles: {} }, hour: { styles: { color: { Desktop: "#d9eaf2" }, backgroundColor: { Desktop: "#18978F" }, padding: { Desktop: "20px 20px 20px 20px" }, textDecoration: { Desktop: "none #000000 wavy 1px" }, transition: { Desktop: "all 0.4s ease 0s" }, fontSize: { Desktop: "5rem" }, fontWeight: { Desktop: "700" }, textShadow: { Desktop: "5px 5px 0px #4d4d4d" }, display: { Desktop: "flex" }, flexDirection: { Desktop: "column" }, alignItems: { Desktop: "center" }, borderRadius: { Desktop: "10px 10px 10px 10px" } }, options: { tag: "div", class: "hour-countdown", label: "Hours", prefix: "", postfix: "", enable: true } }, dayWrap: { options: { enable: true, tag: "div", class: "day-wrapper", label: "", prefix: "" }, styles: {} }, day: { styles: { color: { Desktop: "#d9eaf2" }, backgroundColor: { Desktop: "#18978F" }, padding: { Desktop: "20px 20px 20px 20px" }, textDecoration: { Desktop: "none #000000 wavy 1px" }, transition: { Desktop: "all 0.4s ease 0s" }, fontSize: { Desktop: "5rem" }, fontWeight: { Desktop: "700" }, textShadow: { Desktop: "5px 5px 0px #4d4d4d" }, display: { Desktop: "flex" }, flexDirection: { Desktop: "column" }, alignItems: { Desktop: "center" }, borderRadius: { Desktop: "10px 10px 10px 10px" } }, options: { tag: "div", class: "day-countdown", label: "Days", prefix: "", postfix: "", enable: true } }, icon: { options: { enable: false, library: "fontAwesome", srcType: "class", iconSrc: "far fa-calendar-alt", position: "", class: "date-countdown-icon" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, separator: { options: { text: ":", class: "separator", position: "afterEachItems" }, styles: { color: { Desktop: "#d9eaf2" }, textDecoration: { Desktop: "none #000000 wavy 1px" }, transition: { Desktop: "all 0.4s ease 0s" }, fontSize: { Desktop: "5rem" }, fontWeight: { Desktop: "700" }, textShadow: { Desktop: "5px 5px 0px #4d4d4d" } } }, label: { options: { enable: true, text: "", class: "label", position: "" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, prefix: { options: { text: "", class: "prefix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 10px 0px 0px" } } }, postfix: { options: { text: "", class: "postfix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 0px 0px 10px" } } }, expiredArg: {}, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/text", {}]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "16.02", y: "29.98", width: "302.52", height: "201.47", rx: "0.73" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#939598", cx: "318.54", cy: "29.98", r: "25.44" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M320.11,30l9.54-9.54a1.12,1.12,0,0,0,0-1.57,1.1,1.1,0,0,0-1.56,0l-9.55,9.55L309,18.87a1.1,1.1,0,0,0-1.56,0,1.12,1.12,0,0,0,0,1.57L317,30l-9.55,9.55a1.12,1.12,0,0,0,0,1.57,1.13,1.13,0,0,0,.78.32,1.1,1.1,0,0,0,.78-.32l9.55-9.55,9.55,9.55a1.11,1.11,0,1,0,1.56-1.57Z" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/flex-wrap-item/index.js": /*!********************************************!*\ !*** ./src/blocks/flex-wrap-item/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/flex-wrap-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8388 42H0V117.1H36.8388V42Z", fill: "url(#paint0_linear_61_757)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 42H123.161V117.1H160V42Z", fill: "url(#paint1_linear_61_757)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M110.915 42H49.1846V117.1H110.915V42Z", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_757", x1: "0", y1: "79.55", x2: "36.8388", y2: "79.55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_757", x1: "123.161", y1: "79.55", x2: "160", y2: "79.55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); const CustomTagWrapper = `${wrapper.options.tag}`; var postUrl = wrapper.options.customUrl != undefined && wrapper.options.customUrl.length > 0 ? wrapper.options.customUrl : currentPostUrl; var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("linkToArgs", linkToArgsBasic); var flexWrapItemWrapperTagArgsBasic = { none: { label: "Choose Tag", value: "" }, h1: { label: "H1", value: "h1" }, h2: { label: "H2", value: "h2" }, h3: { label: "H3", value: "h3" }, h4: { label: "H4", value: "h4" }, h5: { label: "H5", value: "h5" }, h6: { label: "H6", value: "h6" }, span: { label: "SPAN", value: "span" }, div: { label: "DIV", value: "div" }, p: { label: "P", value: "p" }, a: { label: "A", value: "a", isPro: true } }; let wrapperTagArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("postGridFlexWrapItemTags", flexWrapItemWrapperTagArgsBasic); function setWrapperTag(option, index) { var options = { ...wrapper.options, tag: option.value }; setAttributes({ wrapper: { ...wrapper, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function generateElementSudoCss(obj) { var stylesObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options") { var selector = myStore.getElementSelector(sudoSrc, wrapperSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); } }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var elementCss = generateElementSudoCss(wrapper); }, [wrapper]); function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [ //['core/paragraph', { placeholder: '', content: 'Hello Text...' }], ]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} border border-dashed` }); const CustomTag = `${wrapper.options.tag}`; //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InnerBlocks.ButtonBlockAppender }); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function setFieldLinkTo(option, index) { var options = { ...wrapper.options, linkTo: option.value }; setAttributes({ wrapper: { ...wrapper, options: options } }); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InspectorControls, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_22__["default"], { position: "bottom right", variant: "secondary", options: wrapperTagArgs, buttonTitle: wrapper.options.tag.length == 0 ? "Choose" : wrapperTagArgs[wrapper.options.tag].label, onChange: setWrapperTag, values: [] })), wrapper.options.tag == "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_22__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: wrapper.options.linkTo == undefined ? "Choose" : linkToArgs[wrapper.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), wrapper.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: wrapper.options.linkToAuthorMeta, onChange: newVal => { var options = { ...wrapper.options, linkToAuthorMeta: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), wrapper.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: wrapper.options.linkToAuthorMeta, onChange: newVal => { var options = { ...wrapper.options, linkToAuthorMeta: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), wrapper.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), wrapper.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], onClick: ev => { var options = { ...wrapper.options, customUrl: "" }; setAttributes({ wrapper: { ...wrapper, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.__experimentalLinkControl, { settings: [], value: wrapper.options.customUrl, onChange: newVal => { var options = { ...wrapper.options, customUrl: newVal.url }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", wrapper.options.customUrl.length != 0 ? wrapper.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...wrapper.options, linkTarget: newVal }; setAttributes({ text: { ...text, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag == "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { onClick: handleLinkClick, href: postUrl, target: wrapper.options.linkTarget }), innerBlocksProps.children), wrapper.options.tag != "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/flex-wrap/index.js": /*!***************************************!*\ !*** ./src/blocks/flex-wrap/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./variations */ "./src/blocks/flex-wrap/variations.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/flex-wrap/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8388 42H0V117.1H36.8388V42Z", fill: "url(#paint0_linear_61_756)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 42H123.161V117.1H160V42Z", fill: "url(#paint1_linear_61_756)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M110.915 42H49.1846V117.1H110.915V42Z", fill: "url(#paint2_linear_61_756)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_756", x1: "0", y1: "79.55", x2: "36.8388", y2: "79.55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_756", x1: "123.161", y1: "79.55", x2: "160", y2: "79.55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_756", x1: "49.1846", y1: "79.55", x2: "110.915", y2: "79.55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/columns"], transform: (attributes, innerBlocks) => { var innerBlockX = innerBlocks.map((item, index) => { var widthX = item.attributes.width; console.log(widthX); var backgroundColorX = item.attributes.backgroundColor; return { clientId: item.clientId, name: item.name == "core/column" ? "post-grid/flex-wrap-item" : item.name, isValid: item.isValid, originalContent: "", validationIssues: [], attributes: { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: widthX }, backgroundColor: { Desktop: "var(--wp--preset--color--" + backgroundColorX + ") !important" } } }, blockId: "pgfaaa4b544973abc", blockCssY: { items: {} } }, innerBlocks: item.innerBlocks }; }); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/flex-wrap", { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } }, item: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { flexGrow: { Desktop: "1" } } } }, innerBlockX); } }, { type: "block", blocks: ["core/group"], transform: (attributes, innerBlocks) => { if (attributes.layout.type == "flex") { var flexWrap = attributes.layout.flexWrap; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/flex-wrap", { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" }, flexDirection: { Desktop: flexWrap == undefined ? "column" : "row" } } }, item: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { flexGrow: { Desktop: "1" } } } }, innerBlocks); } } }], to: [{ type: "block", blocks: ["core/columns"], transform: (attributes, innerBlocks) => { var innerBlockX = innerBlocks.map((item, index) => { // var widthX = ""; // widthX = item.attributes.wrapper?.styles.width.Desktop; return { clientId: item.clientId, name: item.name == "post-grid/flex-wrap-item" ? "core/column" : item.name, isValid: item.isValid, originalContent: "", validationIssues: [], attributes: { // width: item.name == "post-grid/flex-wrap-item" ? widthX : "", blockId: "pgfaaa4b544973abc", blockCssY: { items: {} } }, innerBlocks: item.innerBlocks }; }); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/columns", {}, innerBlockX); } }, { type: "block", blocks: ["core/group"], transform: (attributes, innerBlocks) => { var direction = attributes.wrapper.styles?.flexDirection?.Desktop; if (direction == "column") { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/group", { tagName: "div", layout: { type: "flex", orientation: "vertical" } }, innerBlocks); } else { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/group", { tagName: "div", layout: { type: "flex", flexWrap: "nowrap" } }, innerBlocks); } } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var item = attributes.item; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var itemSelector = blockClass + " .pg-flex-wrap-item"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); var icons = { bed: "", layout: "", smiley: "", columns: "", globe: "" }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); // blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'display': { "Desktop": "flex" } }; //blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'gap': { "Desktop": "1em" } }; setAttributes({ blockCssY: { items: blockCssY.items } }); //setAttributes({ wrapper: { ...wrapper, styles: { display: { Desktop: 'flex' }, gap: { Desktop: '20px' } } } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = item; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function applyFlex(attr, newVal) { onChangeStyleWrapper("styles", newVal, attr); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, item); obj[sudoScource] = cssObj; setAttributes({ item: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } const ALLOWED_BLOCKS = ["post-grid/flex-wrap-item"]; const MY_TEMPLATE = [["post-grid/flex-wrap-item", {}], ["post-grid/flex-wrap-item", {}], ["post-grid/flex-wrap-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); const addChild = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/flex-wrap-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); //setActiveTab(slide.clientId); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addChild(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Flex Options", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 block my-3" }, "Justify Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "flex-start" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "flex-start"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex Start" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "5.5", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "11.44", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "17.39", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "flex-end" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "flex-end"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex End" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "14.94", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "20.88", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "26.83", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "center" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "center"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "10.22", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "22.11", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "space-between" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "space-between"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Space Between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "5.5", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "26.83", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "space-around" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "space-around"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Space Around" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "7.34", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.12", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "24.9", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "space-evenly" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "space-evenly"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Space Evenly" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "5.5", width: "3.67", height: "25" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 block" }, "Align Items"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "flex-start" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "flex-start"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex Start" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "5.5", width: "3.67", height: "8.88" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "16.42" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "5.5", width: "3.67", height: "12.5" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "flex-end" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "flex-end"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex End" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "21.62", width: "3.67", height: "8.88", transform: "translate(50.08 52.12) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "14.08", width: "3.67", height: "16.42", transform: "translate(36 44.58) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "18", width: "3.67", height: "12.5", transform: "translate(21.92 48.5) rotate(180)" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "center" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "center"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "13.56", width: "3.67", height: "8.88", transform: "translate(50.08 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "9.79", width: "3.67", height: "16.42", transform: "translate(36 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "13.56", width: "3.67", height: "8.88", transform: "translate(21.92 36) rotate(180)" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "stretch" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "stretch"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Stretch" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "9.79", width: "3.67", height: "16.42", transform: "translate(50.08 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "9.79", width: "3.67", height: "16.42", transform: "translate(36 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "9.79", width: "3.67", height: "16.42", transform: "translate(21.92 36) rotate(180)" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 block" }, "Flex Direction"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "row" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "row"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Row" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "5.5", y: "9.52", width: "3.67", height: "16.42" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "24.95 12.19 23.25 13.85 25.93 16.51 13.19 16.51 12.33 16.5 12.31 18.91 25.95 18.91 23.29 21.57 24.95 23.27 30.5 17.73 24.95 12.19" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "row-reverse" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "row-reverse"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Row Reverse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "26.83", y: "9.52", width: "3.67", height: "16.42", transform: "translate(57.33 35.45) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "11.05 12.19 12.75 13.85 10.07 16.51 22.81 16.51 23.67 16.5 23.69 18.91 10.04 18.91 12.71 21.57 11.05 23.27 5.5 17.73 11.05 12.19" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "column" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "column"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Column" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "20.45", width: "3.67", height: "16.42", transform: "translate(-10.66 46.66) rotate(-90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "23.54 11.05 21.88 12.75 19.21 10.07 19.21 22.81 19.22 23.67 16.82 23.69 16.81 10.04 14.16 12.71 12.46 11.05 18 5.5 23.54 11.05" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "column-reverse" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "column-reverse"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Column-reverse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "-0.87", width: "3.67", height: "16.42", transform: "translate(25.34 -10.66) rotate(90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "12.46 24.95 14.13 23.25 16.79 25.93 16.79 13.19 16.78 12.33 19.18 12.31 19.19 25.95 21.84 23.29 23.54 24.95 18 30.5 12.46 24.95" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 block" }, "Flex Wrap"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexWrap == undefined ? "bg-[#5655ff]" : wrapper.styles.flexWrap[breakPointX] == "wrap" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexWrap", "wrap"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "6.08", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "1.95", width: "3.67", height: "25", transform: "translate(32.45 -3.55) rotate(90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "16.79 18.15 15.81 19.11 17.35 20.65 6.01 20.65 5.51 20.64 5.5 22.03 17.37 22.03 15.83 23.56 16.79 24.54 19.99 21.35 16.79 18.15" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexWrap == undefined ? "bg-[#5655ff]" : wrapper.styles.flexWrap[breakPointX] == "wrap-reverse" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexWrap", "wrap-reverse"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Wrap-reverse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "6.08", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "10.21", width: "3.67", height: "25", transform: "translate(40.71 4.71) rotate(90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "8.7 19.01 9.68 18.05 8.14 16.51 19.48 16.51 19.98 16.51 19.99 15.13 8.12 15.12 9.66 13.6 8.7 12.61 5.5 15.81 8.7 19.01" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexWrap == undefined ? "bg-[#5655ff]" : wrapper.styles.flexWrap[breakPointX] == "nowrap" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexWrap", "nowrap"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "No-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "6.08", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25", transform: "translate(36) rotate(90)" })))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "flex-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "flex-wrap" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "flex-item-wrap" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "flex-item-wrap" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_24__["default"], { blockName: "flex-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class} ` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/flex-wrap/variations.js": /*!********************************************!*\ !*** ./src/blocks/flex-wrap/variations.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "1-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("1 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("1 Col"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }, { name: "2-columns", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("2-columns"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("2-columns"), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "119.78", width: "32.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "79.58", width: "72.71", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "72.71", height: "82.57" })), atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"] }, { name: "3-columns", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3-columns"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3-columns"), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "99.24", height: "82.57" })), atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "106.1", width: "46.18", height: "82.57" })) }, { name: "4-columns", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("4-columns"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("4-columns"), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })), atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "32.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "40.21", width: "31.66", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "80.41", width: "31.66", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "120.62", width: "31.66", height: "82.57" })) }, { name: "5-columns", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("5-columns"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("5-columns"), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })), atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "31.7", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "63.4", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "95.09", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "126.79", width: "25.5", height: "82.57" })) }, { name: "33-66", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("33-66"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("33-66"), isDefault: true, // isPro: !isProFeature ? false : true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "33%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "66%" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "99.24", height: "82.57" })) }, { name: "66-33", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("66-33"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("66-33"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "66%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "33%" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "99.24", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "106.1", width: "46.18", height: "82.57" })) }, { name: "25-50-25", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("25-50-25"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("25-50-25"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "50%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })) }, { name: "25-25-50", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("25-25-50"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("25-25-50"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "50%" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "31.29", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "38.16", width: "31.29", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "76.33", width: "75.96", height: "82.57" })) }, { name: "50-25-25", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("50-25-25"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("50-25-25"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-flex-wrap" }, styles: { display: { Desktop: "flex" }, gap: { Desktop: "1em" } } } }, innerBlocks: [["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "50%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/flex-wrap-item", { wrapper: { options: { tag: "div", class: "pg-flex-wrap-item" }, styles: { width: { Desktop: "25%" }, flexGrow: { Desktop: "1" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "120.99", width: "31.29", height: "82.57", transform: "translate(273.28 82.57) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "82.83", width: "31.29", height: "82.57", transform: "translate(196.95 82.57) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "75.96", height: "82.57", transform: "translate(75.96 82.57) rotate(180)" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/form-field-checkbox/index.js": /*!*************************************************!*\ !*** ./src/blocks/form-field-checkbox/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-checkbox/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var label = attributes.label; var input = attributes.input; var item = attributes.item; var itemLabel = attributes.itemLabel; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var labelWrap = attributes.labelWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [pramSrcEnable, setpramSrcEnable] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [postTypes, setpostTypes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. var [userRoles, setuserRoles] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. var [taxonomies, settaxonomies] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelSelector = blockClass + " label"; var checkboxSelector = blockClass + ' input[type="checkbox"]'; var labelWrapSelector = blockClass + " .label-wrap"; var inputWrapSelector = blockClass + " .input-wrap"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default()({ path: "/post-grid/v2/post_types", method: "POST", data: {} }).then(res => { var types = []; Object.entries(res).map(x => { var postTypeId = x[0]; var postTypeLabel = x[1]; types.push({ label: postTypeLabel, value: postTypeId }); }); setpostTypes(types); }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default()({ path: "/post-grid/v2/user_roles_list", method: "POST", data: {} }).then(res => { var roles = res.roles == undefined ? [] : res.roles; var rolesX = []; Object.entries(roles).map(role => { var index = role[0]; var val = role[1]; rolesX.push({ label: val, value: index }); }); setuserRoles(rolesX); }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default()({ path: "/post-grid/v2/post_type_objects", method: "POST", data: {} }).then(res => { var taxItems = []; Object.entries(res).map(arg => { var index = arg[0]; var tax = arg[1]; taxItems.push({ label: tax.label, value: tax.id }); }); settaxonomies(taxItems); }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[checkboxSelector] = input; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, input); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, checkboxSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(input, [sudoScource, key, breakPointX]); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, checkboxSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, input); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ input: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, input); obj[sudoScource] = cssObj; setAttributes({ input: obj }); var selector = myStore.getElementSelector(sudoScource, checkboxSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Checkbox", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 px-3 py-2 rounded-sm text-white inline-block my-3 mr-2 cursor-pointer", onClick: ev => { var options = { ...input.options }; var args = options.args; var length = Object.entries(input.options.args).length; args[length] = { label: "", value: "" }; setAttributes({ input: { ...input, options: options } }); } }, "Add Option"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " inline-block mr-2 relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 px-3 py-2 rounded-sm text-white inline-block my-3 mr-2 cursor-pointer ", onClick: ev => { setpramSrcEnable(!pramSrcEnable); } }, "Pram Source"), pramSrcEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Popover, { position: "bottom left" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-3 w-64" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Source Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: input.options.argsSrc.src, options: [{ label: "None", value: "" }, { label: "Taxonomy", value: "taxonomy" }, { label: "Posts", value: "posts" }, { label: "Users", value: "users" }, { label: "Country Names", value: "countryNames" }, { label: "Country Codes", value: "countryCodes" }, { label: "Gender", value: "gender" }, { label: "Age Groups", value: "ageGroups" }], onChange: newVal => { var options = { ...input.options }; var argsSrc = options.argsSrc; argsSrc.src = newVal; setAttributes({ input: { ...input, options: options } }); } })), input.options.argsSrc.src == "posts" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Post Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", multiple: true, value: input.options.argsSrc.postType, options: postTypes, onChange: newVal => { var options = { ...input.options }; var argsSrc = options.argsSrc; argsSrc.postType = newVal; setAttributes({ input: { ...input, options: options } }); } }))), input.options.argsSrc.src == "taxonomy" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: input.options.argsSrc.taxonomy, options: taxonomies, onChange: newVal => { var options = { ...input.options }; var argsSrc = options.argsSrc; argsSrc.taxonomy = newVal; setAttributes({ input: { ...input, options: options } }); } }))), input.options.argsSrc.src == "users" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "User Role"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", multiple: true, value: input.options.argsSrc.userRole, options: userRoles, onChange: newVal => { var options = { ...input.options }; var argsSrc = options.argsSrc; argsSrc.userRole = newVal; setAttributes({ input: { ...input, options: options } }); } })))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, input.options.argsSrc.src.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, Object.entries(input.options.args).map(item => { var index = item[0]; var arg = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: arg.label, placeholder: "Option Label", onChange: newVal => { var options = { ...input.options }; var args = options.args; args[index].label = newVal; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", placeholder: "Option Value", value: arg.value, onChange: newVal => { var options = { ...input.options }; var args = options.args; args[index].value = newVal; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer bg-red-500 hover:bg-red-600 text-white px-1 rounded-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], onClick: ev => { var optionsX = { ...input.options }; delete optionsX["args"][index]; setAttributes({ input: { ...input, options: optionsX } }); } }))); })), input.options.argsSrc.src.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Options will automatically generated from", " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-bold" }, input.options.argsSrc.src))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.name, onChange: newVal => { var options = { ...input.options, name: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, input.options.value != null && Object.entries(input.options.value).map(x => { var val = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, val); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: input.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: input.options.readonly ? true : false, onChange: e => { var options = { ...input.options, readonly: input.options.readonly ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: input.options.required ? "Required Enabled" : "Required Disabled.", checked: input.options.required ? true : false, onChange: e => { var options = { ...input.options, required: input.options.required ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: input.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: input.options.disabled ? true : false, onChange: e => { var options = { ...input.options, disabled: input.options.disabled ? false : true }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: input, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, Object.entries(input.options.args).map((item, index) => { var index = item[0]; var arg = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "item" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { type: "checkbox", id: blockId + "-" + index, value: arg.value, name: input.options.name, multiple: input.options.multiple, required: input.options.required, disabled: input.options.disabled, readonly: input.options.readonly, onChange: ev => { var newVal = ev.target.value; var oldVal = input.options.value; if (typeof input.options.value == "object") { var count = input.options.value.length; var valueX = input.options.value; valueX[count] = newVal; } else { valueX = [oldVal]; } var options = { ...input.options, value: valueX }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: blockId + "-" + index }, arg.label)); }), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-file-multi/index.js": /*!***************************************************!*\ !*** ./src/blocks/form-field-file-multi/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-file-multi/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var label = attributes.label; var file = attributes.file; var item = attributes.item; var itemLabel = attributes.itemLabel; var addItem = attributes.addItem; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var labelWrap = attributes.labelWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelSelector = blockClass + " label"; var checkboxSelector = blockClass + ' input[type="file"]'; var addItemSelector = blockClass + " .add-item"; var labelWrapSelector = blockClass + " .label-wrap"; var inputWrapSelector = blockClass + " .input-wrap"; var errorWrapSelector = blockClass + " .error-wrap"; const [fileCounts, setfileCounts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var inputCounts = []; for (let i = 0; i < parseInt(file.options.maxCount); i++) { inputCounts.push(i); } setfileCounts(inputCounts); }, [file.options.maxCount]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); var options = { ...file.options, name: blockId }; setAttributes({ file: { ...file, options: options } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[checkboxSelector] = file; blockCssObj[addItemSelector] = addItem; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleAddItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, addItem); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ addItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, addItemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleAddItem(sudoScource, key) { var object = myStore.deletePropertyDeep(addItem, [sudoScource, key, breakPointX]); setAttributes({ addItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, addItemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleAddItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, addItem); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ addItem: object }); } function onBulkAddAddItem(sudoScource, cssObj) { let obj = Object.assign({}, addItem); obj[sudoScource] = cssObj; setAttributes({ addItem: obj }); var selector = myStore.getElementSelector(sudoScource, addItemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, file); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ file: object }); var elementSelector = myStore.getElementSelector(sudoScource, checkboxSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(file, [sudoScource, key, breakPointX]); setAttributes({ file: object }); var elementSelector = myStore.getElementSelector(sudoScource, checkboxSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, file); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ file: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, file); obj[sudoScource] = cssObj; setAttributes({ file: obj }); var selector = myStore.getElementSelector(sudoScource, checkboxSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "File", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 px-3 py-2 rounded-sm text-white inline-block my-3 mr-2", onClick: ev => { var options = { ...file.options }; var fileTypes = options.fileTypes; fileTypes.push(""); setAttributes({ ...file, options: options }); } }, "Add Option"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, file.options.fileTypes.map((item, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: item, placeholder: ".FileType", onChange: newVal => { var options = { ...file.options }; var fileTypes = options.fileTypes; fileTypes[index] = newVal; setAttributes({ ...file, options: options }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer bg-red-500 hover:bg-red-600 text-white px-1 rounded-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], onClick: ev => { var options = { ...file.options }; var fileTypes = options.fileTypes; fileTypes.splice(index, 1); setAttributes({ ...file, options: options }); } }))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: file.options.name, onChange: newVal => { var options = { ...file.options, name: newVal }; setAttributes({ file: { ...file, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "File Max Size", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", type: "number", value: file.options.maxSize, onChange: newVal => { var options = { ...file.options, maxSize: newVal }; setAttributes({ file: { ...file, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: file.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: file.options.readonly ? true : false, onChange: e => { var options = { ...file.options, readonly: file.options.readonly ? false : true }; setAttributes({ file: { ...file, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: file.options.required ? "Required Enabled" : "Required Disabled.", checked: file.options.required ? true : false, onChange: e => { var options = { ...file.options, required: file.options.required ? false : true }; setAttributes({ file: { ...file, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: file.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: file.options.disabled ? true : false, onChange: e => { var options = { ...file.options, disabled: file.options.disabled ? false : true }; setAttributes({ file: { ...file, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: file, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Add Item Wrap ", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: addItem.options.text, onChange: newVal => { var options = { ...addItem.options, text: newVal }; setAttributes({ addItem: { ...addItem, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: addItem.options.position, options: [{ label: "None", value: "" }, { label: "Before Files", value: "beforeFiles" }, { label: "After Files", value: "afterFiles" }, { label: "After Label", value: "afterLabel" }], onChange: newVal => { var options = { ...addItem.options, position: newVal }; setAttributes({ addItem: { ...addItem, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: addItem, onChange: onChangeStyleAddItem, onAdd: onAddStyleAddItem, onRemove: onRemoveStyleAddItem, onBulkAdd: onBulkAddAddItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "Before label", value: "beforeLabel" }, { label: "After Files", value: "afterFiles" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, addItem.options.position == "afterFiles" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "add-item", onClick: ev => { var count = fileCounts.length; fileCounts.push(count); setfileCounts(fileCounts); } }, "Add"), fileCounts.map((item, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "item" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { type: "file", value: file.options.value, name: file.options.name + "[]", multiple: file.options.multiple, required: file.options.required, disabled: file.options.disabled, readonly: file.options.readonly, onChange: ev => { var newVal = ev.target.value; var options = { ...file.options, value: newVal }; setAttributes({ file: { ...file, options: options } }); } })); }), addItem.options.position == "afterFiles" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "add-item", onClick: ev => { var count = fileCounts.length; fileCounts.push(count); setfileCounts(fileCounts); } }, "Add"), errorWrap.options.position == "afterFiles" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-file/index.js": /*!*********************************************!*\ !*** ./src/blocks/form-field-file/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-file/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var label = attributes.label; var input = attributes.input; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var labelWrap = attributes.labelWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelSelector = blockClass + " label"; var inputSelector = blockClass + " input"; var labelWrapSelector = blockClass + " .label-wrap"; var inputWrapSelector = blockClass + " .input-wrap"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[inputSelector] = input; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, input); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(input, [sudoScource, key, breakPointX]); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, input); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ input: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, input); obj[sudoScource] = cssObj; setAttributes({ input: obj }); var selector = myStore.getElementSelector(sudoScource, inputSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 px-3 py-2 rounded-sm text-white inline-block my-3 mr-2", onClick: ev => { var options = { ...input.options }; var fileTypes = options.fileTypes; fileTypes.push(""); setAttributes({ ...input, options: options }); } }, "Add File Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, input.options.fileTypes.map((item, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: item, placeholder: ".FileType", onChange: newVal => { var options = { ...input.options }; var fileTypes = options.fileTypes; fileTypes[index] = newVal; setAttributes({ ...input, options: options }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer bg-red-500 hover:bg-red-600 text-white px-1 rounded-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], onClick: ev => { var options = { ...input.options }; var fileTypes = options.fileTypes; fileTypes.splice(index, 1); setAttributes({ ...input, options: options }); } }))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: input.options.name, onChange: newVal => { var options = { ...input.options, name: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "File Max Size", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", type: "number", value: input.options.maxSize, onChange: newVal => { var options = { ...input.options, maxSize: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-3", label: "Multiple?", help: input.options.multiple ? "Multiple Enabled" : "Multiple Disabled.", checked: input.options.multiple ? true : false, onChange: e => { var options = { ...input.options, multiple: input.options.multiple ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-3", label: "Readonly?", help: input.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: input.options.readonly ? true : false, onChange: e => { var options = { ...input.options, readonly: input.options.readonly ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-3", label: "Required?", help: input.options.required ? "Required Enabled" : "Required Disabled.", checked: input.options.required ? true : false, onChange: e => { var options = { ...input.options, required: input.options.required ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-3", label: "Disabled?", help: input.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: input.options.disabled ? true : false, onChange: e => { var options = { ...input.options, disabled: input.options.disabled ? false : true }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: input, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { type: "file", placeholder: input.options.placeholder, value: input.options.value, name: input.options.name, required: input.options.required, disabled: input.options.disabled, readonly: input.options.readonly, onChange: ev => { var newVal = ev.target.value; var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } }), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-input/index.js": /*!**********************************************!*\ !*** ./src/blocks/form-field-input/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-input/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var labelWrap = attributes.labelWrap; var label = attributes.label; var input = attributes.input; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelWrapSelector = blockClass + " .label-wrap"; var labelSelector = blockClass + " label"; var inputWrapSelector = blockClass + " .input-wrap"; var inputSelector = blockClass + " input"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[inputSelector] = input; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, input); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(input, [sudoScource, key, breakPointX]); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, input); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ input: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, input); obj[sudoScource] = cssObj; setAttributes({ input: obj }); var selector = myStore.getElementSelector(sudoScource, inputSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Input Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: input.options.type, options: [{ label: "Number", value: "number" }, { label: "Range", value: "range" }, { label: "Checkbox", value: "checkbox" }, { label: "Email", value: "email" }, { label: "URL", value: "url" }, { label: "Password", value: "password" }, { label: "Hidden", value: "hidden" }, { label: "Search", value: "search" }, { label: "Telephone", value: "tel" }, { label: "Text", value: "text" }, { label: "Time", value: "time" }, { label: "Week", value: "week" }, { label: "Color", value: "color" }, { label: "Date", value: "date" }, { label: "Datetime-local", value: "datetime-local" }, { label: "Button", value: "button" }, { label: "Submit", value: "submit" } // { label: 'File', value: 'file' }, ], onChange: newVal => { var options = { ...input.options, type: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.name, onChange: newVal => { var options = { ...input.options, name: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Default Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.value, onChange: newVal => { var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Default Value Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: input.options.valueSource, options: [{ label: "Choose...", value: "" }, { label: "Post ID", value: "postID" }, { label: "Post Slug", value: "postSlug" }, { label: "Post Title", value: "postTitle" }, // { label: 'Post Tags', value: 'postTags' }, // { label: 'Post Category Ids', value: 'postCategoryIds' }, // { label: 'Post Category Slugs', value: 'postCategorySlugs' }, { label: "Post Author ID", value: "postAuthorID" }, { label: "User Id", value: "userId" }, { label: "User Email", value: "userEmail" }, { label: "User Display Name", value: "userDisplayName" }, { label: "User Login", value: "userLogin" }, { label: "User Nicename", value: "userNicename" }], onChange: newVal => { var options = { ...input.options, valueSource: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Placeholder"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.placeholder, onChange: newVal => { var options = { ...input.options, placeholder: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: input.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: input.options.readonly ? true : false, onChange: e => { var options = { ...input.options, readonly: input.options.readonly ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: input.options.required ? "Required Enabled" : "Required Disabled.", checked: input.options.required ? true : false, onChange: e => { var options = { ...input.options, required: input.options.required ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: input.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: input.options.disabled ? true : false, onChange: e => { var options = { ...input.options, disabled: input.options.disabled ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Include With Email Body?", help: input.options.includeMailBody ? "Enabled" : "Disabled.", checked: input.options.includeMailBody ? true : false, onChange: e => { var options = { ...input.options, includeMailBody: input.options.includeMailBody ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), input.options.type == "date" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Input Pattern"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: input.options.pattern, options: [{ label: "Choose Pattern", value: "" }, { label: "ddmmyyyy", value: "ddmmyyyy" }, { label: "dd/mm/yyyy", value: "dd/mm/yyyy" }, { label: "mm/dd/yyyy", value: "mm/dd/yyyy" }, { label: "dd-mm-yyyy", value: "dd-mm-yyyy" }, { label: "mm-dd-yyyy", value: "mm-dd-yyyy" }, { label: "Custom Pattern", value: "custom" }], onChange: newVal => { var options = { ...input.options, pattern: newVal }; setAttributes({ input: { ...input, options: options } }); } })), input.options.pattern == "custom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Pattern"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.patternCustom, onChange: newVal => { var options = { ...input.options, patternCustom: newVal }; setAttributes({ input: { ...input, options: options } }); } }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: input, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { type: input.options.type, placeholder: input.options.placeholder, value: input.options.value, name: input.options.name, required: input.options.required, disabled: input.options.disabled, readonly: input.options.readonly, onChange: ev => { var newVal = ev.target.value; var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } }), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-radio/index.js": /*!**********************************************!*\ !*** ./src/blocks/form-field-radio/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)("post-grid/form-field-radio", { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var label = attributes.label; var radio = attributes.radio; var item = attributes.item; var itemLabel = attributes.itemLabel; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var labelWrap = attributes.labelWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelSelector = blockClass + " label"; var checkboxSelector = blockClass + ' input[type="radio"]'; var labelWrapSelector = blockClass + " .label-wrap"; var inputWrapSelector = blockClass + " .input-wrap"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[checkboxSelector] = radio; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, radio); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ radio: object }); var elementSelector = myStore.getElementSelector(sudoScource, checkboxSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(radio, [sudoScource, key, breakPointX]); setAttributes({ radio: object }); var elementSelector = myStore.getElementSelector(sudoScource, checkboxSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, radio); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ radio: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, radio); obj[sudoScource] = cssObj; setAttributes({ radio: obj }); var selector = myStore.getElementSelector(sudoScource, checkboxSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "radio", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 px-3 py-2 rounded-sm text-white inline-block my-3 mr-2", onClick: ev => { var options = { ...radio.options }; var args = options.args; var length = Object.entries(radio.options.args).length; args[length] = { label: "", value: "" }; setAttributes({ radio: { ...radio, options: options } }); } }, "Add Option"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, Object.entries(radio.options.args).map(item => { var index = item[0]; var arg = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: arg.label, placeholder: "Option Label", onChange: newVal => { var options = { ...radio.options }; var args = options.args; args[index].label = newVal; setAttributes({ radio: { ...radio, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", placeholder: "Option Value", value: arg.value, onChange: newVal => { var options = { ...radio.options }; var args = options.args; args[index].value = newVal; setAttributes({ radio: { ...radio, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer bg-red-500 hover:bg-red-600 text-white px-1 rounded-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], onClick: ev => { var optionsX = { ...radio.options }; delete optionsX["args"][index]; setAttributes({ radio: { ...radio, options: optionsX } }); } }))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: radio.options.name, onChange: newVal => { var options = { ...radio.options, name: newVal }; setAttributes({ radio: { ...radio, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: radio.options.value, onChange: newVal => { var options = { ...radio.options, value: newVal }; setAttributes({ radio: { ...radio, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: radio.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: radio.options.readonly ? true : false, onChange: e => { var options = { ...radio.options, readonly: radio.options.readonly ? false : true }; setAttributes({ radio: { ...radio, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: radio.options.required ? "Required Enabled" : "Required Disabled.", checked: radio.options.required ? true : false, onChange: e => { var options = { ...radio.options, required: radio.options.required ? false : true }; setAttributes({ radio: { ...radio, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: radio.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: radio.options.disabled ? true : false, onChange: e => { var options = { ...radio.options, disabled: radio.options.disabled ? false : true }; setAttributes({ radio: { ...radio, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: radio, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, Object.entries(radio.options.args).map((item, index) => { var index = item[0]; var arg = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "item" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { type: "radio", value: arg.value, name: radio.options.name, multiple: radio.options.multiple, required: radio.options.required, disabled: radio.options.disabled, readonly: radio.options.readonly, id: blockId + "-" + index, onChange: ev => { var newVal = ev.target.value; var options = { ...radio.options, value: newVal }; setAttributes({ radio: { ...radio, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: blockId + "-" + index }, arg.label)); }), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-select/index.js": /*!***********************************************!*\ !*** ./src/blocks/form-field-select/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-select/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var label = attributes.label; var select = attributes.select; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var labelWrap = attributes.labelWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelSelector = blockClass + " label"; var selectSelector = blockClass + " select"; var labelWrapSelector = blockClass + " .label-wrap"; var inputWrapSelector = blockClass + " .input-wrap"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[selectSelector] = select; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function RemoveArgs({ index, title }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer bg-red-500 hover:bg-red-600 text-white px-1 rounded-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], onClick: ev => { // var selectOptionsX = { ...selectOptions }; // delete selectOptionsX[index]; // setAttributes({ selectOptions: selectOptionsX }); var optionsX = { ...select.options }; delete optionsX["args"][index]; setAttributes({ select: { ...select, options: optionsX } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "ml-2" }, title)); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, select); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ select: object }); var elementSelector = myStore.getElementSelector(sudoScource, selectSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(select, [sudoScource, key, breakPointX]); setAttributes({ select: object }); var elementSelector = myStore.getElementSelector(sudoScource, selectSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, select); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ select: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, select); obj[sudoScource] = cssObj; setAttributes({ select: obj }); var selector = myStore.getElementSelector(sudoScource, selectSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Select", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 cursor-pointer px-3 py-2 rounded-sm text-white inline-block my-3 mr-2", onClick: ev => { var options = { ...select.options }; var args = options.args; var length = Object.entries(select.options.args).length; args[length] = { label: "Label", value: "value" }; setAttributes({ select: { ...select, options: options } }); } }, "Add Option"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 cursor-pointer px-3 py-2 rounded-sm text-white inline-block my-3", onClick: ev => { var options = { ...select.options }; var args = options.args; var length = Object.entries(select.options.args).length; args[length] = { label: "Group Label", args: {} }; setAttributes({ select: { ...select, options: options } }); } }, "Add Option Group"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Data Sets"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, Object.entries(select.options.args).map(item => { var index = item[0]; var arg = item[1]; var args = arg.args; if (args != undefined) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveArgs, { index: index, title: arg.label }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 px-3 py-2 rounded-sm text-white inline-block my-3 mr-2", onClick: ev => { // var selectOptionsX = { ...selectOptions }; // var length = Object.entries(selectOptionsX[index]['args']).length // selectOptionsX[index]['args'][length] = { label: '', value: '' } // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; var length = Object.entries(select.options.args[index].args).length; args[index]["args"][length] = { label: "", value: "" }; setAttributes({ select: { ...select, options: options } }); } }, "Add Option"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Group Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: arg.label, onChange: newVal => { // var selectOptionsX = { ...selectOptions }; // selectOptionsX[index]['label'] = newVal // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; args[index]["label"] = newVal; setAttributes({ select: { ...select, options: options } }); } })), Object.entries(args).map(x => { var optionIndex = x[0]; var optionData = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: optionData.label, placeholder: "Option Label", onChange: newVal => { // var selectOptionsX = { ...selectOptions }; // selectOptionsX[index]['args'][optionIndex]['label'] = newVal // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; args[index]["args"][optionIndex].label = newVal; setAttributes({ select: { ...select, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: optionData.value, placeholder: "Option Value", onChange: newVal => { // var selectOptionsX = { ...selectOptions }; // selectOptionsX[index]['args'][optionIndex]['value'] = newVal // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; args[index]["args"][optionIndex].value = newVal; setAttributes({ select: { ...select, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer bg-red-500 hover:bg-red-600 text-white px-1 py-1 rounded-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], onClick: ev => { // var selectOptionsX = { ...selectOptions }; // delete selectOptionsX[index]; // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; delete args[index]["args"][optionIndex]; setAttributes({ select: { ...select, options: options } }); } }))); })); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveArgs, { index: index }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: arg.label, placeholder: "Option Label", onChange: newVal => { // var selectOptionsX = { ...selectOptions }; // selectOptionsX[index]['label'] = newVal // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; args[index].label = newVal; setAttributes({ select: { ...select, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", placeholder: "Option Value", value: arg.value, onChange: newVal => { // var selectOptionsX = { ...selectOptions }; // selectOptionsX[index]['value'] = newVal // setAttributes({ selectOptions: selectOptionsX }); var options = { ...select.options }; var args = options.args; args[index].value = newVal; setAttributes({ select: { ...select, options: options } }); } })); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: select.options.name, onChange: newVal => { var options = { ...select.options, name: newVal }; setAttributes({ select: { ...select, options: options } }); } })), typeof select.options.value == "object" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, select.options.value != null && Object.entries(select.options.value).map(x => { var val = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, val); }))), typeof select.options.value == "string" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: select.options.value, onChange: newVal => { var options = { ...select.options, value: newVal }; setAttributes({ select: { ...select, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Placeholder"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: select.options.placeholder, onChange: newVal => { var options = { ...select.options, placeholder: newVal }; setAttributes({ select: { ...select, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Multiple?", help: select.options.multiple ? "Multiple Enabled" : "Multiple Disabled.", checked: select.options.multiple ? true : false, onChange: e => { var options = { ...select.options, multiple: select.options.multiple ? false : true }; setAttributes({ select: { ...select, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: select.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: select.options.readonly ? true : false, onChange: e => { var options = { ...select.options, readonly: select.options.readonly ? false : true }; setAttributes({ select: { ...select, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: select.options.required ? "Required Enabled" : "Required Disabled.", checked: select.options.required ? true : false, onChange: e => { var options = { ...select.options, required: select.options.required ? false : true }; setAttributes({ select: { ...select, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: select.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: select.options.disabled ? true : false, onChange: e => { var options = { ...select.options, disabled: select.options.disabled ? false : true }; setAttributes({ select: { ...select, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: select, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("select", { name: select.options.name, multiple: select.options.multiple, required: select.options.required, disabled: select.options.disabled, readonly: select.options.readonly, onChange: ev => { var newVal = ev.target.value; var multiple = select.options.multiple; if (multiple) { var oldVal = select.options.value; if (typeof select.options.value == "object") { var count = select.options.value.length; var valueX = select.options.value; valueX[count] = newVal; } else { valueX = [oldVal]; } var options = { ...select.options, value: valueX }; } else { var options = { ...select.options, value: newVal }; } setAttributes({ select: { ...select, options: options } }); } }, Object.entries(select.options.args).map((item, index) => { var index = item[0]; var arg = item[1]; var args = arg.args; if (args != undefined) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("optgroup", { label: arg.label }, Object.entries(args).map(x => { var optionIndex = x[0]; var optionData = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", { value: optionData.value }, optionData.label); })); } if (args == undefined) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", { value: arg.value }, arg.label); } })), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-submit/index.js": /*!***********************************************!*\ !*** ./src/blocks/form-field-submit/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-submit/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var labelWrap = attributes.labelWrap; var label = attributes.label; var input = attributes.input; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelWrapSelector = blockClass + " .label-wrap"; var labelSelector = blockClass + " label"; var inputWrapSelector = blockClass + " .input-wrap"; var inputSelector = blockClass + " input"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[inputSelector] = input; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, input); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(input, [sudoScource, key, breakPointX]); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, input); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ input: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, input); obj[sudoScource] = cssObj; setAttributes({ input: obj }); var selector = myStore.getElementSelector(sudoScource, inputSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Input Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: input.options.type, options: [{ label: "Number", value: "number" }, { label: "Range", value: "range" }, { label: "Email", value: "email" }, { label: "URL", value: "url" }, { label: "Password", value: "password" }, { label: "Hidden", value: "hidden" }, { label: "Search", value: "search" }, { label: "Telephone", value: "tel" }, { label: "Text", value: "text" }, { label: "Time", value: "time" }, { label: "Week", value: "week" }, { label: "Color", value: "color" }, { label: "Date", value: "date" }, { label: "Datetime-local", value: "datetime-local" }, { label: "Button", value: "button" }, { label: "Submit", value: "submit" } // { label: 'File', value: 'file' }, ], onChange: newVal => { var options = { ...input.options, type: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.name, onChange: newVal => { var options = { ...input.options, name: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Default Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.value, onChange: newVal => { var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Placeholder"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.placeholder, onChange: newVal => { var options = { ...input.options, placeholder: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: input.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: input.options.readonly ? true : false, onChange: e => { var options = { ...input.options, readonly: input.options.readonly ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: input.options.required ? "Required Enabled" : "Required Disabled.", checked: input.options.required ? true : false, onChange: e => { var options = { ...input.options, required: input.options.required ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: input.options.disabled ? "Disabled Enabled" : "Disabled Disabled.", checked: input.options.disabled ? true : false, onChange: e => { var options = { ...input.options, disabled: input.options.disabled ? false : true }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: input, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { type: input.options.type, placeholder: input.options.placeholder, value: input.options.value, name: input.options.name, required: input.options.required, disabled: input.options.disabled, readonly: input.options.readonly, onChange: ev => { var newVal = ev.target.value; var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } }), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-field-textarea/index.js": /*!*************************************************!*\ !*** ./src/blocks/form-field-textarea/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-field-textarea/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "56", width: "158", height: "21", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_882)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_882", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_882", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var label = attributes.label; var input = attributes.input; var inputWrap = attributes.inputWrap; var errorWrap = attributes.errorWrap; var labelWrap = attributes.labelWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var labelSelector = blockClass + " label"; var textareaSelector = blockClass + " textarea"; var labelWrapSelector = blockClass + " .label-wrap"; var inputWrapSelector = blockClass + " .input-wrap"; var errorWrapSelector = blockClass + " .error-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[labelSelector] = label; blockCssObj[textareaSelector] = input; blockCssObj[labelWrapSelector] = labelWrap; blockCssObj[inputWrapSelector] = inputWrap; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, input); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, textareaSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInput(sudoScource, key) { var object = myStore.deletePropertyDeep(input, [sudoScource, key, breakPointX]); setAttributes({ input: object }); var elementSelector = myStore.getElementSelector(sudoScource, textareaSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, input); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ input: object }); } function onBulkAddInput(sudoScource, cssObj) { let obj = Object.assign({}, input); obj[sudoScource] = cssObj; setAttributes({ input: obj }); var selector = myStore.getElementSelector(sudoScource, textareaSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleLabelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(labelWrap, [sudoScource, key, breakPointX]); setAttributes({ labelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, labelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ labelWrap: object }); } function onBulkAddLabelWrap(sudoScource, cssObj) { let obj = Object.assign({}, labelWrap); obj[sudoScource] = cssObj; setAttributes({ labelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, labelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInputWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInputWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(inputWrap, [sudoScource, key, breakPointX]); setAttributes({ inputWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, inputWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInputWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inputWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inputWrap: object }); } function onBulkAddInputWrap(sudoScource, cssObj) { let obj = Object.assign({}, inputWrap); obj[sudoScource] = cssObj; setAttributes({ inputWrap: obj }); var selector = myStore.getElementSelector(sudoScource, inputWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 pg-setting-input-text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: labelWrap, onChange: onChangeStyleLabelWrap, onAdd: onAddStyleLabelWrap, onRemove: onRemoveStyleLabelWrap, onBulkAdd: onBulkAddLabelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Enable?", help: label.options.enable ? "Label Enabled" : "Label Disabled.", checked: label.options.enable ? true : false, onChange: e => { var options = { ...label.options, enable: label.options.enable ? false : true }; setAttributes({ label: { ...label, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: label.options.text, onChange: newVal => { var options = { ...label.options, text: newVal }; setAttributes({ label: { ...label, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onRemove: onRemoveStyleLabel, onBulkAdd: onBulkAddLabel }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Textarea", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Textarea Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: inputWrap, onChange: onChangeStyleInputWrap, onAdd: onAddStyleInputWrap, onRemove: onRemoveStyleInputWrap, onBulkAdd: onBulkAddInputWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Textarea", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Default Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.value, onChange: newVal => { var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Field Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.name, onChange: newVal => { var options = { ...input.options, name: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Placeholder"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.placeholder, onChange: newVal => { var options = { ...input.options, placeholder: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Cols"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.cols, onChange: newVal => { var options = { ...input.options, cols: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "rows"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.rows, onChange: newVal => { var options = { ...input.options, rows: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Max Length"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.maxLength, onChange: newVal => { var options = { ...input.options, maxLength: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Min Length"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: input.options.minLength, onChange: newVal => { var options = { ...input.options, minLength: newVal }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Readonly?", help: input.options.readonly ? "Readonly Enabled" : "Readonly Disabled.", checked: input.options.readonly ? true : false, onChange: e => { var options = { ...input.options, readonly: input.options.readonly ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Required?", help: input.options.required ? "Required Enabled" : "Required Disabled.", checked: input.options.required ? true : false, onChange: e => { var options = { ...input.options, required: input.options.required ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Disabled?", help: input.options.disabled ? "Enabled" : "Disabled.", checked: input.options.disabled ? true : false, onChange: e => { var options = { ...input.options, disabled: input.options.disabled ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Autocomplete?", help: input.options.autocomplete ? "Enabled" : "Disabled.", checked: input.options.autocomplete ? true : false, onChange: e => { var options = { ...input.options, autocomplete: input.options.autocomplete ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Spellcheck?", help: input.options.spellcheck ? "Enabled" : "Disabled.", checked: input.options.spellcheck ? true : false, onChange: e => { var options = { ...input.options, spellcheck: input.options.spellcheck ? false : true }; setAttributes({ input: { ...input, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { className: "my-3", label: "Auto correct?", help: input.options.autocorrect ? "Enabled" : "Disabled.", checked: input.options.autocorrect ? true : false, onChange: e => { var options = { ...input.options, autocorrect: input.options.autocorrect ? false : true }; setAttributes({ input: { ...input, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: input, onChange: onChangeStyleInput, onAdd: onAddStyleInput, onRemove: onRemoveStyleInput, onBulkAdd: onBulkAddInput }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: errorWrap.options.text, onChange: newVal => { var options = { ...errorWrap.options, text: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: errorWrap.options.position, options: [{ label: "None", value: "" }, { label: "afterlabel", value: "afterlabel" }, { label: "afterInput", value: "afterInput" }], onChange: newVal => { var options = { ...errorWrap.options, position: newVal }; setAttributes({ errorWrap: { ...errorWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "label-wrap" }, label.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, label.options.text), errorWrap.options.position == "afterlabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "input-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("textarea", { placeholder: input.options.placeholder, name: input.options.name, required: input.options.required, disabled: input.options.disabled, readonly: input.options.readonly, onChange: ev => { var newVal = ev.target.value; var options = { ...input.options, value: newVal }; setAttributes({ input: { ...input, options: options } }); } }, input.options.value), errorWrap.options.position == "afterInput" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "error-wrap" }, errorWrap.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/form-wrap/index.js": /*!***************************************!*\ !*** ./src/blocks/form-wrap/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./variations */ "./src/blocks/form-wrap/variations.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/form-wrap/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { x: "1", y: "57.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint0_linear_61_856)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { x: "1", y: "87.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint1_linear_61_856)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { x: "1", y: "27.0454", width: "158", height: "18.9091", rx: "1", fill: "url(#paint2_linear_61_856)", stroke: "#86402F", "stroke-width": "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M108.718 90.6724C108.555 90.587 108.362 90.5651 108.174 90.6236L95.9704 94.2712C95.4243 94.4164 95.2685 95.1821 95.7142 95.5301L98.4785 97.8235L108.718 90.6724Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M109.052 91.0337C107.933 91.8185 98.8662 98.1457 98.8662 98.1457L102.799 101.408C103.139 101.702 103.707 101.592 103.907 101.193C103.907 101.193 109.026 91.6656 109.026 91.6656C109.133 91.4631 109.143 91.2337 109.052 91.0337Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M98.1806 98.2114C98.1586 98.2456 98.1489 98.2871 98.1489 98.3285V100.729C98.127 101.33 98.9101 101.696 99.3517 101.278C99.3517 101.278 100.594 100.21 100.594 100.21C100.35 100.013 98.1806 98.2114 98.1806 98.2114Z", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { x: "50", y: "94.2271", width: "40.9091", height: "4.54545", fill: "#F5F5F5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_856", x1: "0", y1: "66.4999", x2: "160", y2: "66.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_856", x1: "0", y1: "96.4999", x2: "160", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_856", x1: "0", y1: "36.4999", x2: "160", y2: "36.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var form = attributes.form; var visible = attributes.visible; var onSubmit = attributes.onSubmit; var onProcess = attributes.onProcess; var afterSubmit = attributes.afterSubmit; var errorWrap = attributes.errorWrap; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); var [userRoles, setuserRoles] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); var [postTypes, setpostTypes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); var [postStatuses, setpostStatuses] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); var [enableDatePicker, setenableDatePicker] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var [mailpickerLists, setmailpickerLists] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); var [fluentcrmLists, setfluentcrmLists] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); var [fluentcrmTags, setfluentcrmTags] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var formSelector = blockClass + " form"; var errorWrapSelector = blockClass + " .error-wrap"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/user_roles_list", method: "POST", data: {} }).then(res => { var roles = res.roles == undefined ? [] : res.roles; var rolesX = {}; Object.entries(roles).map(role => { var index = role[0]; var val = role[1]; rolesX[index] = { label: val, value: index }; }); setuserRoles(rolesX); }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/post_types", method: "POST", data: {} }).then(res => { var types = []; Object.entries(res).map(x => { var postTypeId = x[0]; var postTypeLabel = x[1]; types.push({ label: postTypeLabel, value: postTypeId }); }); setpostTypes(types); }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_statuses", method: "POST", data: {} }).then(res => { var types = []; Object.entries(res).map(x => { var postTypeId = x[0]; var postTypeLabel = x[1]; types.push({ label: postTypeLabel, value: postTypeId }); }); setpostStatuses(types); }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/fluentcrm_lists", method: "POST", data: {} }).then(res => { var lists = {}; Object.entries(res).map(x => { var id = x[0]; var listData = x[1]; lists[listData.slug] = { label: listData.title, slug: listData.slug, id: id }; }); console.log(lists); setfluentcrmLists(lists); }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/fluentcrm_tags", method: "POST", data: {} }).then(res => { var tags = {}; Object.entries(res).map(x => { var id = x[0]; var listData = x[1]; tags[listData.slug] = { label: listData.title, slug: listData.slug, id: id }; }); setfluentcrmTags(tags); }); }, [clientId]); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/mailpicker_lists", method: "POST", data: {} }).then(res => { var lists = {}; Object.entries(res).map(x => { var id = x[0]; var listData = x[1]; lists[listData.slug] = { label: listData.title, slug: listData.slug, id: id }; }); console.log(lists); setmailpickerLists(lists); }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[formSelector] = form; blockCssObj[errorWrapSelector] = errorWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); var visibleArgsBasic = { userLogged: { label: "User Logged", description: "Show when user logged-in(any user)", args: { id: "userLogged", value: "" } }, userNotLogged: { label: "User Not Logged", description: "Show when user Not logged-in.", args: { id: "userNotLogged", value: "" } }, userRoles: { label: "User Roles", description: "Show when user has specific roles.", args: { id: "userRoles", roles: [] } }, isYears: { label: "is Years", description: "Show when specific Years", args: { id: "isYears", value: "", values: "", compare: "=" }, isPro: true }, isMonths: { label: "is Months", description: "Show when specific months", args: { id: "isMonths", value: "", values: [], compare: "=" }, isPro: true }, weekDays: { label: "is Week day", description: "Show when specific week days", args: { id: "weekDays", value: "", values: [], compare: "=" }, isPro: true }, isHours: { label: "is Hours", description: "Show when specific hours", args: { id: "isHours", value: "", values: [], compare: "=" }, isPro: true }, //isMinutes: { label: 'is Minutes', description: 'Show when specific Minutes', args: { id: 'isMinutes', value: '', values: [], compare: '=' }, isPro:true }, isDate: { label: "is Date", description: "Show when specific date", args: { id: "isDate", value: "", values: [], compare: "=" }, isPro: true } // submitCount: { label: 'Submit Count', description: 'Visible under specific submit count', args: { id: 'submitCount', value: '' }, isPro:true }, }; let visibleArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("pgFormvisibleArgs", visibleArgsBasic); var onSubmitArgs = { validation: { label: "Validation", description: "Validate form fields", args: { id: "validation", messages: [] } }, submitConfirm: { label: "Submit Confirm", description: "confirm form submit", args: { id: "submitConfirm", messages: [] } } // loading: { // label: "Loading", // description: "Loading...", // args: { id: "loading", messages: "" }, // }, //sendMail: { label: 'Send Mail', description: 'Send Mail', args: { id: 'sendMail', mailTo: '', bcc: '', fromEmail: '', fromName: '', replyTo: "", replyToName: '', successMessage: '', failedMessage: '', } }, // createUser: { label: 'Create User', description: 'Create User', args: { id: 'createUser', value: '' } }, // loginUser: { label: 'Login User', description: 'Login User', args: { id: 'loginUser', value: '' } }, // createPostTerm: { label: 'Create Post Term', description: 'Create Post Term', args: { id: 'createPostTerm', postId: '', postType: '', taxonomy: '', hierarchical: '', } }, // updatePostMeta: { label: 'Create Post Thumbnail', description: 'Create Post Thumbnail', args: { id: 'updatePostMeta', postId: '', } }, // updateOption: { label: 'Update Option', description: 'Update Option', args: { id: 'updateOption', value: '' } }, // redirectToURL: { label: 'Update Option', description: 'Update Option', args: { id: 'updateOption', value: '' } }, // redirectToPost: { label: 'Update Option', description: 'Update Option', args: { id: 'updateOption', value: '' } }, }; //let onSubmitArgs = applyFilters('post-grid/form-wrap/onSubmitArgs', onSubmitArgsBasic); var afterSubmitArgs = { showResponse: { label: "Show Response", description: "Show Response Message", args: { id: "showResponse", message: "" } }, redirectToURL: { label: "Redirect To URL", description: "Redirect To URL", args: { id: "redirectToURL", value: "" }, isPro: true }, refreshPage: { label: "Refresh Page", description: "Refresh Page", args: { id: "refreshPage", delay: "" } }, //loggedOut: { label: 'Logged Out', description: 'Logged out current user', args: { id: 'loggedOut', message: '' } }, //loggedIn: { label: 'Logged In', description: 'Logged in user', args: { id: 'loggedIn', message: '' } }, loggedOut: { label: "Logged Out", description: "Logged out current user", args: { id: "loggedOut", redirect: "" } }, hideForm: { label: "Hide Form", description: "Hide Form", args: { id: "hideForm", message: "" } }, clearForm: { label: "Clear Form", description: "Clear Form", args: { id: "clearForm", message: "" } }, hidePopup: { label: "Hide Popup", description: "Hide Popup", args: { id: "hidePopup", message: "" }, isPro: true } //delay: { label: 'Delay', description: 'Delay', args: { id: 'delay', delay: 1000 } }, }; var onProcessArgs = { // Contact Form sendMail: { label: "Send Mail", description: "Send Mail", args: { id: "sendMail", mailTo: "", bcc: "" } }, emailBcc: { label: "Send BCC", description: "Send BCC", args: { id: "emailBcc", message: "" }, isPro: true }, emailCopyUser: { label: "Email Copy User", description: "Email Copy User", args: { id: "emailCopyUser", message: "" }, isPro: true }, autoReply: { label: "Auto Reply", description: "Auto Reply", args: { id: "autoReply", message: "" }, isPro: true }, // Login Form loggedInUser: { label: "Logged in user", description: "Logged in user", args: { id: "loggedInUser", message: "" } }, // Register Form registerUser: { label: "Register user", description: "Register user", args: { id: "registerUser", message: "" } }, //registerUserMail: { label: 'Register user mail', description: 'Register user mail', args: { id: 'registerUserMail', mailTo: '', bcc: '', } }, // Post Submit form postSubmit: { label: "Create Post", description: "Create Post", args: { id: "postSubmit", postType: "" } }, commentSubmit: { label: "Comment Submit", description: "Comment Submit", args: { id: "commentSubmit", loginRequired: false } }, termSubmit: { label: "Term Submit", description: "Term Submit", args: { id: "termSubmit", postType: "" } }, // For All type form createEntry: { label: "Create Entry", description: "Create Entry", args: { id: "createEntry", message: "" } }, newsletterSubmit: { label: "Newsletter Submit", description: "Newsletter Submit", args: { id: "newsletterSubmit", message: "" } }, // third-parties fluentcrmAddContact: { label: "Fluentcrm - Add Contact", description: "Add to Fluentcrm Contacts list", args: { id: "fluentcrmAddContact", lists: [], tags: [], message: "" } // isPro: true, }, mailpickerAddContact: { label: "MailPicker - Add Contact", description: "Add to MailPicker subscriber list", args: { id: "mailpickerAddContact", lists: [], tags: [], message: "" } // isPro: true, } }; var formTypeArgs = { contactForm: { label: "Contact Form", description: "Contact Form", args: { id: "contactForm" } }, loginForm: { label: "Login Form", description: "Login Form", args: { id: "loginForm" } }, registerForm: { label: "Register Form", description: "Register Form", args: { id: "registerForm" } }, postSubmitForm: { label: "Post Submit Form", description: "Post Submit Form", args: { id: "postSubmitForm" } }, // postUpdateForm: { label: 'Post Update Form', description: 'Post Update Form', args: { id: 'postUpdateForm', } }, termSubmitForm: { label: "Term Submit Form", description: "Term Submit Form", args: { id: "termSubmitForm" } }, // termUpdateForm: { label: 'Term Update Form', description: 'Term Update Form', args: { id: 'termUpdateForm', } }, // postMetaUpdate: { label: 'Post Meta Update', description: 'Post Meta Update', args: { id: 'postMetaUpdate', } }, commentSubmit: { label: "Comment Submit Form", description: "Post Comment Submit Form", args: { id: "commentSubmit" } }, // postCommentUpdateForm: { label: 'Post Comment Update Form', description: 'Post Comment Update Form', args: { id: 'postCommentUpdateForm', } }, // fileUploadForm: { label: 'File Upload Form', description: 'File Upload Form', args: { id: 'fileUploadForm', } }, //newsletterForm: { label: 'Newsletter Form', description: 'Newsletter Form', args: { id: 'newsletterForm', } }, optInForm: { label: "Opt-In Form", description: "Opt-In Form", args: { id: "optInForm" } }, postFilter: { label: "Post Filter", description: "Post Filter", args: { id: "postFilter" }, isPro: true }, appointmentForm: { label: "Appointment Form", description: "Appointment Form", args: { id: "appointmentForm" } } }; var monthsNum = { 1: { label: "January", value: 1 }, 2: { label: "February", value: 2 }, 3: { label: "March", value: 3 }, 4: { label: "April", value: 4 }, 5: { label: "May", value: 5 }, 6: { label: "June", value: 6 }, 7: { label: "July", value: 7 }, 8: { label: "August", value: 8 }, 9: { label: "September", value: 9 }, 10: { label: "October", value: 10 }, 11: { label: "November", value: 11 }, 12: { label: "December", value: 12 } }; var weekDayNumn = { 0: { label: "Sunday", value: 0 }, 1: { label: "Monday", value: 1 }, 2: { label: "Tuesday", value: 2 }, 3: { label: "Wednesday", value: 3 }, 4: { label: "Thursday", value: 4 }, 5: { label: "Friday", value: 5 }, 6: { label: "Saturday", value: 6 } }; var hoursNum = { 0: { label: "12AM", value: 0 }, 1: { label: "1AM", value: 1 }, 2: { label: "2AM", value: 2 }, 3: { label: "3AM", value: 3 }, 4: { label: "4AM", value: 4 }, 5: { label: "5AM", value: 5 }, 6: { label: "6AM", value: 6 }, 7: { label: "7AM", value: 7 }, 8: { label: "8AM", value: 8 }, 9: { label: "9AM", value: 9 }, 10: { label: "10AM", value: 10 }, 11: { label: "11AM", value: 11 }, 12: { label: "12PM", value: 12 }, 13: { label: "1PM", value: 13 }, 14: { label: "2PM", value: 14 }, 15: { label: "3PM", value: 15 }, 16: { label: "4PM", value: 16 }, 17: { label: "5PM", value: 17 }, 18: { label: "6PM", value: 18 }, 19: { label: "7PM", value: 19 }, 20: { label: "8PM", value: 20 }, 21: { label: "9PM", value: 21 }, 22: { label: "10PM", value: 22 }, 23: { label: "11PM", value: 23 } }; function onFormSubmit(ev) { ev.preventDefault(); return false; } function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var formX = attributes.form; var visibleX = attributes.visible; var onSubmitX = attributes.onSubmit; var onProcessX = attributes.onProcess; var afterSubmitX = attributes.afterSubmit; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (afterSubmitX != undefined) { var afterSubmitY = { ...afterSubmitX, options: afterSubmit.options }; setAttributes({ afterSubmit: afterSubmitY }); blockCssObj[afterSubmitSelector] = afterSubmitY; } if (onProcessX != undefined) { var onProcessY = { ...onProcessX, options: onProcess.options }; setAttributes({ onProcess: onProcessY }); blockCssObj[onProcessSelector] = onProcessY; } if (onSubmitX != undefined) { var onSubmitY = { ...onSubmitX, options: onSubmit.options }; setAttributes({ onSubmit: onSubmitY }); blockCssObj[onSubmitSelector] = onSubmitY; } if (visibleX != undefined) { var visibleY = { ...visibleX, options: visible.options }; setAttributes({ visible: visibleY }); blockCssObj[visibleSelector] = visibleY; } if (formX != undefined) { var formY = { ...formX, options: form.options }; setAttributes({ form: formY }); blockCssObj[formSelector] = formY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } var RemoveVisibleGroup = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var visibleX = { ...visible }; delete visibleX[index]; setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveVisibleArg = function ({ title, index, groupId }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var visibleX = { ...visible }; visibleX[groupId].args.splice(index, 1); setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveOnSubmitArg = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var onSubmitX = { ...onSubmit }; delete onSubmitX[index]; setAttributes({ onSubmit: onSubmitX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveonProcessArg = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var onProcessX = { ...onProcess }; delete onProcessX[index]; setAttributes({ onProcess: onProcessX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveAfterSubmitArg = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var afterSubmitX = { ...afterSubmit }; delete afterSubmitX[index]; setAttributes({ afterSubmit: afterSubmitX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleForm(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, form); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ form: object }); var elementSelector = myStore.getElementSelector(sudoScource, formSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleForm(sudoScource, key) { var object = myStore.deletePropertyDeep(form, [sudoScource, key, breakPointX]); setAttributes({ form: object }); var elementSelector = myStore.getElementSelector(sudoScource, formSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleForm(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, form); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ form: object }); } function onBulkAddForm(sudoScource, cssObj) { let obj = Object.assign({}, form); obj[sudoScource] = cssObj; setAttributes({ form: obj }); var selector = myStore.getElementSelector(sudoScource, formSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleErrorWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleErrorWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(errorWrap, [sudoScource, key, breakPointX]); setAttributes({ errorWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, errorWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleErrorWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, errorWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ errorWrap: object }); } function onBulkAddErrorWrap(sudoScource, cssObj) { let obj = Object.assign({}, errorWrap); obj[sudoScource] = cssObj; setAttributes({ errorWrap: obj }); var selector = myStore.getElementSelector(sudoScource, errorWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } const ALLOWED_BLOCKS = []; const MY_TEMPLATE = [["form-field-input", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Form Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: formTypeArgs[form.options == undefined ? form.type : form.options.type] == undefined ? "Form Type" : formTypeArgs[form.options == undefined ? form.type : form.options.type].label, options: formTypeArgs, onChange: (option, index) => { //setAttributes({ form: { ...form, type: index } }); var options = { ...form.options, type: index }; setAttributes({ form: { ...form, options: options } }); }, values: "" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Form Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: form.options.class, onChange: newVal => { var options = { ...form.options, class: newVal }; setAttributes({ form: { styles: form.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: form, onChange: onChangeStyleForm, onAdd: onAddStyleForm, onRemove: onRemoveStyleForm, onBulkAdd: onBulkAddForm })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Visibility", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className="bg-blue-500 p-2 px-4 text-white inline-block cursor-pointer rounded-sm" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var visibleX = { ...visible }; var index = Object.entries(visibleX).length; visibleX[index] = { logic: "OR", title: "", args: [] }; setAttributes({ visible: visibleX }); } }, "Add Group"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, Object.entries(visible).map((group, groupIndex) => { var groupId = group[0]; var groupData = group[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleGroup, { title: groupIndex, index: groupId }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Condition", options: visibleArgs, onChange: (option, index) => { var visibleX = { ...visible }; visibleX[groupId]["args"].push(option.args); setAttributes({ visible: visibleX }); }, values: "" })), visible[groupId]["args"] != undefined && visible[groupId]["args"].map((item, index) => { var id = item.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: id, groupId: groupId }), initialOpen: false }, id == "userLogged" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."), id == "userNotLogged" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."), id == "userRoles" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Role", options: userRoles, onChange: (option, i) => { var visibleX = { ...visible }; var roles = item.roles; roles.push(option.value); visibleX[groupId]["args"][index].roles = roles; setAttributes({ visible: visibleX }); }, value: item.roles }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, Object.entries(item.roles).map((x, k) => { var roleId = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, roleId), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-red-500 p-1 cursor-pointer", onClick: ev => { var visibleX = { ...visible }; //var roles = item.roles; //roles.push(option.value); visibleX[groupId]["args"][index].roles.splice(k, 1); setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] }))); }))), id == "userCapabilities" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."), (id == "isYears" || id == "isMinutes") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "From"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.from, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["from"] = newVal; setAttributes({ visible: visibleX }); } })), item.compare == "between" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", null, " ", "Please use comma separate values", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("code", null, "Ex: 2022,2023")), item.compare == "exist" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", null, " ", "Please use comma separate values", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("code", null, "Ex: 2022,2023,2025")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Compare"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: "<", value: "<" }, { label: ">=", value: ">=" }, { label: "<=", value: "<=" }, { label: "between", value: "between" }, { label: "exist", value: "exist" }], onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["compare"] = newVal; setAttributes({ visible: visibleX }); } }))), id == "isMonths" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Compare"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: "<", value: "<" }, { label: ">=", value: ">=" }, { label: "<=", value: "<=" }, { label: "between", value: "between" }, { label: "exist", value: "exist" }], onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["compare"] = newVal; setAttributes({ visible: visibleX }); } })), (item.compare == "=" || item.compare == "!=" || item.compare == ">" || item.compare == "<" || item.compare == ">=" || item.compare == "<=") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: item.value.length == 0 ? "Choose Month" : monthsNum[item.value].label, options: monthsNum, onChange: (option, optionIndex) => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["value"] = option.value; setAttributes({ visible: visibleX }); }, value: item.value }))), (item.compare == "between" || item.compare == "exist") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose Month", options: monthsNum, onChange: (option, optionIndex) => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["values"].push(option.value); setAttributes({ visible: visibleX }); }, value: item.values })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, item.values.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between my-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, monthsNum[x].label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-red-500 text-white p-1 cursor-pointer hover:", onClick: ev => { var visibleX = { ...visible }; item.values.splice(i, 1); visibleX[groupId]["args"][index]["values"] = item.values; setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] }))); })))), id == "weekDays" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Compare"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: "<", value: "<" }, { label: ">=", value: ">=" }, { label: "<=", value: "<=" }, { label: "between", value: "between" }, { label: "exist", value: "exist" }], onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["compare"] = newVal; setAttributes({ visible: visibleX }); } })), (item.compare == "=" || item.compare == "!=" || item.compare == ">" || item.compare == "<" || item.compare == ">=" || item.compare == "<=") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: item.value.length == 0 ? "Choose Day" : weekDayNumn[item.value].label, options: weekDayNumn, onChange: (option, optionIndex) => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["value"] = option.value; setAttributes({ visible: visibleX }); }, value: item.value }))), (item.compare == "between" || item.compare == "exist") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose Days", options: weekDayNumn, onChange: (option, optionIndex) => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["values"].push(option.value); setAttributes({ visible: visibleX }); }, value: item.values })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, item.values.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between my-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, weekDayNumn[x].label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-red-500 text-white p-1 cursor-pointer hover:", onClick: ev => { var visibleX = { ...visible }; item.values.splice(i, 1); visibleX[groupId]["args"][index]["values"] = item.values; setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] }))); })))), id == "isHours" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Compare"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: "<", value: "<" }, { label: ">=", value: ">=" }, { label: "<=", value: "<=" }, { label: "between", value: "between" }, { label: "exist", value: "exist" }], onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["compare"] = newVal; setAttributes({ visible: visibleX }); } })), (item.compare == "=" || item.compare == "!=" || item.compare == ">" || item.compare == "<" || item.compare == ">=" || item.compare == "<=") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: item.value.length == 0 ? "Choose Hours" : hoursNum[item.value].label, options: hoursNum, onChange: (option, optionIndex) => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["value"] = option.value; setAttributes({ visible: visibleX }); }, value: item.value }))), (item.compare == "between" || item.compare == "exist") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose Month", options: hoursNum, onChange: (option, optionIndex) => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["values"].push(option.value); setAttributes({ visible: visibleX }); }, value: item.values })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, item.values.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between my-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, hoursNum[x].label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-red-500 text-white p-1 cursor-pointer hover:", onClick: ev => { var visibleX = { ...visible }; item.values.splice(i, 1); visibleX[groupId]["args"][index]["values"] = item.values; setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] }))); })))), id == "isDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Compare"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: "<", value: "<" }, { label: ">=", value: ">=" }, { label: "<=", value: "<=" }, { label: "between", value: "between" }, { label: "exist", value: "exist" }], onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index]["compare"] = newVal; setAttributes({ visible: visibleX }); } })), (item.compare == "=" || item.compare == "!=" || item.compare == ">" || item.compare == "<" || item.compare == ">=" || item.compare == "<=") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: enableDatePicker ? "!bg-gray-400" : "", onClick: ev => { setenableDatePicker(prev => !prev); } }, item.value.length == 0 ? "Choose Date" : item.value)), enableDatePicker && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom left " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.DatePicker, { onChange: newDate => { const dateFull = new Date(newDate); let day = dateFull.getDate(); let month = dateFull.getMonth() + 1; let year = dateFull.getFullYear(); var dateStr = year + "-" + month + "-" + day; var visibleX = { ...visible }; visibleX[groupId]["args"][index]["value"] = dateStr; setAttributes({ visible: visibleX }); }, is12Hour: true })))), (item.compare == "between" || item.compare == "exist") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Values"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: enableDatePicker ? "!bg-gray-400" : "", onClick: ev => { setenableDatePicker(prev => !prev); } }, "Choose Date")), enableDatePicker && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom left " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.DatePicker, { onChange: newDate => { const dateFull = new Date(newDate); let day = dateFull.getDate(); let month = dateFull.getMonth() + 1; let year = dateFull.getFullYear(); var dateStr = year + "-" + month + "-" + day; var visibleX = { ...visible }; visibleX[groupId]["args"][index]["values"].push(dateStr); setAttributes({ visible: visibleX }); }, is12Hour: true }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, item.values.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between my-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, x), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-red-500 text-white p-1 cursor-pointer hover:", onClick: ev => { var visibleX = { ...visible }; item.values.splice(i, 1); visibleX[groupId]["args"][index]["values"] = item.values; setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] }))); })))), id == "submitCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."))); })); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "On Submit", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Action", options: onSubmitArgs, onChange: (option, index) => { var onSubmitX = { ...onSubmit }; var index = Object.entries(onSubmitX).length; onSubmitX[index] = option.args; setAttributes({ onSubmit: onSubmitX }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, Object.entries(onSubmit).map(group => { var groupIndex = group[0]; var groupData = group[1]; var id = groupData.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveOnSubmitArg, { title: onSubmitArgs[id] == undefined ? id : onSubmitArgs[id].label, index: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "validation" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."), id == "submitConfirm" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition."))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "On Process", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Action", options: onProcessArgs, onChange: (option, index) => { var onProcessX = { ...onProcess }; var index = Object.entries(onProcessX).length; onProcessX[index] = option.args; setAttributes({ onProcess: onProcessX }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, Object.entries(onProcess).map(group => { var groupIndex = group[0]; var groupData = group[1]; var id = groupData.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveonProcessArg, { title: onProcessArgs[id] == undefined ? id : onProcessArgs[id].label, index: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "sendMail" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Subject"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.subject, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["subject"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.mailTo, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["mailTo"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "BCC"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.bcc, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["bcc"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Email Footer"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.footer, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["footer"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "emailBcc" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.mailTo, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["mailTo"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail from"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.fromEmail, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["fromEmail"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail From Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.fromName, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["fromName"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Reply To Email"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.replyTo, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["replyTo"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Reply To Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.replyToName, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["replyToName"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Email Footer"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.footer, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["footer"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "emailCopyUser" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail from"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.fromEmail, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["fromEmail"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail From Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.fromName, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["fromName"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Reply To Email"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.replyTo, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["replyTo"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Reply To Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.replyToName, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["replyToName"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Email Footer"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.footer, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["footer"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "createEntry" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "autoReply" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail from"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.fromEmail, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["fromEmail"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Mail From Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.fromName, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["fromName"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Reply To Email"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.replyTo, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["replyTo"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Reply To Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.replyToName, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["replyToName"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.message, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["message"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Email Footer"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.footer, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["footer"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "loggedInUser" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "registerUser" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "postSubmit" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Post Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: groupData.postType, options: postTypes, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["postType"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Post Status"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: groupData.postStatus, options: postStatuses, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["postStatus"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Comment Status"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: groupData.commentStatus, options: [{ label: "Open", value: "open" }, { label: "Closed", value: "closed" }], onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["commentStatus"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Ping Status"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: groupData.pingStatus, options: [{ label: "Open", value: "open" }, { label: "Closed", value: "closed" }], onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["pingStatus"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Create Author by Email?", help: groupData.authorByEmail ? "Enabled" : "Disabled.", checked: groupData.authorByEmail ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["authorByEmail"] = groupData.authorByEmail ? false : true; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "commentSubmit" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Status"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: groupData.status, options: [{ label: "Approve", value: "1" }, { label: "Hold", value: "0" }, { label: "Spam", value: "spam" }, { label: "Trash", value: "trash" }], onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["status"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.type == undefined || groupData.type.length == 0 ? "comment" : groupData.type, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["type"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Login Required?", help: groupData.loginRequired ? "Enabled" : "Disabled.", checked: groupData.loginRequired ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["loginRequired"] = groupData.loginRequired ? false : true; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "termSubmit" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: groupData.taxonomy, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["taxonomy"] = newVal; setAttributes({ onProcess: onProcessX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "fluentcrmAddContact" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Fluent-CRM Lists"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: fluentcrmLists, onChange: (option, index) => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["lists"].push({ slug: option.slug, id: option.id }); setAttributes({ onProcess: onProcessX }); }, values: "" })), Object.entries(onProcess[groupIndex]["lists"]).map((x, i) => { var listIndex = x[0]; var listData = x[1]; var slug = x[1].slug; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border my-3 flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var onProcessX = { ...onProcess }; delete onProcessX[groupIndex]["lists"].splice(i, 1); setAttributes({ onProcess: onProcessX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, fluentcrmLists != null && fluentcrmLists[slug] != undefined ? fluentcrmLists[slug].label : "")); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Fluent-CRM Tags"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: fluentcrmTags, onChange: (option, index) => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["tags"].push({ slug: option.slug, id: option.id }); setAttributes({ onProcess: onProcessX }); }, values: "" })), Object.entries(onProcess[groupIndex]["tags"]).map((x, i) => { var listIndex = x[0]; var listData = x[1]; var slug = x[1].slug; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border my-3 flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var onProcessX = { ...onProcess }; delete onProcessX[groupIndex]["tags"].splice(i, 1); setAttributes({ onProcess: onProcessX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, fluentcrmTags == null ? "" : fluentcrmTags[slug].label)); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "mailpickerAddContact" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "MailPicker Lists"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: mailpickerLists, onChange: (option, index) => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["lists"].push({ slug: option.slug, id: option.id }); setAttributes({ onProcess: onProcessX }); }, values: "" })), Object.entries(onProcess[groupIndex]["lists"]).map((x, i) => { var listIndex = x[0]; var listData = x[1]; var slug = x[1].slug; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border my-3 flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var onProcessX = { ...onProcess }; delete onProcessX[groupIndex]["lists"].splice(i, 1); setAttributes({ onProcess: onProcessX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, mailpickerLists != null && mailpickerLists[slug] != undefined ? mailpickerLists[slug].label : "")); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Exist Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.existMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["existMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))), id == "newsletterSubmit" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Show On Response?", help: groupData.showOnResponse ? "Enabled" : "Disabled.", checked: groupData.showOnResponse ? true : false, onChange: e => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["showOnResponse"] = groupData.showOnResponse ? false : true; setAttributes({ onProcess: onProcessX }); } }), groupData.showOnResponse && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Success Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.successMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["successMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Error Message"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.errorMessage, onChange: newVal => { var onProcessX = { ...onProcess }; onProcessX[groupIndex]["errorMessage"] = newVal; setAttributes({ onProcess: onProcessX }); } }))))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "After Submit", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Action", options: afterSubmitArgs, onChange: (option, index) => { var afterSubmitX = { ...afterSubmit }; var index = Object.entries(afterSubmitX).length; afterSubmitX[index] = option.args; setAttributes({ afterSubmit: afterSubmitX }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, Object.entries(afterSubmit).map(group => { var groupIndex = group[0]; var groupData = group[1]; var id = groupData.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveAfterSubmitArg, { title: afterSubmitArgs[id] == undefined ? id : afterSubmitArgs[id].label, index: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "showResponse" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Show response messages."), id == "loggedOut" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, "Logged out current user")), id == "redirectToURL" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Redirect URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.TextareaControl, { value: groupData.url, onChange: newVal => { var afterSubmitX = { ...afterSubmit }; afterSubmitX[groupIndex]["url"] = newVal; setAttributes({ afterSubmit: afterSubmitX }); } }))), id == "refreshPage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Delay"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", type: "number", value: groupData.delay, onChange: newVal => { var afterSubmitX = { ...afterSubmit }; afterSubmitX[groupIndex]["delay"] = newVal; setAttributes({ afterSubmit: afterSubmitX }); } }))), id == "delay" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Delay"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", type: "number", value: groupData.time, onChange: newVal => { var afterSubmitX = { ...afterSubmit }; afterSubmitX[groupIndex]["time"] = newVal; setAttributes({ afterSubmit: afterSubmitX }); } }))))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Error Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: errorWrap, onChange: onChangeStyleErrorWrap, onAdd: onAddStyleErrorWrap, onRemove: onRemoveStyleErrorWrap, onBulkAdd: onBulkAddErrorWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "form-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "form-wrap" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/text", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__["default"], { blockName: "form-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("form", { onSubmit: onFormSubmit }, innerBlocksProps.children)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/form-wrap/variations.js": /*!********************************************!*\ !*** ./src/blocks/form-wrap/variations.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "contact-form-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Contact Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Contact Form"), isPro: false, atts: { form: { type: "contactForm", styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "contactForm" } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "sendMail", mailTo: "", bcc: "", footer: "", subject: "", showOnResponse: true }, 3: { id: "createEntry", message: "", showOnResponse: false } }, afterSubmit: { 0: { id: "showResponse", message: "" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "Write your name", value: "", name: "full_name", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Name should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Mail Subject", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "Write your subject", value: "", name: "subject", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Subject should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pgfe443c9f4725", blockCssY: { items: { ".pgfe443c9f4725 .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pgfe443c9f4725 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-textarea", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: {} }, label: { options: { tag: "label", for: "label", enable: true, text: "Write Your Message", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your name", value: "", name: "message", required: false, disabled: false, minLength: null, maxLength: null, readonly: false, cols: null, rows: 3, autocomplete: false, autofocus: false, wrap: false, spellcheck: false, autocorrect: false, id: "", class: "", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Message should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg434b1c8af09e", blockCssY: { items: { ".pg434b1c8af09e textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "Write your name", value: "Submit", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#51557E" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" }, color: { Desktop: "#ffffff" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#51557E" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" }, color: { Desktop: "#ffffff" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 365.15 244.63" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "2.57", y: "4.63", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M360.38,39.07H4.77a3.2,3.2,0,0,1-3.2-3.19V6.83a3.21,3.21,0,0,1,3.2-3.2H360.38a3.2,3.2,0,0,1,3.19,3.2V35.88A3.19,3.19,0,0,1,360.38,39.07ZM4.77,5.63a1.2,1.2,0,0,0-1.2,1.2V35.88a1.19,1.19,0,0,0,1.2,1.19H360.38a1.19,1.19,0,0,0,1.19-1.19V6.83a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "2.57", y: "53.1", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M360.38,87.54H4.77a3.2,3.2,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H360.38a3.19,3.19,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,360.38,87.54ZM4.77,54.1a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H360.38a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "2.57", y: "100.74", width: "360", height: "86.66", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M360.38,188.4H4.77a3.21,3.21,0,0,1-3.2-3.2V102.93a3.2,3.2,0,0,1,3.2-3.19H360.38a3.19,3.19,0,0,1,3.19,3.19V185.2A3.2,3.2,0,0,1,360.38,188.4ZM4.77,101.74a1.19,1.19,0,0,0-1.2,1.19V185.2a1.2,1.2,0,0,0,1.2,1.2H360.38a1.19,1.19,0,0,0,1.19-1.2V102.93a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M20.78,21.08H17.64V24h3.5v.87H16.6V16.79H21v.88H17.64v2.55h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.46,20.64c0-.6,0-1.09,0-1.57h.92l.05.94h0a2,2,0,0,1,1.83-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.42,2.42,0,0,1,.65-.75,2,2,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.41h-1V21.59c0-1.12-.41-1.79-1.26-1.79a1.38,1.38,0,0,0-1.25,1,2.11,2.11,0,0,0-.08.53v3.58h-1V21.4c0-.93-.41-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.4,1.4,0,0,0-.08.51v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M35.69,24.87l-.09-.73h0a2.17,2.17,0,0,1-1.78.87A1.65,1.65,0,0,1,32,23.34c0-1.4,1.24-2.17,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.34,2.9,2.9,0,0,0-1.51.43l-.24-.7a3.6,3.6,0,0,1,1.9-.51c1.78,0,2.21,1.21,2.21,2.37v2.17a7.31,7.31,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.43,17.44a.62.62,0,0,1-.67.65.63.63,0,0,1-.64-.65.65.65,0,0,1,.66-.66A.63.63,0,0,1,39.43,17.44Zm-1.17,7.43v-5.8h1.05v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M41.06,16.36h1.06v8.51H41.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M16.45,72.07a3.68,3.68,0,0,0,1.87.53C19.39,72.6,20,72,20,71.22s-.43-1.19-1.52-1.61c-1.32-.47-2.13-1.15-2.13-2.29A2.32,2.32,0,0,1,19,65.13a3.73,3.73,0,0,1,1.79.39l-.29.85A3.24,3.24,0,0,0,18.94,66c-1.11,0-1.53.66-1.53,1.21,0,.76.49,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33A4.25,4.25,0,0,1,16.19,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M27.33,71.76c0,.6,0,1.13.05,1.58h-.93l-.06-1h0a2.16,2.16,0,0,1-1.92,1.08c-.91,0-2-.5-2-2.54V67.54H23.5v3.21c0,1.1.33,1.85,1.29,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54V67.54h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29,73.34c0-.39.05-1,.05-1.5v-7h1v3.64h0a2.14,2.14,0,0,1,2-1.06c1.44,0,2.46,1.19,2.45,3,0,2.07-1.31,3.1-2.6,3.1A2.06,2.06,0,0,1,30,72.38h0l-.05,1ZM30.13,71a2.3,2.3,0,0,0,.05.39,1.63,1.63,0,0,0,1.58,1.23c1.11,0,1.77-.9,1.77-2.23,0-1.16-.6-2.16-1.73-2.16a1.7,1.7,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M34.5,75a1.75,1.75,0,0,0,1.15-.44c.29-.34.4-.79.4-2.19V67.54H37.1V72.8a3.22,3.22,0,0,1-.69,2.39,2.68,2.68,0,0,1-1.8.66Zm2.72-9.11a.61.61,0,0,1-.66.64.63.63,0,0,1-.64-.64.64.64,0,0,1,.67-.66A.62.62,0,0,1,37.22,65.91Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.42,70.63a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.69,2.69,0,0,1-2.86-2.92c0-1.76,1-3.13,2.72-3.13a2.45,2.45,0,0,1,2.4,2.73,4.68,4.68,0,0,1,0,.49Zm3.09-.76a1.49,1.49,0,0,0-1.46-1.71,1.75,1.75,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49,73.13a3.94,3.94,0,0,1-1.66.33,2.76,2.76,0,0,1-2.9-3,3,3,0,0,1,3.12-3.08,3.45,3.45,0,0,1,1.47.3l-.24.81a2.54,2.54,0,0,0-1.23-.27,2.19,2.19,0,0,0,0,4.36,2.86,2.86,0,0,0,1.29-.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M51.65,65.87v1.67h1.51v.8H51.65v3.13c0,.72.2,1.13.79,1.13a2.68,2.68,0,0,0,.61-.07l.05.79a2.73,2.73,0,0,1-.94.14A1.47,1.47,0,0,1,51,73a2.15,2.15,0,0,1-.4-1.51V68.34h-.9v-.8h.9V66.15Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M23.41,115.34c-.06-1.13-.13-2.48-.12-3.49h0c-.27,1-.61,2-1,3.07l-1.42,3.92H20L18.71,115c-.39-1.14-.71-2.18-.94-3.14h0c0,1-.09,2.36-.16,3.57l-.21,3.47h-1l.56-8.08h1.34l1.38,3.91c.33,1,.61,1.88.81,2.72h0c.2-.82.49-1.7.85-2.72l1.44-3.91h1.33l.5,8.08h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M26.87,116.18a1.85,1.85,0,0,0,2,2,3.83,3.83,0,0,0,1.61-.3l.18.76a4.72,4.72,0,0,1-1.94.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.88,4.88,0,0,1,0,.49Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M32.15,117.81a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1.05-.37-1.54-1-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.9,2.9,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.38,1.53.89,1.53,1.75,0,1-.8,1.74-2.17,1.74a3.34,3.34,0,0,1-1.64-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M36.9,117.81a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-1-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.9,2.9,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.38,1.53.89,1.53,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M45,118.89l-.08-.73h0a2.17,2.17,0,0,1-1.77.86,1.66,1.66,0,0,1-1.78-1.66c0-1.41,1.25-2.18,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.35,2.93,2.93,0,0,0-1.51.43l-.24-.69a3.64,3.64,0,0,1,1.91-.52c1.77,0,2.2,1.21,2.2,2.38v2.17a8.4,8.4,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.45.18-2.45,1.31a.93.93,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1,1,1,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M52.58,113.09c0,.41,0,.88,0,1.59v3.37a3.35,3.35,0,0,1-.82,2.65,3.08,3.08,0,0,1-2.11.7,3.79,3.79,0,0,1-1.94-.48l.27-.81a3.25,3.25,0,0,0,1.7.46c1.08,0,1.87-.56,1.87-2v-.65h0a2.09,2.09,0,0,1-1.85,1A2.6,2.6,0,0,1,47.16,116,2.79,2.79,0,0,1,49.78,113a2,2,0,0,1,1.81,1h0l0-.87Zm-1.09,2.29a1.44,1.44,0,0,0-.06-.48A1.53,1.53,0,0,0,50,113.78c-1,0-1.72.85-1.72,2.2,0,1.14.57,2.08,1.71,2.08A1.54,1.54,0,0,0,51.41,117a1.81,1.81,0,0,0,.08-.56Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.88,116.18a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.63,4.63,0,0,1-1.93.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,2.81,2.81,0,0,1,0,.49Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "2.57", y: "204.92", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M75.27,224.71a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.14-1.15-2.14-2.29a2.33,2.33,0,0,1,2.62-2.19,3.77,3.77,0,0,1,1.79.39l-.29.85a3.33,3.33,0,0,0-1.54-.38c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.36.53,2.06,1.19,2.06,2.38s-.92,2.32-2.83,2.32a4.25,4.25,0,0,1-2.06-.51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M86.15,224.4c0,.6,0,1.13,0,1.58h-.94L85.2,225h0a2.2,2.2,0,0,1-1.92,1.07c-.91,0-2-.5-2-2.54v-3.39h1v3.21c0,1.11.34,1.85,1.3,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.09-.54v-3.56h1.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M87.86,226c0-.39,0-1,0-1.5v-7h1v3.64h0a2.16,2.16,0,0,1,2-1.06c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.6,3.1a2.07,2.07,0,0,1-2-1.09h0l0,1ZM89,223.66a1.58,1.58,0,0,0,0,.38,1.62,1.62,0,0,0,1.58,1.23c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.72-2.16a1.69,1.69,0,0,0-1.61,1.3,1.71,1.71,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M94.73,221.75c0-.6,0-1.09,0-1.57h.93l0,.93h0a2,2,0,0,1,1.83-1.06,1.71,1.71,0,0,1,1.64,1.16h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.4c.77,0,1.91.5,1.91,2.51V226h-1V222.7c0-1.12-.41-1.79-1.26-1.79a1.36,1.36,0,0,0-1.25,1,1.64,1.64,0,0,0-.08.53V226h-1V222.5c0-.92-.41-1.59-1.21-1.59A1.45,1.45,0,0,0,95.85,222a1.5,1.5,0,0,0-.09.52V226h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M105.92,218.55a.66.66,0,0,1-1.31,0,.64.64,0,0,1,.66-.66A.63.63,0,0,1,105.92,218.55ZM104.74,226v-5.8h1.06V226Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M108.82,218.51v1.67h1.51v.8h-1.51v3.13c0,.72.2,1.13.79,1.13a2.6,2.6,0,0,0,.61-.07l0,.79a2.67,2.67,0,0,1-.93.14,1.44,1.44,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51V221h-.9v-.8h.9v-1.39Z" })) }, { name: "appointment-form-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Appointment Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Appointment Form"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, form: { type: "appointmentForm", styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "appointmentForm" } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "sendMail", mailTo: "", bcc: "", footer: "", subject: "", showOnResponse: true }, 3: { id: "createEntry", message: "", showOnResponse: false } }, afterSubmit: { 0: { id: "showResponse", message: "" } }, blockId: "pge431be43ba93", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, ".pge431be43ba93": { "grid-template-columns": {}, gap: {}, display: {} }, ".pge431be43ba93 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "Write your name", value: "", name: "full_name", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Name should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-textarea", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, label: { options: { tag: "label", for: "label", enable: true, text: "Write Your Message", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your name", value: "", name: "message", required: false, disabled: false, minLength: null, maxLength: null, readonly: false, cols: null, rows: 3, autocomplete: false, autofocus: false, wrap: false, spellcheck: false, autocorrect: false, id: "", class: "", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: {} }, errorWrap: { options: { tag: "div", enable: true, text: "Message should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg434b1c8af09e", blockCssY: { items: { ".pg434b1c8af09e textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "Write your name", value: "Submit", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#51557E" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" }, color: { Desktop: "#ffffff" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#51557E" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" }, color: { Desktop: "#ffffff" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 365.15 244.63" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "2.57", y: "4.63", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M360.38,39.07H4.77a3.2,3.2,0,0,1-3.2-3.19V6.83a3.21,3.21,0,0,1,3.2-3.2H360.38a3.2,3.2,0,0,1,3.19,3.2V35.88A3.19,3.19,0,0,1,360.38,39.07ZM4.77,5.63a1.2,1.2,0,0,0-1.2,1.2V35.88a1.19,1.19,0,0,0,1.2,1.19H360.38a1.19,1.19,0,0,0,1.19-1.19V6.83a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "2.57", y: "53.1", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M360.38,87.54H4.77a3.2,3.2,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H360.38a3.19,3.19,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,360.38,87.54ZM4.77,54.1a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H360.38a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "2.57", y: "100.74", width: "360", height: "86.66", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M360.38,188.4H4.77a3.21,3.21,0,0,1-3.2-3.2V102.93a3.2,3.2,0,0,1,3.2-3.19H360.38a3.19,3.19,0,0,1,3.19,3.19V185.2A3.2,3.2,0,0,1,360.38,188.4ZM4.77,101.74a1.19,1.19,0,0,0-1.2,1.19V185.2a1.2,1.2,0,0,0,1.2,1.2H360.38a1.19,1.19,0,0,0,1.19-1.2V102.93a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M20.78,21.08H17.64V24h3.5v.87H16.6V16.79H21v.88H17.64v2.55h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.46,20.64c0-.6,0-1.09,0-1.57h.92l.05.94h0a2,2,0,0,1,1.83-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.42,2.42,0,0,1,.65-.75,2,2,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.41h-1V21.59c0-1.12-.41-1.79-1.26-1.79a1.38,1.38,0,0,0-1.25,1,2.11,2.11,0,0,0-.08.53v3.58h-1V21.4c0-.93-.41-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.4,1.4,0,0,0-.08.51v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M35.69,24.87l-.09-.73h0a2.17,2.17,0,0,1-1.78.87A1.65,1.65,0,0,1,32,23.34c0-1.4,1.24-2.17,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.34,2.9,2.9,0,0,0-1.51.43l-.24-.7a3.6,3.6,0,0,1,1.9-.51c1.78,0,2.21,1.21,2.21,2.37v2.17a7.31,7.31,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.43,17.44a.62.62,0,0,1-.67.65.63.63,0,0,1-.64-.65.65.65,0,0,1,.66-.66A.63.63,0,0,1,39.43,17.44Zm-1.17,7.43v-5.8h1.05v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M41.06,16.36h1.06v8.51H41.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M16.45,72.07a3.68,3.68,0,0,0,1.87.53C19.39,72.6,20,72,20,71.22s-.43-1.19-1.52-1.61c-1.32-.47-2.13-1.15-2.13-2.29A2.32,2.32,0,0,1,19,65.13a3.73,3.73,0,0,1,1.79.39l-.29.85A3.24,3.24,0,0,0,18.94,66c-1.11,0-1.53.66-1.53,1.21,0,.76.49,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33A4.25,4.25,0,0,1,16.19,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M27.33,71.76c0,.6,0,1.13.05,1.58h-.93l-.06-1h0a2.16,2.16,0,0,1-1.92,1.08c-.91,0-2-.5-2-2.54V67.54H23.5v3.21c0,1.1.33,1.85,1.29,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54V67.54h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29,73.34c0-.39.05-1,.05-1.5v-7h1v3.64h0a2.14,2.14,0,0,1,2-1.06c1.44,0,2.46,1.19,2.45,3,0,2.07-1.31,3.1-2.6,3.1A2.06,2.06,0,0,1,30,72.38h0l-.05,1ZM30.13,71a2.3,2.3,0,0,0,.05.39,1.63,1.63,0,0,0,1.58,1.23c1.11,0,1.77-.9,1.77-2.23,0-1.16-.6-2.16-1.73-2.16a1.7,1.7,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M34.5,75a1.75,1.75,0,0,0,1.15-.44c.29-.34.4-.79.4-2.19V67.54H37.1V72.8a3.22,3.22,0,0,1-.69,2.39,2.68,2.68,0,0,1-1.8.66Zm2.72-9.11a.61.61,0,0,1-.66.64.63.63,0,0,1-.64-.64.64.64,0,0,1,.67-.66A.62.62,0,0,1,37.22,65.91Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.42,70.63a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.69,2.69,0,0,1-2.86-2.92c0-1.76,1-3.13,2.72-3.13a2.45,2.45,0,0,1,2.4,2.73,4.68,4.68,0,0,1,0,.49Zm3.09-.76a1.49,1.49,0,0,0-1.46-1.71,1.75,1.75,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49,73.13a3.94,3.94,0,0,1-1.66.33,2.76,2.76,0,0,1-2.9-3,3,3,0,0,1,3.12-3.08,3.45,3.45,0,0,1,1.47.3l-.24.81a2.54,2.54,0,0,0-1.23-.27,2.19,2.19,0,0,0,0,4.36,2.86,2.86,0,0,0,1.29-.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M51.65,65.87v1.67h1.51v.8H51.65v3.13c0,.72.2,1.13.79,1.13a2.68,2.68,0,0,0,.61-.07l.05.79a2.73,2.73,0,0,1-.94.14A1.47,1.47,0,0,1,51,73a2.15,2.15,0,0,1-.4-1.51V68.34h-.9v-.8h.9V66.15Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M23.41,115.34c-.06-1.13-.13-2.48-.12-3.49h0c-.27,1-.61,2-1,3.07l-1.42,3.92H20L18.71,115c-.39-1.14-.71-2.18-.94-3.14h0c0,1-.09,2.36-.16,3.57l-.21,3.47h-1l.56-8.08h1.34l1.38,3.91c.33,1,.61,1.88.81,2.72h0c.2-.82.49-1.7.85-2.72l1.44-3.91h1.33l.5,8.08h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M26.87,116.18a1.85,1.85,0,0,0,2,2,3.83,3.83,0,0,0,1.61-.3l.18.76a4.72,4.72,0,0,1-1.94.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.88,4.88,0,0,1,0,.49Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M32.15,117.81a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1.05-.37-1.54-1-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.9,2.9,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.38,1.53.89,1.53,1.75,0,1-.8,1.74-2.17,1.74a3.34,3.34,0,0,1-1.64-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M36.9,117.81a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-1-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.9,2.9,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.38,1.53.89,1.53,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M45,118.89l-.08-.73h0a2.17,2.17,0,0,1-1.77.86,1.66,1.66,0,0,1-1.78-1.66c0-1.41,1.25-2.18,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.35,2.93,2.93,0,0,0-1.51.43l-.24-.69a3.64,3.64,0,0,1,1.91-.52c1.77,0,2.2,1.21,2.2,2.38v2.17a8.4,8.4,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.45.18-2.45,1.31a.93.93,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1,1,1,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M52.58,113.09c0,.41,0,.88,0,1.59v3.37a3.35,3.35,0,0,1-.82,2.65,3.08,3.08,0,0,1-2.11.7,3.79,3.79,0,0,1-1.94-.48l.27-.81a3.25,3.25,0,0,0,1.7.46c1.08,0,1.87-.56,1.87-2v-.65h0a2.09,2.09,0,0,1-1.85,1A2.6,2.6,0,0,1,47.16,116,2.79,2.79,0,0,1,49.78,113a2,2,0,0,1,1.81,1h0l0-.87Zm-1.09,2.29a1.44,1.44,0,0,0-.06-.48A1.53,1.53,0,0,0,50,113.78c-1,0-1.72.85-1.72,2.2,0,1.14.57,2.08,1.71,2.08A1.54,1.54,0,0,0,51.41,117a1.81,1.81,0,0,0,.08-.56Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.88,116.18a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.63,4.63,0,0,1-1.93.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,2.81,2.81,0,0,1,0,.49Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "2.57", y: "204.92", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M75.27,224.71a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.14-1.15-2.14-2.29a2.33,2.33,0,0,1,2.62-2.19,3.77,3.77,0,0,1,1.79.39l-.29.85a3.33,3.33,0,0,0-1.54-.38c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.36.53,2.06,1.19,2.06,2.38s-.92,2.32-2.83,2.32a4.25,4.25,0,0,1-2.06-.51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M86.15,224.4c0,.6,0,1.13,0,1.58h-.94L85.2,225h0a2.2,2.2,0,0,1-1.92,1.07c-.91,0-2-.5-2-2.54v-3.39h1v3.21c0,1.11.34,1.85,1.3,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.09-.54v-3.56h1.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M87.86,226c0-.39,0-1,0-1.5v-7h1v3.64h0a2.16,2.16,0,0,1,2-1.06c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.6,3.1a2.07,2.07,0,0,1-2-1.09h0l0,1ZM89,223.66a1.58,1.58,0,0,0,0,.38,1.62,1.62,0,0,0,1.58,1.23c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.72-2.16a1.69,1.69,0,0,0-1.61,1.3,1.71,1.71,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M94.73,221.75c0-.6,0-1.09,0-1.57h.93l0,.93h0a2,2,0,0,1,1.83-1.06,1.71,1.71,0,0,1,1.64,1.16h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.4c.77,0,1.91.5,1.91,2.51V226h-1V222.7c0-1.12-.41-1.79-1.26-1.79a1.36,1.36,0,0,0-1.25,1,1.64,1.64,0,0,0-.08.53V226h-1V222.5c0-.92-.41-1.59-1.21-1.59A1.45,1.45,0,0,0,95.85,222a1.5,1.5,0,0,0-.09.52V226h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M105.92,218.55a.66.66,0,0,1-1.31,0,.64.64,0,0,1,.66-.66A.63.63,0,0,1,105.92,218.55ZM104.74,226v-5.8h1.06V226Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M108.82,218.51v1.67h1.51v.8h-1.51v3.13c0,.72.2,1.13.79,1.13a2.6,2.6,0,0,0,.61-.07l0,.79a2.67,2.67,0,0,1-.93.14,1.44,1.44,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51V221h-.9v-.8h.9v-1.39Z" })) }, { name: "login-form-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Login Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Login Form"), atts: { form: { styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "loginForm" } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "loggedInUser", message: "", showOnResponse: true }, 1: { id: "createEntry", message: "" } }, afterSubmit: { 1: { id: "redirectToURL", value: "" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, isPro: false, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: { margin: { Desktop: "0px 0px 10px 0px" } } }, label: { options: { tag: "label", for: "label", enable: true, text: "Username/Email", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "", value: "admin", name: "username", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg9a328fd54a2e .label-wrap": { margin: { Desktop: "0px 0px 10px 0px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: { margin: { Desktop: "0px 0px 10px 0px" } } }, label: { options: { tag: "label", for: "label", enable: true, text: "Password", class: "pg-form-field-label" } }, input: { options: { type: "password", placeholder: "", value: "123456", name: "password", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Name should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg8539be28243d .label-wrap": { margin: { Desktop: "0px 0px 10px 0px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" }, styles: { display: { Desktop: "flex" } } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: { order: { Desktop: "10" }, margin: { Desktop: "0px 0px 0px 10px" } } }, label: { options: { tag: "label", for: "label", enable: true, text: "Remember?", class: "pg-form-field-label" } }, input: { options: { type: "checkbox", placeholder: "Write your name", value: "", name: "remember", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pgfaeb744b8370", blockCssY: { items: { ".pgfaeb744b8370": { display: { Desktop: "flex" } }, ".pgfaeb744b8370 .label-wrap": { order: { Desktop: "10" }, margin: { Desktop: "0px 0px 0px 10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "Write your name", value: "Login", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 368.13 244.63" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "55.12", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,89.55H6.26a3.19,3.19,0,0,1-3.19-3.19v-29a3.19,3.19,0,0,1,3.19-3.19H361.87a3.19,3.19,0,0,1,3.19,3.19V86.36A3.19,3.19,0,0,1,361.87,89.55ZM6.26,56.12a1.19,1.19,0,0,0-1.19,1.19V86.36a1.19,1.19,0,0,0,1.19,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19v-29a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "103.58", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,138H6.26a3.19,3.19,0,0,1-3.19-3.2v-29a3.19,3.19,0,0,1,3.19-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,361.87,138ZM6.26,104.58a1.19,1.19,0,0,0-1.19,1.2v29A1.19,1.19,0,0,0,6.26,136H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.27,71.57H19.13v2.91h3.5v.88H18.09V67.27h4.36v.88H19.13V70.7h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M24,71.12c0-.6,0-1.09-.05-1.57h.92l.05.94h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.39,2.39,0,0,1,.64-.75,2,2,0,0,1,1.29-.41c.76,0,1.9.5,1.9,2.52v3.42h-1V72.07c0-1.11-.41-1.79-1.26-1.79a1.37,1.37,0,0,0-1.24,1,1.73,1.73,0,0,0-.09.53v3.59h-1V71.88c0-.92-.41-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.4,1.4,0,0,0-.08.51v3.51H24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M37.18,75.36l-.09-.74h0a2.16,2.16,0,0,1-1.78.87,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.93,2.93,0,0,0-1.51.43l-.24-.69a3.52,3.52,0,0,1,1.91-.52c1.77,0,2.2,1.21,2.2,2.37V74a8.44,8.44,0,0,0,.1,1.4Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1A1,1,0,0,0,37,73.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M40.92,67.92a.62.62,0,0,1-.67.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.62.62,0,0,1,40.92,67.92Zm-1.17,7.44V69.55h1v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M42.56,66.84h1v8.52h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M53.18,72.41a2.84,2.84,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.88-3.08A2.74,2.74,0,0,1,53.18,72.41Zm-4.6.06c0,1.27.73,2.23,1.76,2.23s1.77-1,1.77-2.26c0-1-.5-2.23-1.74-2.23S48.58,71.36,48.58,72.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.52,71.36c0-.68,0-1.27-.05-1.81h.93l0,1.14h0a1.74,1.74,0,0,1,1.61-1.27,1,1,0,0,1,.3,0v1a1.88,1.88,0,0,0-.36,0,1.49,1.49,0,0,0-1.42,1.36,3.37,3.37,0,0,0,0,.49v3.1h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M62.07,67.27v4.79c0,1.81.8,2.58,1.88,2.58s2-.8,2-2.58V67.27h1V72c0,2.48-1.3,3.5-3.06,3.5S61,74.54,61,72V67.27Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68.54,74.28a2.79,2.79,0,0,0,1.39.42c.76,0,1.12-.39,1.12-.87s-.3-.78-1.08-1.06c-1-.38-1.53-1-1.53-1.65a1.79,1.79,0,0,1,2-1.7,2.91,2.91,0,0,1,1.43.36l-.26.77a2.22,2.22,0,0,0-1.19-.34c-.63,0-1,.36-1,.79s.34.7,1.1,1c1,.38,1.52.88,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M74,72.65a1.85,1.85,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36A2.7,2.7,0,0,1,73,72.55c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.92,4.92,0,0,1,0,.5Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.72A1.75,1.75,0,0,0,74,71.89Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M79.44,71.36c0-.68,0-1.27,0-1.81h.92l0,1.14h0A1.75,1.75,0,0,1,82,69.42a1,1,0,0,1,.3,0v1a1.88,1.88,0,0,0-.36,0,1.5,1.5,0,0,0-1.42,1.36,3.47,3.47,0,0,0,0,.49v3.1h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M83.42,71.12c0-.6,0-1.09,0-1.57h.93l.06,1h0a2.13,2.13,0,0,1,1.92-1.09c.8,0,2,.48,2,2.47v3.47H87.3V72c0-.94-.35-1.72-1.34-1.72a1.51,1.51,0,0,0-1.42,1.08,1.55,1.55,0,0,0-.07.5v3.49h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M93.29,75.36l-.08-.74h0a2.16,2.16,0,0,1-1.78.87,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.93,2.93,0,0,0-1.51.43L90,69.94A3.55,3.55,0,0,1,92,69.42c1.77,0,2.2,1.21,2.2,2.37V74a8.44,8.44,0,0,0,.1,1.4Zm-.16-3c-1.15,0-2.45.18-2.45,1.31a.93.93,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M95.86,71.12c0-.6,0-1.09,0-1.57h.92l0,.94h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.42,2.42,0,0,1,.65-.75,1.93,1.93,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1V72.07c0-1.11-.4-1.79-1.25-1.79a1.38,1.38,0,0,0-1.25,1,1.73,1.73,0,0,0-.09.53v3.59h-1V71.88c0-.92-.4-1.6-1.21-1.6A1.45,1.45,0,0,0,97,71.34a1.4,1.4,0,0,0-.08.51v3.51h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M106.46,72.65a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.8,4.8,0,0,1-1.93.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.36,4.36,0,0,1,0,.5Zm3.09-.76a1.51,1.51,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M18.09,115.83a12.57,12.57,0,0,1,2-.15,3.34,3.34,0,0,1,2.27.67,2.18,2.18,0,0,1,.71,1.69,2.38,2.38,0,0,1-.63,1.73,3.34,3.34,0,0,1-2.47.89,3.58,3.58,0,0,1-.84-.08v3.24h-1Zm1,3.9a3.52,3.52,0,0,0,.87.09c1.25,0,2-.61,2-1.73s-.75-1.58-1.9-1.58a4.36,4.36,0,0,0-1,.08Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M27.34,123.82l-.08-.73h0a2.15,2.15,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.66c0-1.41,1.25-2.17,3.49-2.16V120a1.2,1.2,0,0,0-1.32-1.35,2.84,2.84,0,0,0-1.51.44l-.24-.7a3.61,3.61,0,0,1,1.91-.51c1.77,0,2.2,1.21,2.2,2.37v2.17a8.32,8.32,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.93.93,0,0,0,1,1,1.42,1.42,0,0,0,1.4-1,.92.92,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.76,122.74a2.76,2.76,0,0,0,1.4.42c.76,0,1.12-.38,1.12-.86s-.3-.78-1.08-1.07c-1-.37-1.53-1-1.53-1.64a1.78,1.78,0,0,1,2-1.7,2.83,2.83,0,0,1,1.43.36l-.27.76a2.25,2.25,0,0,0-1.18-.33c-.63,0-1,.36-1,.79s.34.69,1.1,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M34.52,122.74a2.69,2.69,0,0,0,1.39.42c.77,0,1.12-.38,1.12-.86s-.29-.78-1.07-1.07c-1.05-.37-1.54-1-1.54-1.64a1.79,1.79,0,0,1,2-1.7,2.81,2.81,0,0,1,1.43.36l-.26.76a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.83,118l.77,3c.17.65.32,1.25.43,1.85h0c.13-.59.32-1.22.51-1.84l1-3h.89l.9,2.9c.21.7.38,1.31.51,1.9h0a19.29,19.29,0,0,1,.44-1.89l.83-2.91h1l-1.87,5.8h-1l-.88-2.77a17.16,17.16,0,0,1-.52-1.9h0a19.58,19.58,0,0,1-.53,1.91l-.94,2.76h-1L38.75,118Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M53.38,120.87A2.83,2.83,0,0,1,50.49,124a2.76,2.76,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.08A2.75,2.75,0,0,1,53.38,120.87Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-.94,1.77-2.25c0-1-.49-2.23-1.74-2.23S48.77,119.83,48.77,120.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.71,119.83c0-.68,0-1.27-.05-1.81h.93l0,1.14h.05a1.75,1.75,0,0,1,1.61-1.27,1.39,1.39,0,0,1,.3,0v1a1.32,1.32,0,0,0-.36,0,1.5,1.5,0,0,0-1.42,1.36,3.47,3.47,0,0,0,0,.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M63.53,115.31v7c0,.52,0,1.11,0,1.5h-.95l-.05-1h0a2.16,2.16,0,0,1-2,1.13c-1.4,0-2.48-1.18-2.48-3,0-1.93,1.18-3.11,2.6-3.11a1.94,1.94,0,0,1,1.75.88h0v-3.46Zm-1.06,5.07a2.18,2.18,0,0,0,0-.44,1.56,1.56,0,0,0-1.53-1.23c-1.09,0-1.74,1-1.74,2.25s.58,2.14,1.72,2.14a1.6,1.6,0,0,0,1.55-1.26,2.09,2.09,0,0,0,0-.45Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "4.06", y: "154.44", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M80.88,167.42h1.05v7.2h3.45v.88h-4.5Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M91.6,172.55a2.83,2.83,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.09A2.76,2.76,0,0,1,91.6,172.55Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-1,1.77-2.25c0-1-.49-2.23-1.74-2.23S87,171.51,87,172.61Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M97.93,169.7c0,.42-.05.88-.05,1.59v3.37a3.35,3.35,0,0,1-.82,2.65A3.08,3.08,0,0,1,95,178a3.79,3.79,0,0,1-1.94-.48l.27-.81a3.25,3.25,0,0,0,1.7.46c1.08,0,1.87-.56,1.87-2v-.64h0a2.09,2.09,0,0,1-1.85,1,2.6,2.6,0,0,1-2.47-2.83,2.79,2.79,0,0,1,2.62-3.09,2,2,0,0,1,1.81,1h0l.05-.87ZM96.84,172a1.44,1.44,0,0,0-.06-.48,1.53,1.53,0,0,0-1.47-1.12c-1,0-1.73.85-1.73,2.2,0,1.14.57,2.08,1.71,2.08a1.54,1.54,0,0,0,1.47-1.08,1.81,1.81,0,0,0,.08-.56Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M100.74,168.06a.62.62,0,0,1-.67.65.65.65,0,0,1,0-1.3A.62.62,0,0,1,100.74,168.06Zm-1.17,7.44v-5.8h1.05v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M102.37,171.27c0-.6,0-1.09,0-1.57h.93l.06,1h0a2.12,2.12,0,0,1,1.92-1.1c.8,0,2,.48,2,2.48v3.46h-1.06v-3.35c0-.93-.35-1.71-1.34-1.71a1.5,1.5,0,0,0-1.42,1.08,1.45,1.45,0,0,0-.07.49v3.49h-1.06Z" })) }, { name: "registration-form-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Registration Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Registration Form"), atts: { form: { styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "registerForm" } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "registerUser", message: "", showOnResponse: true }, 1: { id: "createEntry", message: "", showOnResponse: false } }, afterSubmit: { 0: { id: "showResponse", message: "" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, isPro: false, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: { margin: { Desktop: "0px 0px 10px 0px" } } }, label: { options: { tag: "label", for: "label", enable: true, text: "Email ", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "", value: "admin", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg9a328fd54a2e .label-wrap": { margin: { Desktop: "0px 0px 10px 0px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: { margin: { Desktop: "0px 0px 10px 0px" } } }, label: { options: { tag: "label", for: "label", enable: true, text: "Password", class: "pg-form-field-label" } }, input: { options: { type: "password", placeholder: "", value: "123456", name: "password", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Name should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg8539be28243d .label-wrap": { margin: { Desktop: "0px 0px 10px 0px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: { margin: { Desktop: "0px 0px 10px 0px" } } }, label: { options: { tag: "label", for: "label", enable: true, text: "Confirm Password", class: "pg-form-field-label" } }, input: { options: { type: "password", placeholder: "", value: "", name: "password_confirm", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Name should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243a", blockCssY: { items: { ".pg8539be28243a input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243a .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg8539be28243a .label-wrap": { margin: { Desktop: "0px 0px 10px 0px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "", value: "Register", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 368.13 244.63" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "32.08", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#414042", d: "M361.87,66.52H6.26a3.21,3.21,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.2,3.2,0,0,1,361.87,66.52ZM6.26,33.08a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "80.55", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#414042", d: "M361.87,115H6.26a3.2,3.2,0,0,1-3.2-3.19V82.74a3.2,3.2,0,0,1,3.2-3.19H361.87a3.19,3.19,0,0,1,3.19,3.19v29.05A3.19,3.19,0,0,1,361.87,115ZM6.26,81.55a1.19,1.19,0,0,0-1.2,1.19v29.05A1.19,1.19,0,0,0,6.26,113H361.87a1.19,1.19,0,0,0,1.19-1.19V82.74a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "4.27", y: "177.48", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.27,48.53H19.13v2.92h3.5v.87H18.09V44.24h4.36v.87H19.13v2.56h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M24,48.09c0-.6,0-1.09-.05-1.57h.92l.05.93h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.17h0a2.33,2.33,0,0,1,.64-.76,2,2,0,0,1,1.29-.41c.76,0,1.9.51,1.9,2.52v3.42h-1V49c0-1.11-.41-1.78-1.26-1.78a1.35,1.35,0,0,0-1.24,1,1.61,1.61,0,0,0-.09.52v3.59h-1V48.84c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1,1.49,1.49,0,0,0-.08.52v3.5H24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M37.18,52.32l-.08-.73h0a2.19,2.19,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.66c0-1.41,1.25-2.18,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.35,2.84,2.84,0,0,0-1.51.44l-.24-.7a3.61,3.61,0,0,1,1.91-.52c1.77,0,2.2,1.22,2.2,2.38v2.17a8.4,8.4,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.93.93,0,0,0,1,1,1.44,1.44,0,0,0,1.4-1,1,1,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M40.92,44.88a.62.62,0,0,1-.67.65.63.63,0,0,1-.63-.65.63.63,0,0,1,.66-.65A.62.62,0,0,1,40.92,44.88Zm-1.17,7.44v-5.8h1v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M42.56,43.81h1v8.51h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M18.09,92.8a12.38,12.38,0,0,1,2-.16,3.29,3.29,0,0,1,2.27.68A2.18,2.18,0,0,1,23.07,95a2.36,2.36,0,0,1-.63,1.72,3.34,3.34,0,0,1-2.47.89,3.61,3.61,0,0,1-.84-.07v3.24h-1Zm1,3.9a3.58,3.58,0,0,0,.87.08c1.25,0,2-.61,2-1.73s-.75-1.58-1.9-1.58a4.21,4.21,0,0,0-1,.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M27.34,100.79l-.08-.73h0a2.19,2.19,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.25-2.17,3.49-2.16V97a1.19,1.19,0,0,0-1.32-1.34,2.93,2.93,0,0,0-1.51.43l-.24-.69A3.52,3.52,0,0,1,26,94.85c1.77,0,2.2,1.21,2.2,2.38V99.4a8.4,8.4,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.76,99.71a2.86,2.86,0,0,0,1.4.42c.76,0,1.12-.39,1.12-.87s-.3-.78-1.08-1.06c-1-.38-1.53-1-1.53-1.65a1.79,1.79,0,0,1,2-1.7,2.94,2.94,0,0,1,1.43.36l-.27.77a2.15,2.15,0,0,0-1.18-.34c-.63,0-1,.36-1,.79s.34.7,1.1,1c1,.38,1.52.88,1.52,1.75s-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M34.52,99.71a2.79,2.79,0,0,0,1.39.42c.77,0,1.12-.39,1.12-.87s-.3-.78-1.07-1.06c-1.05-.38-1.54-1-1.54-1.65a1.79,1.79,0,0,1,2-1.7,2.91,2.91,0,0,1,1.43.36l-.26.77a2.22,2.22,0,0,0-1.19-.34c-.62,0-1,.36-1,.79s.35.7,1.1,1c1,.38,1.52.88,1.52,1.75s-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.83,95l.77,3c.17.65.32,1.25.43,1.85h0c.13-.59.32-1.21.51-1.84l1-3h.89l.9,2.9c.21.7.38,1.31.51,1.9h0a18.49,18.49,0,0,1,.44-1.88L46.14,95h1l-1.87,5.81h-1L43.47,98A17.33,17.33,0,0,1,43,96.11h0A19.79,19.79,0,0,1,42.4,98l-.94,2.76h-1L38.75,95Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M53.38,97.84a2.84,2.84,0,0,1-2.89,3.08,2.77,2.77,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.08A2.75,2.75,0,0,1,53.38,97.84Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-.95,1.77-2.26c0-1-.49-2.23-1.74-2.23S48.77,96.79,48.77,97.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.71,96.79c0-.68,0-1.27-.05-1.81h.93l0,1.14h.05a1.75,1.75,0,0,1,1.61-1.27,1,1,0,0,1,.3,0v1a1.94,1.94,0,0,0-.36,0A1.49,1.49,0,0,0,55.8,97.2a3.6,3.6,0,0,0,0,.49v3.1h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M63.53,92.27v7c0,.51,0,1.1,0,1.5h-.95l-.05-1h0a2.15,2.15,0,0,1-2,1.14c-1.4,0-2.48-1.19-2.48-3,0-1.93,1.18-3.12,2.6-3.12a1.93,1.93,0,0,1,1.75.89h0V92.27Zm-1.06,5.08a2.22,2.22,0,0,0,0-.45,1.56,1.56,0,0,0-1.53-1.22c-1.09,0-1.74,1-1.74,2.24s.58,2.15,1.72,2.15a1.6,1.6,0,0,0,1.55-1.26,2.25,2.25,0,0,0,0-.46Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "129.01", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#414042", d: "M361.87,163.45H6.26a3.2,3.2,0,0,1-3.2-3.2v-29a3.21,3.21,0,0,1,3.2-3.2H361.87a3.2,3.2,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,361.87,163.45ZM6.26,130a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M18.09,141.27a11.33,11.33,0,0,1,2-.16,3.34,3.34,0,0,1,2.27.67,2.19,2.19,0,0,1,.71,1.69,2.38,2.38,0,0,1-.63,1.73,3.34,3.34,0,0,1-2.47.89,4.25,4.25,0,0,1-.84-.07v3.23h-1Zm1,3.89a3.52,3.52,0,0,0,.87.09c1.25,0,2-.61,2-1.73s-.75-1.58-1.9-1.58a4.36,4.36,0,0,0-1,.08Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M27.34,149.25l-.08-.73h0a2.17,2.17,0,0,1-1.78.87,1.65,1.65,0,0,1-1.77-1.67c0-1.41,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.84,2.84,0,0,0-1.51.43l-.24-.7a3.61,3.61,0,0,1,1.91-.51c1.77,0,2.2,1.21,2.2,2.37v2.17a8.24,8.24,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.42,1.42,0,0,0,1.4-1,.92.92,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.76,148.17a2.76,2.76,0,0,0,1.4.42c.76,0,1.12-.38,1.12-.86s-.3-.78-1.08-1.07c-1-.37-1.53-.94-1.53-1.64a1.78,1.78,0,0,1,2-1.7,2.83,2.83,0,0,1,1.43.36l-.27.76a2.25,2.25,0,0,0-1.18-.33c-.63,0-1,.36-1,.79s.34.7,1.1,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74A3.33,3.33,0,0,1,29.5,149Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M34.52,148.17a2.69,2.69,0,0,0,1.39.42c.77,0,1.12-.38,1.12-.86s-.3-.78-1.07-1.07c-1.05-.37-1.54-.94-1.54-1.64a1.79,1.79,0,0,1,2-1.7,2.81,2.81,0,0,1,1.43.36l-.26.76a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.7,1.1,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.83,143.45l.77,3c.17.65.32,1.25.43,1.85h0c.13-.59.32-1.22.51-1.84l1-3h.89l.9,2.9c.21.7.38,1.31.51,1.9h0a19.29,19.29,0,0,1,.44-1.89l.83-2.91h1l-1.87,5.8h-1l-.88-2.77a16.58,16.58,0,0,1-.52-1.9h0a19.58,19.58,0,0,1-.53,1.91l-.94,2.76h-1l-1.75-5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M53.38,146.3a2.84,2.84,0,0,1-2.89,3.09,2.77,2.77,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.08A2.75,2.75,0,0,1,53.38,146.3Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-.94,1.77-2.25c0-1-.49-2.23-1.74-2.23S48.77,145.26,48.77,146.36Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.71,145.26c0-.68,0-1.27-.05-1.81h.93l0,1.14h.05a1.75,1.75,0,0,1,1.61-1.27,1.39,1.39,0,0,1,.3,0v1a1.32,1.32,0,0,0-.36,0,1.5,1.5,0,0,0-1.42,1.36,3.47,3.47,0,0,0,0,.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M63.53,140.74v7c0,.52,0,1.11,0,1.5h-.95l-.05-1h0a2.17,2.17,0,0,1-2,1.14c-1.4,0-2.48-1.19-2.48-2.95,0-1.94,1.18-3.12,2.6-3.12a1.94,1.94,0,0,1,1.75.88h0v-3.46Zm-1.06,5.07a2.18,2.18,0,0,0,0-.44,1.57,1.57,0,0,0-1.53-1.23c-1.09,0-1.74,1-1.74,2.25s.58,2.14,1.72,2.14a1.59,1.59,0,0,0,1.55-1.26,2.09,2.09,0,0,0,0-.45Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M73.51,149a5.2,5.2,0,0,1-2.13.38,3.78,3.78,0,0,1-4-4.09A4,4,0,0,1,71.61,141a4.2,4.2,0,0,1,1.91.36l-.25.85a3.8,3.8,0,0,0-1.63-.34,3,3,0,0,0-3.15,3.34,2.94,2.94,0,0,0,3.1,3.25,4.1,4.1,0,0,0,1.71-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M79.91,146.3A2.84,2.84,0,0,1,77,149.39a2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.87-3.08A2.75,2.75,0,0,1,79.91,146.3Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-.94,1.76-2.25c0-1-.49-2.23-1.74-2.23S75.3,145.26,75.3,146.36Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M81.24,145c0-.6,0-1.09,0-1.57h.93l.06,1h0a2.13,2.13,0,0,1,1.92-1.09c.8,0,2,.48,2,2.47v3.46H85.13v-3.34c0-.94-.35-1.72-1.34-1.72a1.5,1.5,0,0,0-1.42,1.08,1.45,1.45,0,0,0-.07.49v3.49H81.24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M88,149.25v-5H87.2v-.8H88v-.31a2.32,2.32,0,0,1,2.53-2.53A2.88,2.88,0,0,1,92,141l-.3.8a2.23,2.23,0,0,0-1.23-.33c-1.11,0-1.43.78-1.43,1.7v.29h3.37v5.8H91.38v-5H89.06v5Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M94.18,145.26c0-.68,0-1.27-.05-1.81h.93l0,1.14h0a1.74,1.74,0,0,1,1.61-1.27,1.39,1.39,0,0,1,.3,0v1a1.32,1.32,0,0,0-.36,0,1.49,1.49,0,0,0-1.42,1.36,3.37,3.37,0,0,0,0,.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M98.15,145c0-.6,0-1.09-.05-1.57H99l0,.93h0a2,2,0,0,1,1.82-1.06,1.72,1.72,0,0,1,1.65,1.16h0a2.46,2.46,0,0,1,.65-.76,2,2,0,0,1,1.28-.4c.77,0,1.91.5,1.91,2.52v3.41h-1V146c0-1.12-.41-1.79-1.26-1.79a1.36,1.36,0,0,0-1.25,1,1.69,1.69,0,0,0-.08.53v3.58h-1v-3.48c0-.92-.41-1.59-1.22-1.59a1.44,1.44,0,0,0-1.3,1.06,1.4,1.4,0,0,0-.09.51v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M77.11,190.56a10.58,10.58,0,0,1,2-.17,3.36,3.36,0,0,1,2.34.66,2,2,0,0,1,.63,1.54,2.13,2.13,0,0,1-1.52,2.06v0a2,2,0,0,1,1.19,1.63,12.89,12.89,0,0,0,.62,2.22H81.29a11,11,0,0,1-.54-1.94c-.24-1.11-.67-1.53-1.62-1.57h-1v3.51h-1Zm1,3.68h1.07c1.11,0,1.82-.61,1.82-1.53s-.76-1.5-1.86-1.51a4.3,4.3,0,0,0-1,.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M84.16,195.82a1.87,1.87,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.46,2.46,0,0,1,2.4,2.73,4,4,0,0,1,0,.49Zm3.1-.75a1.51,1.51,0,0,0-1.47-1.72,1.77,1.77,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M94.59,192.73c0,.42,0,.89,0,1.6v3.37a3.36,3.36,0,0,1-.83,2.65,3.11,3.11,0,0,1-2.11.69,3.78,3.78,0,0,1-1.93-.48l.26-.8a3.32,3.32,0,0,0,1.71.45c1.08,0,1.87-.56,1.87-2v-.65h0a2.05,2.05,0,0,1-1.84,1,2.59,2.59,0,0,1-2.47-2.83,2.78,2.78,0,0,1,2.61-3.08,1.92,1.92,0,0,1,1.81,1h0l0-.88ZM93.5,195a1.8,1.8,0,0,0-.06-.48A1.53,1.53,0,0,0,92,193.43c-1,0-1.73.85-1.73,2.19,0,1.14.58,2.09,1.72,2.09a1.54,1.54,0,0,0,1.46-1.08,1.88,1.88,0,0,0,.09-.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M97.4,191.1a.66.66,0,0,1-1.31,0,.65.65,0,0,1,.66-.66A.63.63,0,0,1,97.4,191.1Zm-1.18,7.44v-5.81h1.06v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M98.89,197.46a2.79,2.79,0,0,0,1.39.42c.76,0,1.12-.39,1.12-.87s-.3-.78-1.07-1.07c-1-.37-1.54-.94-1.54-1.64a1.79,1.79,0,0,1,2-1.7,2.91,2.91,0,0,1,1.43.36l-.26.77a2.22,2.22,0,0,0-1.19-.34c-.63,0-1,.36-1,.79s.34.7,1.1,1c1,.38,1.52.88,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M105.05,191.06v1.67h1.51v.8h-1.51v3.13c0,.72.21,1.13.8,1.13a2.26,2.26,0,0,0,.61-.07l0,.79a2.39,2.39,0,0,1-.93.15,1.46,1.46,0,0,1-1.14-.45,2.15,2.15,0,0,1-.41-1.51v-3.17h-.9v-.8h.9v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M111,198.54l-.09-.74h0a2.17,2.17,0,0,1-1.78.87A1.65,1.65,0,0,1,107.3,197c0-1.4,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.93,2.93,0,0,0-1.51.43l-.24-.7a3.6,3.6,0,0,1,1.9-.51c1.78,0,2.21,1.21,2.21,2.37v2.17a7.49,7.49,0,0,0,.1,1.4Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M113.54,194.54c0-.68,0-1.27-.05-1.81h.92l0,1.14h0a1.74,1.74,0,0,1,1.6-1.27,1.32,1.32,0,0,1,.3,0v1a1.71,1.71,0,0,0-.36,0,1.48,1.48,0,0,0-1.41,1.36,2.38,2.38,0,0,0,0,.49v3.1h-1Z" })) }, { name: "comment-form-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Comment Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Comment Form"), atts: { form: { type: "commentSubmit", styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "commentSubmit", postType: "", showOnResponse: true, successMessage: "", errorMessage: "", status: "0" }, 1: { id: "createEntry", message: "" } }, afterSubmit: { 0: { id: "showResponse", message: "" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, isPro: false, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "Write your name", value: "", name: "name", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ededed" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pge76e79d1e452", blockCssY: { items: { ".pge76e79d1e452 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ededed" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pge76e79d1e452 .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ededed" }, width: { Desktop: "99%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ededed" }, width: { Desktop: "99%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Website URL", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "", value: "", name: "url", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ededed" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Website URL should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ededed" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-textarea", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: {} }, label: { options: { tag: "label", for: "label", enable: true, text: "Comment", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "", value: "", name: "comment", required: false, disabled: false, minLength: null, maxLength: null, readonly: false, cols: null, rows: 3, autocomplete: false, autofocus: false, wrap: false, spellcheck: false, autocorrect: false, id: "", class: "", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ededed" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Comment should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pgeeea0720d517", blockCssY: { items: { ".pgd6ed3e1cdfbd textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pgd6ed3e1cdfbd .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pgeeea0720d517 textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ededed" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "submit", placeholder: "Write your name", value: "Submit", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#51557E" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "99%" }, color: { Desktop: "#ffffff" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#51557E" }, width: { Desktop: "100%" }, "max-width": { Desktop: "99%" }, color: { Desktop: "#ffffff" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "", class: "pg-form-field-label" } }, input: { options: { type: "hidden", placeholder: "Write your name", value: "", name: "post_id", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", includeMailBody: true, max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel", valueSource: "postID" } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg614afd61f278", blockCssY: { items: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 368.13 299.66" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "8.02", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,42.46H6.26a3.2,3.2,0,0,1-3.2-3.19V10.22A3.21,3.21,0,0,1,6.26,7H361.87a3.2,3.2,0,0,1,3.19,3.2V39.27A3.19,3.19,0,0,1,361.87,42.46ZM6.26,9a1.2,1.2,0,0,0-1.2,1.2V39.27a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19V10.22A1.19,1.19,0,0,0,361.87,9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "104.96", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,139.39H6.26a3.2,3.2,0,0,1-3.2-3.19v-29A3.2,3.2,0,0,1,6.26,104H361.87a3.19,3.19,0,0,1,3.19,3.19v29A3.19,3.19,0,0,1,361.87,139.39ZM6.26,106a1.19,1.19,0,0,0-1.2,1.19v29a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19v-29a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "152.59", width: "360", height: "86.66", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,240.25H6.26a3.2,3.2,0,0,1-3.2-3.19V154.79a3.21,3.21,0,0,1,3.2-3.2H361.87a3.2,3.2,0,0,1,3.19,3.2v82.27A3.19,3.19,0,0,1,361.87,240.25ZM6.26,153.59a1.2,1.2,0,0,0-1.2,1.2v82.27a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19V154.79a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M19.89,28.27V24.84l-2.56-4.66h1.19l1.14,2.23c.31.61.55,1.11.8,1.67h0c.23-.53.5-1.06.81-1.67l1.17-2.23h1.18l-2.71,4.64v3.45Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M28.89,25.32A2.84,2.84,0,0,1,26,28.4a2.76,2.76,0,0,1-2.79-3,2.83,2.83,0,0,1,2.88-3.08A2.75,2.75,0,0,1,28.89,25.32Zm-4.61.05c0,1.28.73,2.24,1.76,2.24s1.77-.95,1.77-2.26c0-1-.5-2.23-1.74-2.23S24.28,24.27,24.28,25.37Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M35.08,26.68c0,.6,0,1.13.05,1.59h-.94l-.06-.95h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.51-2-2.55V22.46h1.06v3.22c0,1.1.34,1.84,1.3,1.84A1.47,1.47,0,0,0,34,26V22.46h1.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M36.83,24.27c0-.68,0-1.27,0-1.81h.93l0,1.14h0a1.75,1.75,0,0,1,1.61-1.27,1.39,1.39,0,0,1,.3,0v1a1.88,1.88,0,0,0-.36,0,1.5,1.5,0,0,0-1.42,1.36,3.47,3.47,0,0,0,0,.49v3.1H36.83Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M43.34,28.27V20.18h1.13l2.6,4.09a23.83,23.83,0,0,1,1.45,2.63h0c-.1-1.08-.12-2.07-.12-3.33V20.18h1v8.09h-1l-2.57-4.11a27.32,27.32,0,0,1-1.51-2.69h0c.06,1,.08,2,.08,3.33v3.46Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.41,28.27l-.08-.74h0a2.15,2.15,0,0,1-1.77.87,1.66,1.66,0,0,1-1.78-1.67c0-1.4,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.93,2.93,0,0,0-1.51.43l-.24-.7a3.63,3.63,0,0,1,1.91-.51c1.77,0,2.2,1.21,2.2,2.37v2.17a8.44,8.44,0,0,0,.1,1.4Zm-.16-3c-1.15,0-2.45.18-2.45,1.31a.93.93,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M57,24c0-.6,0-1.09,0-1.57h.93l0,.94h0a2,2,0,0,1,1.82-1.07,1.74,1.74,0,0,1,1.65,1.16h0a2.42,2.42,0,0,1,.65-.75,2,2,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1V25c0-1.12-.41-1.79-1.26-1.79a1.38,1.38,0,0,0-1.25,1,1.74,1.74,0,0,0-.08.53v3.59h-1V24.79c0-.93-.4-1.6-1.21-1.6a1.43,1.43,0,0,0-1.3,1.06,1.4,1.4,0,0,0-.09.51v3.51H57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M67.58,25.56a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.8,4.8,0,0,1-1.93.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,2.85,2.85,0,0,1,0,.5Zm3.09-.76a1.51,1.51,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "56.49", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,90.93H6.26a3.2,3.2,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,361.87,90.93ZM6.26,57.49a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.27,72.94H19.13v2.92h3.5v.87H18.09V68.65h4.36v.87H19.13v2.56h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M24,72.5c0-.6,0-1.09-.05-1.57h.92l.05.93h0a2,2,0,0,1,1.82-1.07A1.71,1.71,0,0,1,28.38,72h0a2.33,2.33,0,0,1,.64-.76,2,2,0,0,1,1.29-.41c.76,0,1.9.51,1.9,2.52v3.42h-1V73.45c0-1.12-.41-1.79-1.26-1.79a1.35,1.35,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53v3.58h-1V73.25c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1,1.49,1.49,0,0,0-.08.52v3.5H24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M37.18,76.73,37.1,76h0a2.16,2.16,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.66C33.51,73.79,34.76,73,37,73v-.12a1.2,1.2,0,0,0-1.32-1.35,2.84,2.84,0,0,0-1.51.44l-.24-.7a3.61,3.61,0,0,1,1.91-.52c1.77,0,2.2,1.22,2.2,2.38v2.17a8.32,8.32,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.93.93,0,0,0,1,1,1.44,1.44,0,0,0,1.4-1,1,1,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M40.92,69.3a.65.65,0,0,1-1.3,0,.64.64,0,0,1,.66-.66A.62.62,0,0,1,40.92,69.3Zm-1.17,7.43v-5.8h1v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M42.56,68.22h1v8.51h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49.27,74.19l-.83,2.54H47.36l2.74-8.08h1.26l2.76,8.08H53l-.87-2.54Zm2.66-.82-.8-2.32c-.18-.53-.3-1-.42-1.48h0c-.12.48-.25,1-.41,1.46l-.79,2.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M60.14,68.22v7c0,.52,0,1.11,0,1.5h-.94l0-1h0a2.14,2.14,0,0,1-2,1.14c-1.4,0-2.48-1.18-2.48-3,0-1.93,1.19-3.12,2.6-3.12a2,2,0,0,1,1.76.89h0V68.22Zm-1,5.07a1.65,1.65,0,0,0-.05-.44,1.54,1.54,0,0,0-1.52-1.23c-1.09,0-1.74,1-1.74,2.25S56.35,76,57.49,76A1.59,1.59,0,0,0,59,74.75a1.64,1.64,0,0,0,.05-.45Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M66.91,68.22v7c0,.52,0,1.11,0,1.5H66l0-1h0a2.14,2.14,0,0,1-2,1.14c-1.4,0-2.48-1.18-2.48-3,0-1.93,1.19-3.12,2.6-3.12a1.93,1.93,0,0,1,1.75.89h0V68.22Zm-1,5.07a1.65,1.65,0,0,0,0-.44,1.55,1.55,0,0,0-1.52-1.23c-1.09,0-1.74,1-1.74,2.25S63.12,76,64.26,76a1.59,1.59,0,0,0,1.55-1.26,1.64,1.64,0,0,0,0-.45Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68.67,72.74c0-.69,0-1.27,0-1.81h.92l0,1.14h0a1.75,1.75,0,0,1,1.6-1.28,1.28,1.28,0,0,1,.3,0v1a1.23,1.23,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.36,2.38,2.38,0,0,0-.05.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M73.06,74a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.68,4.68,0,0,1,0,.49Zm3.09-.75a1.49,1.49,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M78.34,75.65a2.69,2.69,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-1-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.9,2.9,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.39,1.53.89,1.53,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M83.09,75.65a2.72,2.72,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.53-1-1.53-1.64a1.79,1.79,0,0,1,2-1.71,2.94,2.94,0,0,1,1.43.36l-.27.77A2.29,2.29,0,0,0,85,71.59c-.62,0-1,.36-1,.79s.35.69,1.11,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.3,3.3,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M19.41,125.2l-2.05-8.09h1.1l1,4.09c.24,1,.46,2,.6,2.8h0c.14-.81.39-1.76.66-2.81l1.08-4.08h1.09l1,4.11c.23,1,.44,1.91.56,2.77h0c.17-.89.4-1.79.65-2.8l1.07-4.08h1.07l-2.29,8.09H23.85l-1-4.21a23.2,23.2,0,0,1-.53-2.64h0a24.73,24.73,0,0,1-.62,2.64L20.5,125.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M28.4,122.49a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.63,4.63,0,0,1-1.93.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,2.81,2.81,0,0,1,0,.49Zm3.09-.76A1.5,1.5,0,0,0,30,120a1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M33.77,125.2c0-.4,0-1,0-1.5v-7h1v3.65h0a2.15,2.15,0,0,1,2-1.07c1.44,0,2.46,1.2,2.44,3,0,2.08-1.3,3.11-2.6,3.11a2.06,2.06,0,0,1-1.94-1.09h0l0,1Zm1.09-2.33a2.32,2.32,0,0,0,0,.38,1.63,1.63,0,0,0,1.59,1.24c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.73-2.16a1.69,1.69,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M40.5,124.12a2.86,2.86,0,0,0,1.4.42c.76,0,1.12-.39,1.12-.87s-.3-.78-1.08-1.06c-1-.37-1.53-1-1.53-1.65a1.79,1.79,0,0,1,2-1.7,2.91,2.91,0,0,1,1.43.36l-.27.77a2.15,2.15,0,0,0-1.18-.34c-.63,0-1,.36-1,.79s.34.7,1.1,1c1,.38,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M46.58,117.76a.63.63,0,0,1-.68.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.63.63,0,0,1,46.58,117.76ZM45.4,125.2v-5.81h1.06v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49.48,117.73v1.66H51v.81H49.48v3.13c0,.72.2,1.12.79,1.12a2.15,2.15,0,0,0,.61-.07l0,.79a2.42,2.42,0,0,1-.93.15,1.45,1.45,0,0,1-1.14-.45,2.13,2.13,0,0,1-.41-1.51V120.2h-.9v-.81h.9V118Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M52.7,122.49a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.63,4.63,0,0,1-1.93.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,2.81,2.81,0,0,1,0,.49Zm3.09-.76A1.5,1.5,0,0,0,54.33,120a1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M61.74,117.11v4.79c0,1.81.81,2.58,1.89,2.58s2-.79,2-2.58v-4.79h1.06v4.72c0,2.48-1.31,3.5-3.06,3.5s-2.9-1-2.9-3.45v-4.77Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68.46,117.22a10.77,10.77,0,0,1,2-.17,3.36,3.36,0,0,1,2.34.66,2.05,2.05,0,0,1,.63,1.54,2.12,2.12,0,0,1-1.52,2.06v0A2,2,0,0,1,73.1,123a13,13,0,0,0,.63,2.22H72.65a11.07,11.07,0,0,1-.54-1.93c-.24-1.12-.67-1.54-1.62-1.57h-1v3.5H68.46Zm1.05,3.68h1.06c1.12,0,1.83-.61,1.83-1.53s-.76-1.5-1.86-1.51a4.84,4.84,0,0,0-1,.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M74.92,117.11h1v7.21h3.46v.88h-4.5Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M19.41,170.75l-2.05-8.09h1.1l1,4.09c.24,1,.46,2,.6,2.8h0c.14-.81.39-1.77.66-2.81l1.08-4.08h1.09l1,4.1c.23,1,.44,1.92.56,2.78h0c.17-.89.4-1.79.65-2.8l1.07-4.08h1.07l-2.29,8.09H23.85l-1-4.21a23.2,23.2,0,0,1-.53-2.64h0a24.73,24.73,0,0,1-.62,2.64l-1.15,4.21Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M28,166.75c0-.68,0-1.27-.05-1.81h.93l0,1.14h0a1.75,1.75,0,0,1,1.61-1.27,1,1,0,0,1,.3,0v1a1.94,1.94,0,0,0-.36,0,1.49,1.49,0,0,0-1.42,1.35,3.47,3.47,0,0,0,0,.49v3.1H28Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M33.16,163.31a.62.62,0,0,1-.67.65.63.63,0,0,1-.64-.65.65.65,0,0,1,.66-.66A.63.63,0,0,1,33.16,163.31ZM32,170.75v-5.81H33v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M36.06,163.28v1.66h1.51v.81H36.06v3.13c0,.72.21,1.12.79,1.12a2.29,2.29,0,0,0,.62-.07l.05.79a2.48,2.48,0,0,1-.94.15,1.46,1.46,0,0,1-1.14-.45,2.13,2.13,0,0,1-.41-1.51v-3.16h-.9v-.81H35v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M39.28,168a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.92,4.92,0,0,1,0,.5Zm3.09-.76a1.49,1.49,0,0,0-1.46-1.71,1.75,1.75,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M48.53,170.75v-3.43L46,162.66h1.18l1.14,2.23c.31.62.55,1.11.81,1.67h0c.23-.53.5-1.05.82-1.67l1.16-2.23H52.3l-2.71,4.64v3.45Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M57.53,167.8a2.84,2.84,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.87-3.08A2.75,2.75,0,0,1,57.53,167.8Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-1,1.76-2.26c0-1-.49-2.23-1.74-2.23S52.92,166.75,52.92,167.86Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M63.72,169.16c0,.6,0,1.13.05,1.59h-.94l-.06-.95h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.51-2-2.54v-3.4h1.05v3.22c0,1.1.34,1.84,1.3,1.84a1.52,1.52,0,0,0,1.39-1,1.49,1.49,0,0,0,.1-.54v-3.56h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M65.48,166.75c0-.68,0-1.27,0-1.81h.92l0,1.14h0a1.74,1.74,0,0,1,1.6-1.27.91.91,0,0,1,.3,0v1a1.86,1.86,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.35,2.38,2.38,0,0,0,0,.49v3.1h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M77.63,170.48a5.18,5.18,0,0,1-2.14.39,3.78,3.78,0,0,1-4-4.09,4,4,0,0,1,4.22-4.25,4.4,4.4,0,0,1,1.92.36l-.25.85a3.85,3.85,0,0,0-1.63-.33,3,3,0,0,0-3.16,3.33A2.94,2.94,0,0,0,75.71,170a4.22,4.22,0,0,0,1.7-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M84,167.8a2.84,2.84,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.88-3.08A2.74,2.74,0,0,1,84,167.8Zm-4.6.06c0,1.27.73,2.23,1.76,2.23s1.77-1,1.77-2.26c0-1-.5-2.23-1.74-2.23S79.42,166.75,79.42,167.86Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M85.36,166.51c0-.6,0-1.09,0-1.57h.93l0,.94h0a2,2,0,0,1,1.82-1.07A1.74,1.74,0,0,1,89.79,166h0a2.42,2.42,0,0,1,.65-.75,2,2,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1v-3.29c0-1.11-.41-1.79-1.26-1.79a1.38,1.38,0,0,0-1.25,1,1.74,1.74,0,0,0-.08.53v3.59H89v-3.48c0-.92-.4-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.67,1.67,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M95.37,166.51c0-.6,0-1.09-.05-1.57h.92l.05.94h0a2,2,0,0,1,1.82-1.07A1.71,1.71,0,0,1,99.79,166h0a2.29,2.29,0,0,1,.65-.75,1.93,1.93,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1v-3.29c0-1.11-.4-1.79-1.26-1.79a1.38,1.38,0,0,0-1.24,1,1.73,1.73,0,0,0-.09.53v3.59H99v-3.48c0-.92-.41-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.42,1.42,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M106,168a1.86,1.86,0,0,0,2,2,3.76,3.76,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.36,4.36,0,0,1,0,.5Zm3.1-.76a1.5,1.5,0,0,0-1.47-1.71,1.76,1.76,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M111.39,166.51c0-.6,0-1.09,0-1.57h.94l.06,1h0a2.14,2.14,0,0,1,1.92-1.09c.8,0,2,.48,2,2.47v3.47h-1.06V167.4c0-.94-.34-1.71-1.34-1.71a1.48,1.48,0,0,0-1.41,1.07,1.54,1.54,0,0,0-.08.5v3.49h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M119.27,163.28v1.66h1.51v.81h-1.51v3.13c0,.72.2,1.12.79,1.12a2.15,2.15,0,0,0,.61-.07l0,.79a2.42,2.42,0,0,1-.93.15,1.46,1.46,0,0,1-1.14-.45,2.13,2.13,0,0,1-.41-1.51v-3.16h-.9v-.81h.9v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "4.07", y: "256.56", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M50.47,276.35a3.72,3.72,0,0,0,1.88.53c1.06,0,1.69-.57,1.69-1.38s-.44-1.19-1.53-1.61c-1.32-.47-2.13-1.15-2.13-2.29A2.32,2.32,0,0,1,53,269.41a3.73,3.73,0,0,1,1.79.39l-.29.85a3.24,3.24,0,0,0-1.53-.38c-1.11,0-1.53.66-1.53,1.21,0,.76.5,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33a4.25,4.25,0,0,1-2.06-.51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M61.36,276c0,.6,0,1.13,0,1.58h-.93l-.06-.95h0a2.16,2.16,0,0,1-1.91,1.08c-.92,0-2-.5-2-2.54v-3.39h1.06V275c0,1.1.33,1.85,1.29,1.85a1.52,1.52,0,0,0,1.39-1,1.37,1.37,0,0,0,.1-.54v-3.56h1.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M63.06,277.62c0-.39,0-1,0-1.5v-7h1v3.64h0a2.15,2.15,0,0,1,2-1.06c1.44,0,2.46,1.19,2.44,3,0,2.07-1.3,3.1-2.6,3.1a2.06,2.06,0,0,1-1.94-1.09h0l0,1Zm1.09-2.33a2.3,2.3,0,0,0,0,.39,1.64,1.64,0,0,0,1.59,1.23c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.73-2.16a1.7,1.7,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M69.94,273.39c0-.6,0-1.09,0-1.57h.92l0,.93h0a2,2,0,0,1,1.82-1.06,1.7,1.7,0,0,1,1.64,1.16h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.4c.77,0,1.91.5,1.91,2.51v3.42h-1v-3.28c0-1.12-.4-1.79-1.26-1.79a1.36,1.36,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53v3.58h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1.05,1.49,1.49,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M81.12,270.19a.62.62,0,0,1-.67.64.63.63,0,0,1-.64-.64.64.64,0,0,1,.66-.66A.62.62,0,0,1,81.12,270.19ZM80,277.62v-5.8h1v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M84,270.15v1.67h1.51v.8H84v3.13c0,.72.2,1.13.79,1.13a2.68,2.68,0,0,0,.61-.07l0,.79a2.73,2.73,0,0,1-.94.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51v-3.17H82.1v-.8H83v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M95,277.36a5.29,5.29,0,0,1-2.14.38,3.77,3.77,0,0,1-4-4.09,4,4,0,0,1,4.22-4.24,4.26,4.26,0,0,1,1.92.36l-.25.85a3.85,3.85,0,0,0-1.64-.34,3,3,0,0,0-3.15,3.34A2.94,2.94,0,0,0,93,276.87a4.24,4.24,0,0,0,1.7-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M101.35,274.67a2.83,2.83,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.88-3.08A2.75,2.75,0,0,1,101.35,274.67Zm-4.6.06c0,1.27.73,2.23,1.76,2.23s1.76-.95,1.76-2.25c0-1-.49-2.23-1.74-2.23S96.75,273.63,96.75,274.73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M102.69,273.39c0-.6,0-1.09,0-1.57h.92l0,.93h0a2,2,0,0,1,1.82-1.06,1.7,1.7,0,0,1,1.64,1.16h0a2.33,2.33,0,0,1,.64-.76,2,2,0,0,1,1.29-.4c.76,0,1.9.5,1.9,2.51v3.42h-1v-3.28c0-1.12-.41-1.79-1.26-1.79a1.35,1.35,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53v3.58h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1.05,1.49,1.49,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M112.69,273.39c0-.6,0-1.09,0-1.57h.92l.05.93h0a2,2,0,0,1,1.83-1.06,1.7,1.7,0,0,1,1.64,1.16h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.4c.77,0,1.91.5,1.91,2.51v3.42h-1v-3.28c0-1.12-.41-1.79-1.26-1.79a1.36,1.36,0,0,0-1.25,1,2,2,0,0,0-.08.53v3.58h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1.05,1.5,1.5,0,0,0-.09.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M123.29,274.91a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.69,2.69,0,0,1-2.86-2.92c0-1.76,1-3.13,2.72-3.13a2.45,2.45,0,0,1,2.4,2.73,4.68,4.68,0,0,1,0,.49Zm3.09-.75a1.49,1.49,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M128.71,273.39c0-.6,0-1.09,0-1.57h.93l.06,1h0a2.09,2.09,0,0,1,1.91-1.09c.81,0,2.06.47,2.06,2.47v3.46H132.6v-3.34c0-.94-.35-1.72-1.34-1.72a1.5,1.5,0,0,0-1.42,1.08,1.45,1.45,0,0,0-.07.49v3.49h-1.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M136.6,270.15v1.67h1.51v.8H136.6v3.13c0,.72.2,1.13.79,1.13a2.68,2.68,0,0,0,.61-.07l.05.79a2.73,2.73,0,0,1-.94.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.4-1.51v-3.17h-.9v-.8h.9v-1.39Z" })) }, { name: "term-submit-form-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Term Submission Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Term Submission Form"), atts: { form: { styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "termSubmitForm" } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "termSubmit", postType: "", showOnResponse: true, taxonomy: "category" }, 1: { id: "createEntry", message: "" } }, afterSubmit: { 0: { id: "showResponse", message: "" }, 1: { id: "clearForm", message: "" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, isPro: false, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Term Title", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "", value: "", name: "term_title", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Term title should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Term Slug", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "", value: "", name: "term_slug", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pgbba272b1931d", blockCssY: { items: { ".pgbba272b1931d input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: {} }, label: { options: { tag: "label", for: "label", enable: true, text: "Term Description", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "", value: "", name: "term_description", required: false, disabled: false, minLength: null, maxLength: null, readonly: false, cols: null, rows: 3, autocomplete: false, autofocus: false, wrap: false, spellcheck: false, autocorrect: false, id: "", class: "", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Term description should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockCssY: { items: { ".pgd6ed3e1cdfbd textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pgd6ed3e1cdfbd .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-textarea", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg9a328fd54a2e textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "Write your name", value: "Submit", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#51557E" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" }, color: { Desktop: "#ffffff" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#51557E" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" }, color: { Desktop: "#ffffff" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 368.13 244.63" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "4.63", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,39.07H6.26a3.19,3.19,0,0,1-3.19-3.19V6.83a3.2,3.2,0,0,1,3.19-3.2H361.87a3.2,3.2,0,0,1,3.19,3.2V35.88A3.19,3.19,0,0,1,361.87,39.07ZM6.26,5.63a1.19,1.19,0,0,0-1.19,1.2V35.88a1.19,1.19,0,0,0,1.19,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19V6.83a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "53.1", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,87.54H6.26a3.2,3.2,0,0,1-3.19-3.2v-29a3.19,3.19,0,0,1,3.19-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.2,3.2,0,0,1,361.87,87.54ZM6.26,54.1a1.19,1.19,0,0,0-1.19,1.2v29a1.19,1.19,0,0,0,1.19,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "100.74", width: "360", height: "86.66", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,188.4H6.26a3.2,3.2,0,0,1-3.19-3.2V102.93a3.19,3.19,0,0,1,3.19-3.19H361.87a3.19,3.19,0,0,1,3.19,3.19V185.2A3.2,3.2,0,0,1,361.87,188.4ZM6.26,101.74a1.19,1.19,0,0,0-1.19,1.19V185.2a1.19,1.19,0,0,0,1.19,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2V102.93a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "4.27", y: "204.92", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M19.62,17.68H17.16v-.89h6v.89H20.68v7.2H19.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M23.75,22.16a1.87,1.87,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76A4.84,4.84,0,0,1,25.6,25a2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.46,2.46,0,0,1,2.4,2.73,4,4,0,0,1,0,.49Zm3.1-.75a1.51,1.51,0,0,0-1.47-1.72,1.77,1.77,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.18,20.88c0-.68,0-1.27-.05-1.81h.92l0,1.14h.05a1.74,1.74,0,0,1,1.6-1.27,1.32,1.32,0,0,1,.3,0v1a1.79,1.79,0,0,0-.36,0,1.48,1.48,0,0,0-1.41,1.36,2.38,2.38,0,0,0-.05.49v3.1h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M33.15,20.64c0-.6,0-1.09,0-1.57H34l0,.94h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.42,2.42,0,0,1,.65-.75,1.93,1.93,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1V21.59c0-1.12-.4-1.79-1.26-1.79a1.38,1.38,0,0,0-1.24,1,1.73,1.73,0,0,0-.09.53v3.59h-1V21.4c0-.93-.41-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.4,1.4,0,0,0-.08.51v3.51h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M46.78,17.68H44.32v-.89h6v.89H47.83v7.2h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M52.2,17.44a.62.62,0,0,1-.67.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.62.62,0,0,1,52.2,17.44ZM51,24.88V19.07h1v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M55.11,17.4v1.67h1.51v.8H55.11V23c0,.72.2,1.13.79,1.13a2.15,2.15,0,0,0,.61-.07l.05.79a2.48,2.48,0,0,1-.94.15,1.47,1.47,0,0,1-1.14-.45,2.15,2.15,0,0,1-.4-1.51V19.87h-.9v-.8h.9V17.68Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M57.81,16.36h1v8.52h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M61.23,22.16a1.86,1.86,0,0,0,2,2,3.83,3.83,0,0,0,1.61-.3l.18.76a4.9,4.9,0,0,1-1.94.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.49,4.49,0,0,1,0,.49Zm3.09-.75a1.5,1.5,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M19.62,66.15H17.16v-.89h6v.89H20.68v7.19H19.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M23.75,70.63a1.87,1.87,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.47,2.47,0,0,1,2.4,2.74,4.15,4.15,0,0,1,0,.49Zm3.1-.75a1.51,1.51,0,0,0-1.47-1.72,1.76,1.76,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.18,69.35c0-.69,0-1.27-.05-1.81h.92l0,1.14h.05a1.75,1.75,0,0,1,1.6-1.28,1.28,1.28,0,0,1,.3,0v1a1.28,1.28,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.36,2.38,2.38,0,0,0-.05.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M33.15,69.11c0-.6,0-1.09,0-1.57H34l0,.93h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.17h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.41c.77,0,1.91.51,1.91,2.52v3.42h-1V70.06c0-1.12-.4-1.79-1.26-1.79a1.36,1.36,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53v3.58h-1V69.86c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1,1.49,1.49,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M45.59,72.07a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.13-1.15-2.13-2.29a2.32,2.32,0,0,1,2.61-2.19,3.73,3.73,0,0,1,1.79.39l-.29.85A3.25,3.25,0,0,0,48.07,66c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33A4.25,4.25,0,0,1,45.33,73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M51.62,64.83h1.05v8.51H51.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M59.31,71.76c0,.6,0,1.13,0,1.58h-.93l-.06-1h0a2.16,2.16,0,0,1-1.92,1.08c-.91,0-2-.5-2-2.54V67.54h1.06v3.21c0,1.1.33,1.85,1.29,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54V67.54h1.06Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M66.06,67.54c0,.42,0,.88,0,1.59V72.5a3.35,3.35,0,0,1-.82,2.65,3.09,3.09,0,0,1-2.12.7,3.78,3.78,0,0,1-1.93-.48l.27-.81a3.25,3.25,0,0,0,1.7.46c1.08,0,1.87-.56,1.87-2v-.64h0a2.08,2.08,0,0,1-1.85,1,2.6,2.6,0,0,1-2.47-2.83,2.79,2.79,0,0,1,2.61-3.09,2,2,0,0,1,1.82,1h0l0-.87ZM65,69.83a1.44,1.44,0,0,0-.06-.48,1.53,1.53,0,0,0-1.48-1.12c-1,0-1.72.85-1.72,2.2,0,1.14.57,2.08,1.71,2.08a1.54,1.54,0,0,0,1.47-1.08,1.81,1.81,0,0,0,.08-.56Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M19.62,111.69H17.16v-.88h6v.88H20.68v7.2H19.62Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M23.75,116.18a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.47,2.47,0,0,1,2.4,2.74,4.35,4.35,0,0,1,0,.49Zm3.1-.76a1.5,1.5,0,0,0-1.47-1.71,1.76,1.76,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.18,114.9c0-.69,0-1.27-.05-1.81h.92l0,1.13h.05a1.75,1.75,0,0,1,1.6-1.27,1.28,1.28,0,0,1,.3,0v1a1.86,1.86,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.35,2.57,2.57,0,0,0-.05.5v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M33.15,114.66c0-.6,0-1.1,0-1.57H34l0,.93h0A2,2,0,0,1,35.93,113a1.71,1.71,0,0,1,1.64,1.17h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.41c.77,0,1.91.51,1.91,2.52v3.42h-1V115.6c0-1.11-.4-1.78-1.26-1.78a1.36,1.36,0,0,0-1.24,1,1.61,1.61,0,0,0-.09.52v3.59h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.44,1.44,0,0,0-1.31,1.05,1.49,1.49,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M45.74,110.91a15.77,15.77,0,0,1,2.21-.16,4.65,4.65,0,0,1,3.28,1,3.74,3.74,0,0,1,1.14,2.91,4.25,4.25,0,0,1-1.17,3.14A5,5,0,0,1,47.63,119a16.84,16.84,0,0,1-1.89-.09Zm1,7.15a6.32,6.32,0,0,0,1,.06,3.11,3.11,0,0,0,3.45-3.43c0-1.9-1.07-3.12-3.28-3.12a5.89,5.89,0,0,0-1.22.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.33,116.18a1.85,1.85,0,0,0,2,2,3.83,3.83,0,0,0,1.61-.3l.18.76a4.72,4.72,0,0,1-1.94.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.88,4.88,0,0,1,0,.49Zm3.09-.76A1.5,1.5,0,0,0,56,113.71a1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M59.61,117.81a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-1-1.54-1.64a1.79,1.79,0,0,1,2-1.71,2.91,2.91,0,0,1,1.43.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.38,1.53.89,1.53,1.75,0,1-.8,1.74-2.18,1.74a3.33,3.33,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68.64,118.67A3.78,3.78,0,0,1,67,119a2.76,2.76,0,0,1-2.89-3A3,3,0,0,1,67.2,113a3.45,3.45,0,0,1,1.47.3l-.24.81a2.53,2.53,0,0,0-1.23-.28,2,2,0,0,0-2,2.2,2,2,0,0,0,2,2.17,3,3,0,0,0,1.29-.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M69.88,114.9c0-.69,0-1.27,0-1.81h.93l0,1.13h0A1.75,1.75,0,0,1,72.45,113a1.36,1.36,0,0,1,.3,0v1a1.94,1.94,0,0,0-.36,0A1.47,1.47,0,0,0,71,115.3a3.68,3.68,0,0,0,0,.5v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M75,111.45a.66.66,0,0,1-1.31,0,.65.65,0,0,1,.66-.66A.63.63,0,0,1,75,111.45Zm-1.18,7.44v-5.8h1.06v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M76.66,115c0-.74,0-1.34,0-1.89h1l0,1h0A2.28,2.28,0,0,1,79.69,113c1.41,0,2.46,1.19,2.46,3,0,2.09-1.27,3.12-2.64,3.12a2,2,0,0,1-1.78-.91h0v3.15h-1Zm1,1.55a2.82,2.82,0,0,0,0,.43,1.63,1.63,0,0,0,1.58,1.23c1.12,0,1.77-.91,1.77-2.24,0-1.16-.61-2.16-1.73-2.16a1.7,1.7,0,0,0-1.6,1.31,2,2,0,0,0-.07.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M84.76,111.42v1.67h1.51v.8H84.76V117c0,.72.2,1.13.79,1.13a2.08,2.08,0,0,0,.61-.08l0,.8a2.69,2.69,0,0,1-.94.14,1.5,1.5,0,0,1-1.14-.44,2.22,2.22,0,0,1-.4-1.51v-3.17h-.9v-.8h.9v-1.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M88.63,111.45a.62.62,0,0,1-.67.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.62.62,0,0,1,88.63,111.45Zm-1.17,7.44v-5.8h1.05v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M95.52,115.94A2.83,2.83,0,0,1,92.63,119a2.76,2.76,0,0,1-2.78-3A2.84,2.84,0,0,1,92.73,113,2.75,2.75,0,0,1,95.52,115.94Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-1,1.76-2.25c0-1-.49-2.23-1.74-2.23S90.91,114.9,90.91,116Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M96.86,114.66c0-.6,0-1.1,0-1.57h.93l.06,1h0A2.13,2.13,0,0,1,99.75,113c.8,0,2,.48,2,2.47v3.47h-1.06v-3.35c0-.93-.35-1.71-1.34-1.71A1.5,1.5,0,0,0,98,114.91a1.45,1.45,0,0,0-.07.49v3.49h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M77,224.71a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.13-1.15-2.13-2.29a2.32,2.32,0,0,1,2.61-2.19,3.73,3.73,0,0,1,1.79.39L81,219a3.25,3.25,0,0,0-1.54-.38c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33a4.25,4.25,0,0,1-2.06-.51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M87.84,224.4c0,.6,0,1.13,0,1.58H87L86.9,225h0A2.18,2.18,0,0,1,85,226.11c-.91,0-2-.5-2-2.54v-3.39H84v3.21c0,1.1.33,1.85,1.29,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54v-3.56h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M89.55,226c0-.39,0-1,0-1.5v-7h1v3.64h0a2.15,2.15,0,0,1,2-1.07c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.6,3.1A2.06,2.06,0,0,1,90.55,225h0l-.05,1Zm1.09-2.33a2.3,2.3,0,0,0,0,.39,1.63,1.63,0,0,0,1.58,1.23c1.11,0,1.77-.9,1.77-2.23,0-1.16-.6-2.16-1.73-2.16a1.7,1.7,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M96.43,221.75c0-.6,0-1.09-.05-1.57h.92l0,.93h0A2,2,0,0,1,99.21,220a1.71,1.71,0,0,1,1.64,1.17h0a2.21,2.21,0,0,1,.64-.76,2,2,0,0,1,1.29-.41c.76,0,1.9.51,1.9,2.52V226h-1v-3.29c0-1.11-.41-1.78-1.26-1.78a1.34,1.34,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53V226h-1V222.5c0-.92-.41-1.59-1.21-1.59A1.45,1.45,0,0,0,97.54,222a1.49,1.49,0,0,0-.08.52V226h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M107.61,218.55a.62.62,0,0,1-.67.64.63.63,0,0,1-.64-.64.64.64,0,0,1,.66-.66A.62.62,0,0,1,107.61,218.55ZM106.43,226v-5.8h1.06V226Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M110.51,218.51v1.67H112v.8h-1.51v3.13c0,.72.21,1.13.79,1.13a2.78,2.78,0,0,0,.62-.07l0,.79a2.73,2.73,0,0,1-.94.14,1.49,1.49,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51V221h-.9v-.8h.9v-1.39Z" })) }, { name: "post-submission-form", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Post Submission Form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Post Submission Form"), isPro: false, atts: { form: { styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "postSubmitForm" } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "postSubmit", postType: "post", showOnResponse: true, postStatus: "pending", commentStatus: "closed", pingStatus: "closed", authorByEmail: true }, 1: { id: "createEntry", message: "" } }, afterSubmit: { 0: { id: "showResponse", message: "" }, 1: { id: "refreshPage", delay: "2000" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Post Title", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "", value: "", name: "post_title", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Post title should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-textarea", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } }, ".pg9a328fd54a2e textarea": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-checkbox", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Post Category", class: "pg-form-field-label" }, styles: {} }, input: { options: { value: null, name: "post_categories", required: false, disabled: false, multiple: false, autofocus: null, readonly: false, args: { 0: { label: "Category 1", value: "category1", readonly: false }, 1: { label: "Category 2", value: "category2", readonly: false }, 2: { label: "Category 3", value: "category3", readonly: false } }, argsSrc: { src: "taxonomy" }, id: "", class: "pg-form-field-checkbox", position: "afterLabel" }, styles: {} }, inputWrap: { options: { tag: "div", enable: true, class: "" }, styles: {} }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" }, styles: {} }, blockId: "pgd631f4eba415", blockCssY: { items: {} } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Post Tags", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "comma separate, ex: Tag 1, Tag 2", value: "", name: "post_tags", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pgbba272b1931d", blockCssY: { items: { ".pgbba272b1931d input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } } } } }], ["post-grid/form-field-file", { wrapper: { options: { tag: "div", class: "" }, styles: {} }, labelWrap: { options: { tag: "div", enable: true, class: "" }, styles: {} }, label: { options: { tag: "label", for: "label", enable: true, text: "Post Featured Image", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your name", value: "", name: "post_thumbnail", required: false, disabled: false, minLength: null, maxLength: null, readonly: false, multiple: false, maxCount: 3, maxSize: null, fileTypes: [".jpg", ".jpeg", ".png", ".gif", ".pdf"], id: "", class: "pg-form-field-file", position: "afterLabel" }, styles: {} }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" }, styles: {} }, blockId: "pg95dcb32704af", blockCssY: { items: {} } }], ["post-grid/form-field-textarea", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "Write your name", value: "Submit", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#51557E" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" }, color: { Desktop: "#ffffff" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#51557E" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" }, color: { Desktop: "#ffffff" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 368.13 299.66" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "8.02", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,42.46H6.26a3.2,3.2,0,0,1-3.2-3.19V10.22A3.21,3.21,0,0,1,6.26,7H361.87a3.2,3.2,0,0,1,3.19,3.2V39.27A3.19,3.19,0,0,1,361.87,42.46ZM6.26,9a1.2,1.2,0,0,0-1.2,1.2V39.27a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19V10.22A1.19,1.19,0,0,0,361.87,9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "104.96", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,139.39H6.26a3.2,3.2,0,0,1-3.2-3.19v-29A3.2,3.2,0,0,1,6.26,104H361.87a3.19,3.19,0,0,1,3.19,3.19v29A3.19,3.19,0,0,1,361.87,139.39ZM6.26,106a1.19,1.19,0,0,0-1.2,1.19v29a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19v-29a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "152.59", width: "360", height: "86.66", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,240.25H6.26a3.2,3.2,0,0,1-3.2-3.19V154.79a3.21,3.21,0,0,1,3.2-3.2H361.87a3.2,3.2,0,0,1,3.19,3.2v82.27A3.19,3.19,0,0,1,361.87,240.25ZM6.26,153.59a1.2,1.2,0,0,0-1.2,1.2v82.27a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19V154.79a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M18.09,20.28a11.33,11.33,0,0,1,2-.16,3.34,3.34,0,0,1,2.27.67,2.19,2.19,0,0,1,.71,1.69,2.37,2.37,0,0,1-.63,1.73A3.34,3.34,0,0,1,20,25.1a3.61,3.61,0,0,1-.84-.07v3.24h-1Zm1,3.9a3.58,3.58,0,0,0,.87.08c1.25,0,2-.61,2-1.73S21.27,21,20.12,21a5.05,5.05,0,0,0-1,.08Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.39,25.32A2.84,2.84,0,0,1,26.5,28.4a2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.88-3.08A2.75,2.75,0,0,1,29.39,25.32Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-.95,1.76-2.26c0-1-.49-2.23-1.74-2.23S24.78,24.27,24.78,25.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M30.58,27.19a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.39,1.13-.87S32.8,26,32,25.68c-1-.38-1.54-.95-1.54-1.65a1.8,1.8,0,0,1,2-1.7,2.9,2.9,0,0,1,1.42.36l-.26.77a2.22,2.22,0,0,0-1.19-.34c-.62,0-1,.36-1,.79s.35.7,1.11,1c1,.38,1.52.88,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M36.75,20.79v1.67h1.51v.8H36.75v3.13c0,.72.2,1.13.79,1.13a2.21,2.21,0,0,0,.61-.07l.05.79a2.48,2.48,0,0,1-.94.15,1.47,1.47,0,0,1-1.14-.45,2.15,2.15,0,0,1-.4-1.51V23.26h-.9v-.8h.9V21.07Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M43.07,21.07H40.61v-.89h6v.89H44.13v7.2H43.07Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M48.5,20.83a.63.63,0,0,1-.68.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.63.63,0,0,1,48.5,20.83Zm-1.18,7.44V22.46h1.06v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M51.4,20.79v1.67h1.51v.8H51.4v3.13c0,.72.2,1.13.79,1.13a2.15,2.15,0,0,0,.61-.07l.05.79a2.42,2.42,0,0,1-.93.15,1.45,1.45,0,0,1-1.14-.45,2.15,2.15,0,0,1-.41-1.51V23.26h-.9v-.8h.9V21.07Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.1,19.75h1.06v8.52H54.1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M57.52,25.55a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.49,4.49,0,0,1,0,.49Zm3.09-.75a1.5,1.5,0,0,0-1.46-1.72,1.76,1.76,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.07", y: "56.49", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,90.93H6.26a3.2,3.2,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,361.87,90.93ZM6.26,57.49a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M17.94,75.46a3.72,3.72,0,0,0,1.88.53c1.06,0,1.69-.57,1.69-1.38S21.07,73.42,20,73c-1.32-.47-2.13-1.15-2.13-2.29a2.32,2.32,0,0,1,2.61-2.19,3.73,3.73,0,0,1,1.79.39l-.29.85a3.24,3.24,0,0,0-1.53-.38c-1.11,0-1.53.66-1.53,1.21,0,.76.5,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33a4.25,4.25,0,0,1-2.06-.51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M24.63,74a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.72,4.72,0,0,1-1.94.36,2.69,2.69,0,0,1-2.85-2.92c0-1.76,1-3.13,2.72-3.13a2.45,2.45,0,0,1,2.4,2.73,4.68,4.68,0,0,1,0,.49Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M30.05,68.22h1.06v8.51H30.05Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M33.47,74a1.87,1.87,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.69,2.69,0,0,1-2.86-2.92c0-1.76,1-3.13,2.73-3.13a2.46,2.46,0,0,1,2.4,2.73,4.15,4.15,0,0,1,0,.49Zm3.1-.76a1.5,1.5,0,0,0-1.47-1.71,1.76,1.76,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M43,76.52a3.9,3.9,0,0,1-1.66.33,2.76,2.76,0,0,1-2.89-3,2.94,2.94,0,0,1,3.12-3.08,3.44,3.44,0,0,1,1.46.3l-.24.81a2.5,2.5,0,0,0-1.22-.27,2.18,2.18,0,0,0,0,4.36,2.86,2.86,0,0,0,1.29-.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M45.7,69.26v1.67h1.51v.8H45.7v3.13c0,.72.2,1.13.79,1.13a2.6,2.6,0,0,0,.61-.07l0,.79a2.67,2.67,0,0,1-.93.14,1.44,1.44,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51V71.73h-.9v-.8h.9V69.54Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M56.63,76.47a5.25,5.25,0,0,1-2.14.38,3.78,3.78,0,0,1-4-4.09,4,4,0,0,1,4.22-4.24,4.26,4.26,0,0,1,1.92.36l-.25.85a3.84,3.84,0,0,0-1.63-.34,3,3,0,0,0-3.16,3.34A2.94,2.94,0,0,0,54.71,76a4.21,4.21,0,0,0,1.7-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M61,76.73,61,76h0a2.13,2.13,0,0,1-1.77.86,1.65,1.65,0,0,1-1.78-1.66c0-1.41,1.25-2.17,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.35A2.84,2.84,0,0,0,58,72l-.24-.7a3.63,3.63,0,0,1,1.91-.51c1.78,0,2.21,1.21,2.21,2.37v2.17A8.39,8.39,0,0,0,62,76.73Zm-.15-3c-1.15,0-2.46.18-2.46,1.31a.93.93,0,0,0,1,1,1.45,1.45,0,0,0,1.41-1,1.36,1.36,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M64.83,69.26v1.67h1.51v.8H64.83v3.13c0,.72.2,1.13.79,1.13a2.68,2.68,0,0,0,.61-.07l0,.79a2.73,2.73,0,0,1-.94.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.4-1.51V71.73h-.9v-.8h.9V69.54Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68,74a1.87,1.87,0,0,0,2,2,3.92,3.92,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36A2.69,2.69,0,0,1,67,73.93c0-1.76,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.15,4.15,0,0,1,0,.49Zm3.1-.76a1.5,1.5,0,0,0-1.47-1.71,1.74,1.74,0,0,0-1.61,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M78.47,70.93c0,.42,0,.88,0,1.59v3.37a3.31,3.31,0,0,1-.83,2.65,3.06,3.06,0,0,1-2.11.7,3.78,3.78,0,0,1-1.93-.48l.26-.81a3.31,3.31,0,0,0,1.71.46c1.08,0,1.87-.56,1.87-2v-.64h0a2.08,2.08,0,0,1-1.85,1,2.6,2.6,0,0,1-2.47-2.83,2.78,2.78,0,0,1,2.61-3.08,1.92,1.92,0,0,1,1.81,1h0l0-.87Zm-1.09,2.29a1.44,1.44,0,0,0-.06-.48,1.53,1.53,0,0,0-1.48-1.12c-1,0-1.73.85-1.73,2.2,0,1.14.58,2.08,1.72,2.08a1.52,1.52,0,0,0,1.46-1.08,1.82,1.82,0,0,0,.09-.56Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M85.43,73.78a2.83,2.83,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.87-3.08A2.75,2.75,0,0,1,85.43,73.78Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-.95,1.76-2.25c0-1-.49-2.23-1.74-2.23S80.82,72.74,80.82,73.84Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M86.76,72.74c0-.69,0-1.27,0-1.81h.92l0,1.14h0a1.75,1.75,0,0,1,1.61-1.27,1.39,1.39,0,0,1,.3,0v1a1.32,1.32,0,0,0-.36,0,1.49,1.49,0,0,0-1.42,1.36,3.47,3.47,0,0,0,0,.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M91.91,69.3a.62.62,0,0,1-.67.64.63.63,0,0,1-.64-.64.64.64,0,0,1,.66-.66A.62.62,0,0,1,91.91,69.3Zm-1.18,7.43v-5.8h1.06v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M93.4,75.65a2.69,2.69,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-1-1.54-1.64a1.79,1.79,0,0,1,2-1.7,2.9,2.9,0,0,1,1.42.35l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.39,1.53.89,1.53,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.27,121.41H19.13v2.91h3.5v.88H18.09v-8.09h4.36V118H19.13v2.55h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M24,121c0-.6,0-1.09-.05-1.57h.92l.05.94h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.39,2.39,0,0,1,.64-.75,2,2,0,0,1,1.29-.41c.76,0,1.9.5,1.9,2.52v3.42h-1v-3.29c0-1.11-.41-1.79-1.26-1.79a1.37,1.37,0,0,0-1.24,1,1.73,1.73,0,0,0-.09.53v3.59h-1v-3.48c0-.92-.41-1.6-1.21-1.6A1.56,1.56,0,0,0,25,121.7v3.5H24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M37.18,125.2l-.08-.73h0a2.19,2.19,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.25-2.17,3.49-2.16v-.12A1.19,1.19,0,0,0,35.68,120a2.93,2.93,0,0,0-1.51.43l-.24-.69a3.52,3.52,0,0,1,1.91-.52c1.77,0,2.2,1.21,2.2,2.38v2.17a8.4,8.4,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.3a.94.94,0,0,0,1,1,1.44,1.44,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M40.92,117.76a.62.62,0,0,1-.67.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.62.62,0,0,1,40.92,117.76Zm-1.17,7.44v-5.81h1v5.81Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M42.56,116.68h1v8.52h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49.27,122.66l-.83,2.54H47.36l2.74-8.09h1.26l2.76,8.09H53l-.87-2.54Zm2.66-.82-.8-2.33c-.18-.52-.3-1-.42-1.47h0c-.12.48-.25,1-.41,1.46l-.79,2.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M60.14,116.68v7c0,.51,0,1.1,0,1.5h-.94l0-1h0a2.14,2.14,0,0,1-2,1.14c-1.4,0-2.48-1.19-2.48-3,0-1.93,1.19-3.12,2.6-3.12a2,2,0,0,1,1.76.89h0v-3.47Zm-1,5.08a1.68,1.68,0,0,0-.05-.45,1.54,1.54,0,0,0-1.52-1.22c-1.09,0-1.74,1-1.74,2.24s.57,2.15,1.71,2.15A1.59,1.59,0,0,0,59,123.22a1.71,1.71,0,0,0,.05-.46Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M66.91,116.68v7c0,.51,0,1.1,0,1.5H66l0-1h0a2.14,2.14,0,0,1-2,1.14c-1.4,0-2.48-1.19-2.48-3,0-1.93,1.19-3.12,2.6-3.12a1.93,1.93,0,0,1,1.75.89h0v-3.47Zm-1,5.08a1.68,1.68,0,0,0,0-.45,1.55,1.55,0,0,0-1.52-1.22c-1.09,0-1.74,1-1.74,2.24s.57,2.15,1.71,2.15a1.59,1.59,0,0,0,1.55-1.26,1.71,1.71,0,0,0,0-.46Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68.67,121.2c0-.68,0-1.27,0-1.81h.92l0,1.14h0a1.74,1.74,0,0,1,1.6-1.27.91.91,0,0,1,.3,0v1a1.79,1.79,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.35,2.46,2.46,0,0,0-.05.49v3.1h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M73.06,122.49a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.88,4.88,0,0,1,0,.49Zm3.09-.76A1.49,1.49,0,0,0,74.69,120a1.75,1.75,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M78.34,124.12a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.39,1.13-.86s-.3-.79-1.08-1.07c-1-.37-1.54-1-1.54-1.65a1.8,1.8,0,0,1,2-1.7,2.9,2.9,0,0,1,1.42.36l-.26.77a2.22,2.22,0,0,0-1.19-.34c-.62,0-1,.36-1,.79s.35.7,1.1,1c1,.38,1.53.89,1.53,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M83.09,124.12a2.82,2.82,0,0,0,1.39.42c.77,0,1.13-.39,1.13-.86s-.3-.79-1.08-1.07c-1-.37-1.53-1-1.53-1.65a1.79,1.79,0,0,1,2-1.7,2.94,2.94,0,0,1,1.43.36l-.27.77a2.19,2.19,0,0,0-1.19-.34c-.62,0-1,.36-1,.79s.35.7,1.11,1c1,.38,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.3,3.3,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M18.09,162.76a12.38,12.38,0,0,1,2-.16,3.34,3.34,0,0,1,2.27.67,2.22,2.22,0,0,1,.71,1.7,2.36,2.36,0,0,1-.63,1.72,3.34,3.34,0,0,1-2.47.89,3.61,3.61,0,0,1-.84-.07v3.24h-1Zm1,3.9a3.58,3.58,0,0,0,.87.08c1.25,0,2-.61,2-1.73s-.75-1.58-1.9-1.58a5.05,5.05,0,0,0-1,.08Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M29.39,167.8a2.84,2.84,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.88-3.08A2.75,2.75,0,0,1,29.39,167.8Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-1,1.76-2.26c0-1-.49-2.23-1.74-2.23S24.78,166.75,24.78,167.86Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M30.58,169.67a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.39,1.13-.87s-.3-.78-1.08-1.06c-1-.38-1.54-.95-1.54-1.65a1.8,1.8,0,0,1,2-1.7,2.9,2.9,0,0,1,1.42.36l-.26.77a2.22,2.22,0,0,0-1.19-.34c-.62,0-1,.36-1,.79s.35.7,1.11,1c1,.38,1.52.88,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M36.75,163.27v1.67h1.51v.81H36.75v3.13c0,.72.2,1.12.79,1.12a2.21,2.21,0,0,0,.61-.07l.05.79a2.48,2.48,0,0,1-.94.15,1.47,1.47,0,0,1-1.14-.45,2.13,2.13,0,0,1-.4-1.51v-3.16h-.9v-.81h.9v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M47.68,170.48a5.05,5.05,0,0,1-2.14.39,3.77,3.77,0,0,1-4-4.09,4,4,0,0,1,4.22-4.25,4.4,4.4,0,0,1,1.92.36l-.25.85a3.85,3.85,0,0,0-1.63-.33,3,3,0,0,0-3.16,3.33A2.94,2.94,0,0,0,45.76,170a4.25,4.25,0,0,0,1.7-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M54.07,167.8a2.84,2.84,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.83,2.83,0,0,1,2.88-3.08A2.74,2.74,0,0,1,54.07,167.8Zm-4.6.06c0,1.27.73,2.23,1.76,2.23s1.76-1,1.76-2.26c0-1-.49-2.23-1.74-2.23S49.47,166.75,49.47,167.86Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M55.41,166.51c0-.6,0-1.09,0-1.57h.94l.06,1h0a2.14,2.14,0,0,1,1.92-1.09c.8,0,2.05.48,2.05,2.47v3.47H59.29V167.4c0-.93-.34-1.71-1.34-1.71a1.5,1.5,0,0,0-1.41,1.07,1.54,1.54,0,0,0-.08.5v3.49H55.41Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M63.29,163.27v1.67H64.8v.81H63.29v3.13c0,.72.21,1.12.79,1.12a2.15,2.15,0,0,0,.61-.07l0,.79a2.39,2.39,0,0,1-.93.15,1.46,1.46,0,0,1-1.14-.45,2.13,2.13,0,0,1-.41-1.51v-3.16h-.9v-.81h.9v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M66.51,168a1.85,1.85,0,0,0,2,2,3.83,3.83,0,0,0,1.61-.3l.18.76a4.72,4.72,0,0,1-1.94.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.92,4.92,0,0,1,0,.5Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M71.93,166.51c0-.6,0-1.09-.05-1.57h.94l.06,1h0a2.14,2.14,0,0,1,1.92-1.09c.81,0,2.05.48,2.05,2.47v3.47H75.82V167.4c0-.93-.35-1.71-1.35-1.71a1.5,1.5,0,0,0-1.41,1.07,1.55,1.55,0,0,0-.07.5v3.49H71.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M79.81,163.27v1.67h1.52v.81H79.81v3.13c0,.72.21,1.12.8,1.12a2.21,2.21,0,0,0,.61-.07l0,.79a2.48,2.48,0,0,1-.94.15,1.46,1.46,0,0,1-1.14-.45,2.13,2.13,0,0,1-.41-1.51v-3.16h-.9v-.81h.9v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "4.07", y: "256.56", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M64.79,276.35a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.14-1.15-2.14-2.29a2.33,2.33,0,0,1,2.62-2.19,3.73,3.73,0,0,1,1.79.39l-.29.85a3.29,3.29,0,0,0-1.54-.38c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.36.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33a4.13,4.13,0,0,1-2.06-.52Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M75.67,276c0,.6,0,1.13,0,1.58h-.94l-.06-.95h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.5-2-2.54v-3.39h1V275c0,1.1.34,1.85,1.3,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54v-3.56h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M77.38,277.62c0-.4.05-1,.05-1.5v-7h1v3.64h0a2.18,2.18,0,0,1,2-1.07c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.6,3.1a2.08,2.08,0,0,1-1.95-1.09h0l0,1Zm1.09-2.33a1.6,1.6,0,0,0,0,.39,1.62,1.62,0,0,0,1.58,1.23c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.72-2.16a1.7,1.7,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M84.25,273.39c0-.6,0-1.09,0-1.57h.92l.05.93h0A2,2,0,0,1,87,271.68a1.71,1.71,0,0,1,1.64,1.17h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.41c.77,0,1.91.51,1.91,2.52v3.42h-1v-3.28c0-1.12-.41-1.79-1.26-1.79a1.36,1.36,0,0,0-1.25,1,2,2,0,0,0-.08.53v3.58h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1.05,1.49,1.49,0,0,0-.08.52v3.5h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M95.44,270.18a.66.66,0,0,1-1.31,0,.64.64,0,0,1,.66-.65A.62.62,0,0,1,95.44,270.18Zm-1.18,7.44v-5.8h1.06v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M98.34,270.15v1.67h1.51v.8H98.34v3.13c0,.72.21,1.13.79,1.13a2.6,2.6,0,0,0,.61-.07l.05.79a2.63,2.63,0,0,1-.93.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51v-3.17h-.9v-.8h.9v-1.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M103.62,269.63a12.81,12.81,0,0,1,2-.15,3.31,3.31,0,0,1,2.26.67,2.15,2.15,0,0,1,.71,1.69,2.42,2.42,0,0,1-.62,1.73,3.4,3.4,0,0,1-2.47.88,3.56,3.56,0,0,1-.84-.07v3.24h-1Zm1,3.9a3.38,3.38,0,0,0,.86.09c1.26,0,2-.62,2-1.73s-.76-1.59-1.91-1.59a4.11,4.11,0,0,0-1,.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M114.92,274.67a2.83,2.83,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.84,2.84,0,0,1,2.88-3.09A2.75,2.75,0,0,1,114.92,274.67Zm-4.6.06c0,1.27.73,2.23,1.76,2.23s1.76-.95,1.76-2.25c0-1-.49-2.23-1.74-2.23S110.32,273.63,110.32,274.73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M116.11,276.54a2.76,2.76,0,0,0,1.4.42c.76,0,1.12-.38,1.12-.86s-.3-.78-1.08-1.07c-1-.37-1.53-.95-1.53-1.64a1.79,1.79,0,0,1,2-1.71,2.94,2.94,0,0,1,1.43.36l-.27.77a2.25,2.25,0,0,0-1.18-.33c-.63,0-1,.36-1,.79s.34.69,1.1,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M122.28,270.15v1.67h1.51v.8h-1.51v3.13c0,.72.2,1.13.79,1.13a2.6,2.6,0,0,0,.61-.07l0,.79a2.67,2.67,0,0,1-.93.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51v-3.17h-.9v-.8h.9v-1.39Z" })) }, // { // name: 'reviews-form-1', // title: __('Reviews Form'), // description: __('Reviews Form'), // isPro: false, // innerBlocks: [ // ['post-grid/form-field-input', {}], // ['post-grid/form-field-input', {}], // ], // scope: ['block'], // icon: ( // <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 368.13 299.66"><rect fill="#bcbec0" x="4.06" y="47.99" width="360" height="33.44" rx="2.2" /><path fill="#343738" d="M361.87,82.42H6.26a3.19,3.19,0,0,1-3.19-3.19V50.18A3.19,3.19,0,0,1,6.26,47H361.87a3.2,3.2,0,0,1,3.2,3.19V79.23A3.2,3.2,0,0,1,361.87,82.42ZM6.26,49a1.19,1.19,0,0,0-1.19,1.19V79.23a1.19,1.19,0,0,0,1.19,1.19H361.87a1.19,1.19,0,0,0,1.2-1.19V50.18a1.19,1.19,0,0,0-1.2-1.19Z" /><path fill="#231f20" d="M19.89,68.23V64.8l-2.56-4.66h1.19l1.14,2.23c.31.61.55,1.11.8,1.67h0c.23-.53.5-1.06.81-1.67l1.17-2.23h1.18l-2.71,4.64v3.45Z" /><path fill="#231f20" d="M28.89,65.28A2.84,2.84,0,0,1,26,68.36a2.76,2.76,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.08A2.75,2.75,0,0,1,28.89,65.28Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-.95,1.77-2.26c0-1-.49-2.23-1.74-2.23S24.28,64.23,24.28,65.34Z" /><path fill="#231f20" d="M35.08,66.64c0,.6,0,1.13.05,1.59h-.94l-.06-1h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.51-2-2.54v-3.4h1v3.22c0,1.1.34,1.84,1.3,1.84a1.53,1.53,0,0,0,1.39-1A1.49,1.49,0,0,0,34,66V62.42h1.06Z" /><path fill="#231f20" d="M36.83,64.23c0-.68,0-1.27,0-1.81h.93l0,1.14h0a1.75,1.75,0,0,1,1.61-1.27,1,1,0,0,1,.3,0v1a1.88,1.88,0,0,0-.36,0,1.5,1.5,0,0,0-1.42,1.36,3.47,3.47,0,0,0,0,.49v3.1H36.83Z" /><path fill="#231f20" d="M43.34,68.23V60.14h1.14l2.59,4.09a23.83,23.83,0,0,1,1.45,2.63h0c-.09-1.08-.12-2.07-.12-3.33V60.14h1v8.09H48.35l-2.57-4.11a27.32,27.32,0,0,1-1.51-2.69h0c.06,1,.08,2,.08,3.33v3.46Z" /><path fill="#231f20" d="M54.41,68.23l-.08-.74h0a2.15,2.15,0,0,1-1.77.87,1.66,1.66,0,0,1-1.78-1.67c0-1.4,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.93,2.93,0,0,0-1.51.43l-.24-.69a3.55,3.55,0,0,1,1.91-.52c1.77,0,2.2,1.21,2.2,2.37v2.17a8.44,8.44,0,0,0,.1,1.4Zm-.16-3c-1.15,0-2.45.18-2.45,1.31a.93.93,0,0,0,1,1,1.45,1.45,0,0,0,1.41-1,1.33,1.33,0,0,0,0-.34Z" /><path fill="#231f20" d="M57,64c0-.6,0-1.09,0-1.57h.93l0,.94h0a2,2,0,0,1,1.82-1.07,1.72,1.72,0,0,1,1.65,1.16h0a2.42,2.42,0,0,1,.65-.75,2,2,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1V64.94c0-1.12-.41-1.79-1.26-1.79a1.38,1.38,0,0,0-1.25,1,1.74,1.74,0,0,0-.08.53v3.59h-1V64.75c0-.93-.41-1.6-1.22-1.6a1.43,1.43,0,0,0-1.3,1.06,1.4,1.4,0,0,0-.09.51v3.51H57Z" /><path fill="#231f20" d="M67.58,65.52a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.8,4.8,0,0,1-1.93.36,2.7,2.7,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13A2.46,2.46,0,0,1,71.69,65a2.85,2.85,0,0,1,0,.5Zm3.09-.76A1.5,1.5,0,0,0,69.21,63a1.75,1.75,0,0,0-1.62,1.72Z" /><rect fill="#bcbec0" x="4.06" y="96.45" width="360" height="33.44" rx="2.2" /><path fill="#343738" d="M361.87,130.89H6.26a3.19,3.19,0,0,1-3.19-3.2v-29a3.19,3.19,0,0,1,3.19-3.2H361.87a3.2,3.2,0,0,1,3.2,3.2v29A3.2,3.2,0,0,1,361.87,130.89ZM6.26,97.45a1.19,1.19,0,0,0-1.19,1.2v29a1.19,1.19,0,0,0,1.19,1.2H361.87a1.2,1.2,0,0,0,1.2-1.2v-29a1.2,1.2,0,0,0-1.2-1.2Z" /><path fill="#231f20" d="M22.28,112.9H19.13v2.92h3.5v.87H18.09v-8.08h4.36v.87H19.13V112h3.15Z" /><path fill="#231f20" d="M24,112.46c0-.6,0-1.09-.05-1.57h.92l.05.93h0a2,2,0,0,1,1.82-1.06,1.71,1.71,0,0,1,1.64,1.16h0a2.44,2.44,0,0,1,.64-.76,2,2,0,0,1,1.29-.4c.77,0,1.9.5,1.9,2.51v3.42h-1v-3.28c0-1.12-.4-1.79-1.26-1.79a1.35,1.35,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53v3.58h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1,1.49,1.49,0,0,0-.08.52v3.5H24Z" /><path fill="#231f20" d="M37.18,116.69,37.1,116h0a2.15,2.15,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.66c0-1.41,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.32-1.34,2.84,2.84,0,0,0-1.51.43l-.24-.7a3.61,3.61,0,0,1,1.91-.51c1.77,0,2.2,1.21,2.2,2.37v2.17a8.32,8.32,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.45.18-2.45,1.31a.93.93,0,0,0,1,1,1.43,1.43,0,0,0,1.4-1,.92.92,0,0,0,.06-.33Z" /><path fill="#231f20" d="M40.92,109.26a.65.65,0,0,1-1.3,0,.64.64,0,0,1,.66-.66A.62.62,0,0,1,40.92,109.26Zm-1.17,7.43v-5.8h1v5.8Z" /><path fill="#231f20" d="M42.56,108.18h1v8.51h-1Z" /><path fill="#231f20" d="M49.28,114.15l-.84,2.54H47.36l2.74-8.08h1.26l2.76,8.08H53l-.87-2.54Zm2.65-.82-.8-2.32a15.27,15.27,0,0,1-.41-1.48h0c-.12.48-.25,1-.41,1.47l-.79,2.33Z" /><path fill="#231f20" d="M60.15,108.18v7c0,.52,0,1.11,0,1.5h-.94l0-1h0a2.13,2.13,0,0,1-2,1.14c-1.41,0-2.49-1.18-2.49-2.95,0-1.93,1.19-3.11,2.61-3.11a2,2,0,0,1,1.75.88h0v-3.46Zm-1.06,5.07a1.65,1.65,0,0,0-.05-.44,1.54,1.54,0,0,0-1.52-1.23c-1.09,0-1.74,1-1.74,2.25S56.36,116,57.5,116a1.67,1.67,0,0,0,1.59-1.71Z" /><path fill="#231f20" d="M66.91,108.18v7c0,.52,0,1.11,0,1.5H66l0-1h0a2.14,2.14,0,0,1-2,1.14c-1.4,0-2.48-1.18-2.48-2.95,0-1.93,1.19-3.11,2.6-3.11a1.94,1.94,0,0,1,1.75.88h0v-3.46Zm-1,5.07a1.65,1.65,0,0,0,0-.44,1.54,1.54,0,0,0-1.52-1.23c-1.09,0-1.74,1-1.74,2.25s.57,2.14,1.71,2.14a1.67,1.67,0,0,0,1.6-1.71Z" /><path fill="#231f20" d="M68.67,112.7c0-.68,0-1.27,0-1.81h.92l0,1.14h0a1.74,1.74,0,0,1,1.61-1.27,1.23,1.23,0,0,1,.29,0v1a1.2,1.2,0,0,0-.35,0,1.47,1.47,0,0,0-1.42,1.36,3.37,3.37,0,0,0-.05.49v3.09h-1Z" /><path fill="#231f20" d="M73.06,114a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.69,2.69,0,0,1-2.86-2.92c0-1.76,1-3.13,2.73-3.13a2.45,2.45,0,0,1,2.39,2.73,4.68,4.68,0,0,1,0,.49Zm3.1-.75a1.51,1.51,0,0,0-1.47-1.72,1.75,1.75,0,0,0-1.62,1.72Z" /><path fill="#231f20" d="M78.34,115.61a2.69,2.69,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-.95-1.54-1.64a1.79,1.79,0,0,1,2-1.7,2.83,2.83,0,0,1,1.43.36l-.27.76a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.11,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.3,3.3,0,0,1-1.63-.39Z" /><path fill="#231f20" d="M83.09,115.61a2.75,2.75,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.53-.95-1.53-1.64a1.78,1.78,0,0,1,2-1.7,2.83,2.83,0,0,1,1.43.36l-.27.76a2.25,2.25,0,0,0-1.18-.33c-.63,0-1,.36-1,.79s.35.69,1.11,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.3,3.3,0,0,1-1.63-.39Z" /><rect fill="#bcbec0" x="4.06" y="147.2" width="360" height="86.66" rx="2.2" /><path fill="#343738" d="M361.87,234.86H6.26a3.2,3.2,0,0,1-3.19-3.2V149.39a3.19,3.19,0,0,1,3.19-3.19H361.87a3.2,3.2,0,0,1,3.2,3.19v82.27A3.21,3.21,0,0,1,361.87,234.86ZM6.26,148.2a1.19,1.19,0,0,0-1.19,1.19v82.27a1.19,1.19,0,0,0,1.19,1.2H361.87a1.2,1.2,0,0,0,1.2-1.2V149.39a1.2,1.2,0,0,0-1.2-1.19Z" /><path fill="#231f20" d="M19.41,165.35l-2.05-8.08h1.1l1,4.09c.24,1,.46,2,.6,2.79h0c.14-.8.39-1.76.66-2.8l1.08-4.08h1.09l1,4.1c.23,1,.44,1.92.56,2.77h0c.16-.89.39-1.79.64-2.79l1.07-4.08h1.07l-2.29,8.08H23.85l-1-4.21a22.78,22.78,0,0,1-.53-2.64h0a26.42,26.42,0,0,1-.63,2.64l-1.15,4.21Z" /><path fill="#231f20" d="M28,161.36c0-.69,0-1.27,0-1.81h.92l0,1.14h0a1.76,1.76,0,0,1,1.61-1.28,1.36,1.36,0,0,1,.3,0v1a1.32,1.32,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.36,2.38,2.38,0,0,0-.05.49v3.09H28Z" /><path fill="#231f20" d="M33.16,157.91a.62.62,0,0,1-.67.65.63.63,0,0,1-.64-.65.64.64,0,0,1,.66-.65A.62.62,0,0,1,33.16,157.91ZM32,165.35v-5.8H33v5.8Z" /><path fill="#231f20" d="M36.06,157.88v1.67h1.52v.8H36.06v3.13c0,.72.21,1.13.8,1.13a2.68,2.68,0,0,0,.61-.07l.05.79a2.73,2.73,0,0,1-.94.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51v-3.17h-.9v-.8H35v-1.39Z" /><path fill="#231f20" d="M39.28,162.64a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.46,2.46,0,0,1,2.39,2.74,4.68,4.68,0,0,1,0,.49Zm3.09-.76a1.49,1.49,0,0,0-1.46-1.71,1.75,1.75,0,0,0-1.62,1.71Z" /><path fill="#231f20" d="M48.53,165.35v-3.43L46,157.27h1.18l1.14,2.23c.32.61.56,1.1.81,1.67h0c.23-.53.51-1.06.82-1.67l1.16-2.23H52.3l-2.71,4.64v3.44Z" /><path fill="#231f20" d="M57.53,162.4a2.83,2.83,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.78-3,2.84,2.84,0,0,1,2.88-3.09A2.76,2.76,0,0,1,57.53,162.4Zm-4.61.06c0,1.27.74,2.23,1.77,2.23s1.76-.95,1.76-2.25c0-1-.49-2.23-1.74-2.23S52.92,161.36,52.92,162.46Z" /><path fill="#231f20" d="M63.72,163.77c0,.6,0,1.13.05,1.58h-.94l0-.95h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.5-2-2.54v-3.39h1.05v3.21c0,1.1.34,1.85,1.3,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54v-3.56h1Z" /><path fill="#231f20" d="M65.48,161.36c0-.69,0-1.27,0-1.81h.92l0,1.14h0a1.75,1.75,0,0,1,1.6-1.28,1.28,1.28,0,0,1,.3,0v1a1.23,1.23,0,0,0-.36,0,1.47,1.47,0,0,0-1.41,1.36,2.38,2.38,0,0,0,0,.49v3.09h-1Z" /><path fill="#231f20" d="M77.63,165.09a5.2,5.2,0,0,1-2.13.38,3.78,3.78,0,0,1-4-4.09,4,4,0,0,1,4.22-4.24,4.22,4.22,0,0,1,1.92.36l-.25.85a3.84,3.84,0,0,0-1.63-.34,3,3,0,0,0-3.15,3.34,2.94,2.94,0,0,0,3.1,3.25,4.21,4.21,0,0,0,1.7-.34Z" /><path fill="#231f20" d="M84,162.4a2.83,2.83,0,0,1-2.89,3.08,2.76,2.76,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.09A2.76,2.76,0,0,1,84,162.4Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-.95,1.77-2.25c0-1-.5-2.23-1.74-2.23S79.42,161.36,79.42,162.46Z" /><path fill="#231f20" d="M85.36,161.12c0-.6,0-1.09,0-1.57h.93l0,.93h0a2,2,0,0,1,1.82-1.07,1.72,1.72,0,0,1,1.65,1.17h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.41c.77,0,1.91.51,1.91,2.52v3.42h-1v-3.28c0-1.12-.41-1.79-1.26-1.79a1.36,1.36,0,0,0-1.25,1,1.64,1.64,0,0,0-.08.53v3.58H89v-3.48c0-.92-.41-1.59-1.22-1.59a1.43,1.43,0,0,0-1.3,1.05,1.5,1.5,0,0,0-.09.52v3.5h-1Z" /><path fill="#231f20" d="M95.37,161.12c0-.6,0-1.09-.05-1.57h.92l.05.93h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.17h0a2.35,2.35,0,0,1,.65-.76,2,2,0,0,1,1.28-.41c.77,0,1.91.51,1.91,2.52v3.42h-1v-3.28c0-1.12-.4-1.79-1.25-1.79a1.36,1.36,0,0,0-1.25,1,1.63,1.63,0,0,0-.09.53v3.58H99v-3.48c0-.92-.4-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1.05,1.49,1.49,0,0,0-.08.52v3.5h-1Z" /><path fill="#231f20" d="M106,162.64a1.87,1.87,0,0,0,2,2,3.92,3.92,0,0,0,1.61-.3l.18.75a4.63,4.63,0,0,1-1.93.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.47,2.47,0,0,1,2.4,2.74,4.15,4.15,0,0,1,0,.49Zm3.1-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" /><path fill="#231f20" d="M111.39,161.12c0-.6,0-1.09,0-1.57h.94l.06,1h0a2.13,2.13,0,0,1,1.92-1.1c.8,0,2,.48,2,2.47v3.47h-1V162c0-.93-.35-1.71-1.35-1.71a1.5,1.5,0,0,0-1.41,1.08,1.45,1.45,0,0,0-.07.49v3.49h-1.06Z" /><path fill="#231f20" d="M119.27,157.88v1.67h1.51v.8h-1.51v3.13c0,.72.21,1.13.79,1.13a2.78,2.78,0,0,0,.62-.07l0,.79a2.63,2.63,0,0,1-.93.14,1.45,1.45,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51v-3.17h-.9v-.8h.9v-1.39Z" /><rect fill="#414042" x="4.06" y="251.17" width="180" height="35.07" rx="3.24" /><path fill="#fff" d="M50.48,271a3.75,3.75,0,0,0,1.87.52c1.06,0,1.69-.56,1.69-1.38s-.43-1.18-1.52-1.6c-1.32-.47-2.14-1.16-2.14-2.29A2.33,2.33,0,0,1,53,264a3.6,3.6,0,0,1,1.79.4l-.29.85a3.11,3.11,0,0,0-1.53-.39c-1.1,0-1.52.66-1.52,1.22,0,.75.49,1.12,1.6,1.55,1.37.53,2.07,1.19,2.07,2.38s-.93,2.33-2.83,2.33a4.18,4.18,0,0,1-2.07-.52Z" /><path fill="#fff" d="M61.36,270.64c0,.6,0,1.13,0,1.59h-.94l-.06-1h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.51-2-2.54v-3.4h1.06v3.22c0,1.1.34,1.84,1.29,1.84a1.54,1.54,0,0,0,1.4-1,1.49,1.49,0,0,0,.09-.54v-3.56h1.06Z" /><path fill="#fff" d="M63.06,272.23c0-.4,0-1,0-1.5v-7h1v3.65h0a2.15,2.15,0,0,1,2-1.07c1.44,0,2.46,1.2,2.45,3,0,2.08-1.31,3.11-2.61,3.11a2.07,2.07,0,0,1-1.94-1.09h0l0,1Zm1.1-2.33a2.33,2.33,0,0,0,0,.38,1.65,1.65,0,0,0,1.59,1.24c1.1,0,1.76-.9,1.76-2.23,0-1.17-.6-2.16-1.73-2.16a1.69,1.69,0,0,0-1.61,1.29,2.55,2.55,0,0,0,0,.44Z" /><path fill="#fff" d="M69.94,268c0-.6,0-1.09,0-1.57h.92l0,.94h0a2,2,0,0,1,1.82-1.07,1.74,1.74,0,0,1,1.65,1.16h0a2.42,2.42,0,0,1,.65-.75,1.93,1.93,0,0,1,1.28-.41c.77,0,1.91.5,1.91,2.52v3.42h-1v-3.29c0-1.11-.41-1.79-1.26-1.79a1.38,1.38,0,0,0-1.25,1,1.74,1.74,0,0,0-.08.53v3.59h-1v-3.48c0-.92-.4-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.4,1.4,0,0,0-.08.51v3.51h-1Z" /><path fill="#fff" d="M81.12,264.79a.65.65,0,1,1-1.3,0,.64.64,0,0,1,.66-.66A.62.62,0,0,1,81.12,264.79ZM80,272.23v-5.81h1v5.81Z" /><path fill="#fff" d="M84,264.75v1.67h1.51v.8H84v3.14c0,.72.2,1.12.79,1.12a2.21,2.21,0,0,0,.61-.07l0,.79a2.48,2.48,0,0,1-.94.15,1.47,1.47,0,0,1-1.14-.45,2.13,2.13,0,0,1-.4-1.51v-3.17h-.9v-.8H83V265Z" /><path fill="#fff" d="M89.31,264.25a10.66,10.66,0,0,1,2-.17,3.32,3.32,0,0,1,2.34.66,2,2,0,0,1,.63,1.54,2.13,2.13,0,0,1-1.52,2.06v0A2,2,0,0,1,94,270a12.89,12.89,0,0,0,.62,2.22H93.49a11,11,0,0,1-.54-1.94c-.24-1.11-.67-1.53-1.62-1.57h-1v3.51h-1Zm1,3.68h1.07c1.11,0,1.82-.61,1.82-1.53s-.75-1.5-1.86-1.51a4.3,4.3,0,0,0-1,.09Z" /><path fill="#fff" d="M99.09,272.23,99,271.5h0a2.16,2.16,0,0,1-1.77.86,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.24-2.17,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.34,3,3,0,0,0-1.52.43l-.24-.69a3.55,3.55,0,0,1,1.91-.52c1.78,0,2.21,1.21,2.21,2.37v2.17a8.52,8.52,0,0,0,.09,1.4Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" /><path fill="#fff" d="M102.88,264.75v1.67h1.51v.8h-1.51v3.14c0,.72.2,1.12.79,1.12a2.15,2.15,0,0,0,.61-.07l0,.79a2.44,2.44,0,0,1-.94.15,1.47,1.47,0,0,1-1.14-.45,2.13,2.13,0,0,1-.4-1.51v-3.17H101v-.8h.9V265Z" /><path fill="#fff" d="M106.75,264.79a.62.62,0,0,1-.67.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.62.62,0,0,1,106.75,264.79Zm-1.17,7.44v-5.81h1v5.81Z" /><path fill="#fff" d="M108.39,268c0-.6,0-1.09,0-1.57h.94l0,1h0a2.14,2.14,0,0,1,1.92-1.09c.8,0,2,.48,2,2.47v3.47h-1.06v-3.35c0-.94-.34-1.72-1.34-1.72a1.51,1.51,0,0,0-1.42,1.08,1.89,1.89,0,0,0-.07.5v3.49h-1Z" /><path fill="#fff" d="M120.05,266.42c0,.42,0,.89,0,1.6v3.37a3.32,3.32,0,0,1-.83,2.65,3.06,3.06,0,0,1-2.11.69,3.68,3.68,0,0,1-1.93-.48l.26-.8a3.31,3.31,0,0,0,1.71.46c1.08,0,1.87-.57,1.87-2v-.65h0a2.08,2.08,0,0,1-1.85,1,2.59,2.59,0,0,1-2.47-2.83,2.79,2.79,0,0,1,2.61-3.08,1.92,1.92,0,0,1,1.81,1h0l0-.88ZM119,268.71a1.47,1.47,0,0,0-.06-.48,1.53,1.53,0,0,0-1.48-1.11c-1,0-1.73.85-1.73,2.19,0,1.14.58,2.09,1.72,2.09a1.54,1.54,0,0,0,1.46-1.08,1.82,1.82,0,0,0,.09-.56Z" /><path fill="#f2ba65" d="M13.69,13.92l1.62,5a.72.72,0,0,0,.69.49h5.23a.73.73,0,0,1,.43,1.31l-4.24,3.07a.73.73,0,0,0-.26.81l1.62,5a.72.72,0,0,1-1.11.8l-4.24-3.07a.69.69,0,0,0-.84,0L8.35,30.36a.72.72,0,0,1-1.11-.8l1.62-5a.73.73,0,0,0-.26-.81L4.36,20.7a.73.73,0,0,1,.43-1.31H10a.73.73,0,0,0,.69-.49l1.62-5A.71.71,0,0,1,13.69,13.92Z" /><path fill="#f2ba65" d="M39,13.92l1.62,5a.71.71,0,0,0,.68.49h5.24A.72.72,0,0,1,47,20.7l-4.24,3.07a.74.74,0,0,0-.26.81l1.62,5a.72.72,0,0,1-1.11.8l-4.23-3.07a.71.71,0,0,0-.85,0l-4.24,3.07a.71.71,0,0,1-1.1-.8l1.62-5a.74.74,0,0,0-.26-.81L29.67,20.7a.72.72,0,0,1,.42-1.31h5.24A.71.71,0,0,0,36,18.9l1.62-5A.72.72,0,0,1,39,13.92Z" /><path fill="#f2ba65" d="M64.3,13.92l1.62,5a.72.72,0,0,0,.69.49h5.23a.73.73,0,0,1,.43,1.31L68,23.77a.73.73,0,0,0-.26.81l1.62,5a.72.72,0,0,1-1.11.8L64,27.29a.69.69,0,0,0-.84,0L59,30.36a.72.72,0,0,1-1.11-.8l1.62-5a.73.73,0,0,0-.26-.81L55,20.7a.73.73,0,0,1,.43-1.31h5.23a.72.72,0,0,0,.69-.49l1.62-5A.71.71,0,0,1,64.3,13.92Z" /><path fill="#f2ba65" d="M89.61,13.92l1.62,5a.71.71,0,0,0,.68.49h5.24a.72.72,0,0,1,.42,1.31l-4.24,3.07a.74.74,0,0,0-.26.81l1.62,5a.71.71,0,0,1-1.1.8l-4.24-3.07a.71.71,0,0,0-.85,0l-4.23,3.07a.72.72,0,0,1-1.11-.8l1.62-5a.74.74,0,0,0-.26-.81L80.28,20.7a.72.72,0,0,1,.42-1.31h5.24a.71.71,0,0,0,.68-.49l1.62-5A.72.72,0,0,1,89.61,13.92Z" /><path fill="#f2ba65" d="M114.91,13.92l1.62,5a.73.73,0,0,0,.69.49h5.23a.73.73,0,0,1,.43,1.31l-4.24,3.07a.73.73,0,0,0-.26.81l1.62,5a.72.72,0,0,1-1.11.8l-4.24-3.07a.69.69,0,0,0-.84,0l-4.24,3.07a.72.72,0,0,1-1.11-.8l1.62-5a.73.73,0,0,0-.26-.81l-4.24-3.07a.73.73,0,0,1,.43-1.31h5.23a.72.72,0,0,0,.69-.49l1.62-5A.71.71,0,0,1,114.91,13.92Z" /></svg> // ), // }, // { // name: 'form-10', // title: __('Job Application Form'), // description: __('Job Application Form'), // isPro: false, // innerBlocks: [ // ['post-grid/form-field-input', {}], // ['post-grid/form-field-input', {}], // ], // scope: ['block'], // icon: ( // <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 160 80"><rect fill="#1d4ed8" x="41.67" y="13.33" width="76.67" height="23.34" /><rect fill="#1d4ed8" x="41.67" y="43.33" width="76.67" height="23.34" /></svg> // ), // }, { name: "form-11", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("OptIn form"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("OptIn form"), isPro: false, atts: { form: { type: "optInForm", styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } }, options: { type: "optInForm" } }, wrapper: { options: { tag: "div", class: "pg-form-wrap" }, styles: { gridTemplateColumns: {}, gap: {}, display: {} } }, visible: {}, onSubmit: { 0: { id: "validation", messages: [] }, 1: { id: "submitConfirm", messages: [] } }, onProcess: { 0: { id: "fluentcrmAddContact", lists: [], tags: [], message: "", showOnResponse: false } }, afterSubmit: { 0: { id: "showMessage", message: "" } }, blockId: "pg9d6a07354523", blockCssY: { items: { ".pg9d6a07354523": { "grid-template-columns": {}, gap: {}, display: {} }, ".pg9d6a07354523 form": { "grid-template-columns": { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } } } }, innerBlocks: [["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Email", class: "pg-form-field-label" }, styles: {} }, input: { options: { type: "text", placeholder: "Write your mail address", value: "", name: "email", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Email should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg9a328fd54a2e", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg9a328fd54a2e input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#ececec" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" } }, ".pg9a328fd54a2e .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: true, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "text", placeholder: "", value: "", name: "first_name", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#ececec" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "Name should not empty", position: "afterInput", class: "" }, styles: { color: { Desktop: "#c02121" }, marginTop: { Desktop: "10px" } } }, blockId: "pg8539be28243d", blockCssY: { items: { ".pg8539be28243d input": { "background-color": { Desktop: "#ececec" }, padding: { Desktop: "5px 10px 5px 10px" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, border: { Desktop: "1px solid #b5b5b5" }, "max-width": { Desktop: "100%" }, width: { Desktop: "100%" } }, ".pg8539be28243d .error-wrap": { color: { Desktop: "#c02121" }, "margin-top": { Desktop: "10px" } } } } }], ["post-grid/form-field-input", { wrapper: { options: { tag: "div", class: "" } }, labelWrap: { options: { tag: "div", enable: true, class: "" } }, label: { options: { tag: "label", for: "label", enable: false, text: "Your Name", class: "pg-form-field-label" } }, input: { options: { type: "submit", placeholder: "Write your name", value: "Submit", name: "", required: false, disabled: false, size: false, minLength: null, maxLength: null, readonly: false, step: null, pattern: null, patternCustom: "", max: null, min: null, checked: false, autocomplete: false, id: "", class: "pg-form-field-input", position: "afterLabel" }, styles: { border: { Desktop: "1px solid #b5b5b5" }, borderRadius: { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, backgroundColor: { Desktop: "#51557E" }, width: { Desktop: "100%" }, maxWidth: { Desktop: "100%" }, color: { Desktop: "#ffffff" } } }, inputWrap: { options: { tag: "div", enable: true, class: "" } }, errorWrap: { options: { tag: "div", enable: true, text: "", position: "afterInput", class: "" } }, blockId: "pg4670520d9df5", blockCssY: { items: { ".pg8539be28243d input": {}, ".pg4670520d9df5 input": { border: { Desktop: "1px solid #b5b5b5" }, "border-radius": { Desktop: "0px 0px 0px 0px" }, padding: { Desktop: "5px 10px 5px 10px" }, "background-color": { Desktop: "#51557E" }, width: { Desktop: "100%" }, "max-width": { Desktop: "100%" }, color: { Desktop: "#ffffff" } } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 368.13 244.63" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "55.12", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,89.55H6.26a3.2,3.2,0,0,1-3.2-3.19v-29a3.2,3.2,0,0,1,3.2-3.19H361.87a3.19,3.19,0,0,1,3.19,3.19V86.36A3.19,3.19,0,0,1,361.87,89.55ZM6.26,56.12a1.19,1.19,0,0,0-1.2,1.19V86.36a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19v-29a1.19,1.19,0,0,0-1.19-1.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "4.06", y: "103.58", width: "360", height: "33.44", rx: "2.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#343738", d: "M361.87,138H6.26a3.2,3.2,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.19,3.19,0,0,1,361.87,138ZM6.26,104.58a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M18.09,67.27h4.35v.88H19.13v2.68h3.06v.87H19.13v3.66h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M28.33,73.77c0,.6,0,1.13.05,1.59h-.93l-.06-1h0a2.16,2.16,0,0,1-1.92,1.08c-.91,0-2-.51-2-2.54v-3.4H24.5v3.22c0,1.1.33,1.84,1.29,1.84a1.52,1.52,0,0,0,1.39-1,1.49,1.49,0,0,0,.1-.54V69.55h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M30.09,66.84h1.05v8.52H30.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M32.92,66.84H34v8.52H32.92Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M38.33,75.36V67.27h1.14l2.59,4.09A22.28,22.28,0,0,1,43.51,74h0c-.1-1.08-.12-2.07-.12-3.33V67.27h1v8.09h-1l-2.57-4.11a25.42,25.42,0,0,1-1.51-2.69h0c.06,1,.09,2,.09,3.33v3.46Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49.41,75.36l-.09-.74h0a2.17,2.17,0,0,1-1.78.87,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.24-2.17,3.49-2.16v-.12a1.2,1.2,0,0,0-1.32-1.34,2.9,2.9,0,0,0-1.51.43l-.24-.69a3.51,3.51,0,0,1,1.9-.52c1.78,0,2.21,1.21,2.21,2.37V74a7.49,7.49,0,0,0,.1,1.4Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M52,71.12c0-.6,0-1.09,0-1.57h.92l0,.94h0a2,2,0,0,1,1.82-1.07,1.71,1.71,0,0,1,1.64,1.16h0a2.39,2.39,0,0,1,.64-.75,2,2,0,0,1,1.29-.41c.76,0,1.9.5,1.9,2.52v3.42h-1V72.07c0-1.11-.41-1.79-1.26-1.79a1.37,1.37,0,0,0-1.24,1,1.73,1.73,0,0,0-.09.53v3.59h-1V71.88c0-.92-.41-1.6-1.21-1.6a1.45,1.45,0,0,0-1.31,1.06,1.4,1.4,0,0,0-.08.51v3.51H52Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M62.57,72.65a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.46,2.46,0,0,1,2.4,2.73,4.36,4.36,0,0,1,0,.5Zm3.1-.76a1.51,1.51,0,0,0-1.47-1.72,1.77,1.77,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M22.27,120H19.13V123h3.5v.87H18.09v-8.08h4.36v.87H19.13v2.56h3.14Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M24,119.59c0-.6,0-1.09-.05-1.57h.92l.05.93h0a2,2,0,0,1,1.82-1.06,1.71,1.71,0,0,1,1.64,1.16h0a2.44,2.44,0,0,1,.64-.76,2,2,0,0,1,1.29-.4c.76,0,1.9.5,1.9,2.51v3.42h-1v-3.28c0-1.12-.41-1.79-1.26-1.79a1.35,1.35,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53v3.58h-1v-3.48c0-.92-.41-1.59-1.21-1.59a1.45,1.45,0,0,0-1.31,1,1.49,1.49,0,0,0-.08.52v3.5H24Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M37.18,123.82l-.08-.73h0a2.15,2.15,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.66c0-1.41,1.25-2.17,3.49-2.16V120a1.2,1.2,0,0,0-1.32-1.35,2.84,2.84,0,0,0-1.51.44l-.24-.7a3.61,3.61,0,0,1,1.91-.51c1.77,0,2.2,1.21,2.2,2.37v2.17a8.32,8.32,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.31a.93.93,0,0,0,1,1,1.42,1.42,0,0,0,1.4-1,.92.92,0,0,0,.06-.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M40.92,116.39a.65.65,0,0,1-1.3,0,.64.64,0,0,1,.66-.66A.62.62,0,0,1,40.92,116.39Zm-1.17,7.43V118h1v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M42.56,115.31h1v8.51h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M49.28,121.28l-.84,2.54H47.36l2.74-8.08h1.26l2.76,8.08H53l-.87-2.54Zm2.65-.82-.8-2.32c-.18-.53-.3-1-.42-1.48h0c-.12.48-.25,1-.41,1.47l-.79,2.33Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M60.15,115.31v7c0,.52,0,1.11,0,1.5h-.94l0-1h0a2.14,2.14,0,0,1-2,1.13c-1.41,0-2.49-1.18-2.49-3,0-1.93,1.19-3.11,2.6-3.11a2,2,0,0,1,1.76.88h0v-3.46Zm-1.06,5.07a1.65,1.65,0,0,0-.05-.44,1.54,1.54,0,0,0-1.52-1.23c-1.09,0-1.74,1-1.74,2.25s.58,2.14,1.72,2.14a1.67,1.67,0,0,0,1.59-1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M66.91,115.31v7c0,.52,0,1.11,0,1.5H66l0-1h0A2.15,2.15,0,0,1,64,124c-1.4,0-2.48-1.18-2.48-3,0-1.93,1.19-3.11,2.6-3.11a1.94,1.94,0,0,1,1.75.88h0v-3.46Zm-1,5.07a1.65,1.65,0,0,0,0-.44,1.55,1.55,0,0,0-1.52-1.23c-1.09,0-1.74,1-1.74,2.25s.57,2.14,1.71,2.14a1.67,1.67,0,0,0,1.6-1.71Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M68.67,119.83c0-.68,0-1.27,0-1.81h.92l0,1.14h0a1.74,1.74,0,0,1,1.6-1.27,1.32,1.32,0,0,1,.3,0v1a1.23,1.23,0,0,0-.36,0,1.48,1.48,0,0,0-1.41,1.36,3.37,3.37,0,0,0-.05.49v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M73.06,121.11a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36A2.69,2.69,0,0,1,72.05,121c0-1.76,1-3.13,2.72-3.13a2.45,2.45,0,0,1,2.4,2.73,4.68,4.68,0,0,1,0,.49Zm3.09-.75a1.49,1.49,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M78.34,122.74a2.69,2.69,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-1-1.54-1.64a1.79,1.79,0,0,1,2-1.7,2.79,2.79,0,0,1,1.42.36l-.26.76a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.11,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#231f20", d: "M83.09,122.74a2.72,2.72,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.53-1-1.53-1.64a1.78,1.78,0,0,1,2-1.7,2.83,2.83,0,0,1,1.43.36l-.27.76a2.28,2.28,0,0,0-1.18-.33c-.63,0-1,.36-1,.79s.35.69,1.11,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.3,3.3,0,0,1-1.63-.39Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#414042", x: "4.06", y: "154.44", width: "180", height: "35.07", rx: "3.24" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M70.28,174.23a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.13-1.15-2.13-2.29a2.32,2.32,0,0,1,2.61-2.19,3.73,3.73,0,0,1,1.79.39l-.29.85a3.25,3.25,0,0,0-1.54-.38c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.36.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33A4.13,4.13,0,0,1,70,175.1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M81.16,173.92c0,.6,0,1.12,0,1.58h-.94l-.06-.95h0a2.19,2.19,0,0,1-1.92,1.08c-.91,0-2-.5-2-2.54V169.7h1v3.21c0,1.1.34,1.85,1.3,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54V169.7h1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M82.87,175.5c0-.4,0-1,0-1.5v-7h1v3.64h0a2.18,2.18,0,0,1,2-1.07c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.6,3.1a2.08,2.08,0,0,1-2-1.09h0l0,1ZM84,173.17a1.6,1.6,0,0,0,.05.39,1.62,1.62,0,0,0,1.58,1.23c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.72-2.16A1.7,1.7,0,0,0,84,171.7a2.34,2.34,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M89.6,174.42a2.79,2.79,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1-.37-1.54-.95-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.87,2.87,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.11,1c1,.38,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.27,3.27,0,0,1-1.63-.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M98.63,175.29a3.9,3.9,0,0,1-1.66.33,2.76,2.76,0,0,1-2.89-3,2.94,2.94,0,0,1,3.12-3.08,3.44,3.44,0,0,1,1.46.3l-.24.81a2.48,2.48,0,0,0-1.22-.28,2.19,2.19,0,0,0,0,4.37,3,3,0,0,0,1.29-.29Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M99.87,171.51c0-.69,0-1.27-.05-1.81h.93l0,1.13h0a1.76,1.76,0,0,1,1.61-1.27,1.36,1.36,0,0,1,.3,0v1a1.32,1.32,0,0,0-.36,0,1.49,1.49,0,0,0-1.42,1.35,3.75,3.75,0,0,0,0,.5v3.09h-1Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M105,168.06a.62.62,0,0,1-.67.65.65.65,0,0,1,0-1.3A.62.62,0,0,1,105,168.06Zm-1.18,7.44v-5.8h1.06v5.8Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M106.6,175.5c0-.4.05-1,.05-1.5v-7h1v3.64h0a2.15,2.15,0,0,1,2-1.07c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.61,3.1a2.06,2.06,0,0,1-1.94-1.09h0l0,1Zm1.1-2.33a2.34,2.34,0,0,0,0,.39,1.64,1.64,0,0,0,1.59,1.23c1.1,0,1.76-.9,1.76-2.23,0-1.16-.6-2.16-1.73-2.16a1.68,1.68,0,0,0-1.6,1.3,1.71,1.71,0,0,0-.06.43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M114.07,172.79a1.85,1.85,0,0,0,2,2,3.83,3.83,0,0,0,1.61-.3l.18.76a4.72,4.72,0,0,1-1.94.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.88,4.88,0,0,1,0,.49Zm3.09-.76a1.5,1.5,0,0,0-1.46-1.71,1.74,1.74,0,0,0-1.62,1.71Z" })) } // { // name: 'form-12', // title: __('File Upload form'), // description: __('File Upload form'), // isPro: false, // atts: { // wrapper: { "options": { "tag": "div", "class": "" }, "styles": { "gridTemplateColumns": { "Desktop": "1fr " }, "gap": { "Desktop": "1em" }, "display": { "Desktop": "flex" }, "borderRadius": { "Desktop": "50px 50px 50px 50px" }, "backgroundColor": { "Desktop": "#774360" }, "color": { "Desktop": "#ffffff" }, "padding": {}, "alignItems": { "Desktop": "center" }, "justifyContent": { "Desktop": "space-between" } } }, visible: {}, onSubmit: { "0": { "id": "validation", "messages": [] }, "1": { "id": "submitConfirm", "messages": [] } }, onProcess: { "0": { "id": "newsletterSubmit", "message": "", "showOnResponse": true }, "1": { "id": "createEntry", "message": "" } }, afterSubmit: { "0": { "id": "showMessage", "message": "" } }, blockId: "pg7e7c9a6760f3", blockCssY: { "items": { ".pg9d6a07354523 form": { "grid-template-columns": { "Desktop": "1fr " }, "gap": { "Desktop": "1em" }, "display": { "Desktop": "grid" } }, ".pg7e7c9a6760f3": { "grid-template-columns": { "Desktop": "1fr " }, "gap": { "Desktop": "1em" }, "display": { "Desktop": "flex" }, "background-color": { "Desktop": "#774360" }, "border-radius": { "Desktop": "50px 50px 50px 50px" }, "color": { "Desktop": "#ffffff" }, "padding": {}, "align-items": { "Desktop": "center" }, "justify-content": { "Desktop": "space-between" } } } }, // }, // innerBlocks: [ // ['post-grid/form-field-input', { // wrapper: { "options": { "tag": "div", "class": "" }, "styles": { "margin": { "Desktop": "0px 0px 0px 30px" } } }, labelWrap: { "options": { "tag": "div", "enable": true, "class": "" } }, label: { "options": { "tag": "label", "for": "label", "enable": false, "text": "Your Email", "class": "pg-form-field-label" } }, input: { "options": { "type": "text", "placeholder": "Write your mail address", "value": "", "name": "email", "required": false, "disabled": false, "size": false, "minLength": null, "maxLength": null, "readonly": false, "step": null, "pattern": null, "patternCustom": "", "max": null, "min": null, "checked": false, "autocomplete": false, "id": "", "class": "pg-form-field-input", "position": "afterLabel" }, "styles": { "border": { "Desktop": "0px solid #b5b5b5" }, "borderRadius": { "Desktop": "0px 0px 0px 0px" }, "padding": { "Desktop": "10px 20px 10px 20px" }, "backgroundColor": { "Desktop": "#774360" }, "width": {}, "maxWidth": {}, "color": { "Desktop": "#ffffff" } }, "focus": { "backgroundColor": { "Desktop": "#774360" }, "color": { "Desktop": "#ffffff" } } }, inputWrap: { "options": { "tag": "div", "enable": true, "class": "" } }, errorWrap: { "options": { "tag": "div", "enable": true, "text": "Email should not empty", "position": "", "class": "" }, "styles": { "color": { "Desktop": "#c02121" }, "marginTop": { "Desktop": "10px" } } }, // }], // ['post-grid/form-field-input', { // wrapper: { "options": { "tag": "div", "class": "" } }, labelWrap: { "options": { "tag": "div", "enable": true, "class": "" } }, label: { "options": { "tag": "label", "for": "label", "enable": false, "text": "Your Name", "class": "pg-form-field-label" } }, input: { "options": { "type": "submit", "placeholder": "Write your name", "value": "Submit", "name": "", "required": false, "disabled": false, "size": false, "minLength": null, "maxLength": null, "readonly": false, "step": null, "pattern": null, "patternCustom": "", "max": null, "min": null, "checked": false, "autocomplete": false, "id": "", "class": "pg-form-field-input", "position": "afterLabel" }, "styles": { "border": { "Desktop": "0px solid #b5b5b5" }, "borderRadius": { "Desktop": "50px 50px 50px 50px" }, "padding": { "Desktop": "13px 50px 13px 50px" }, "backgroundColor": { "Desktop": "#DFBB9D" }, "width": { "Desktop": "100%" }, "maxWidth": { "Desktop": "100%" }, "color": { "Desktop": "#ffffff" } } }, inputWrap: { "options": { "tag": "div", "enable": true, "class": "" } }, errorWrap: { "options": { "tag": "div", "enable": true, "text": "", "position": "afterInput", "class": "" } }, // }], // ], // scope: ['block'], // icon: ( // <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 368.13 244.63"><rect fill="#bcbec0" x="4.07" y="4.63" width="360" height="33.44" rx="2.2"/><path fill="#343738" d="M361.87,39.07H6.26a3.2,3.2,0,0,1-3.2-3.19V6.83a3.21,3.21,0,0,1,3.2-3.2H361.87a3.2,3.2,0,0,1,3.19,3.2V35.88A3.19,3.19,0,0,1,361.87,39.07ZM6.26,5.63a1.2,1.2,0,0,0-1.2,1.2V35.88a1.19,1.19,0,0,0,1.2,1.19H361.87a1.19,1.19,0,0,0,1.19-1.19V6.83a1.19,1.19,0,0,0-1.19-1.2Z"/><rect fill="#bcbec0" x="4.07" y="53.1" width="360" height="33.44" rx="2.2"/><path fill="#343738" d="M361.87,87.54H6.26a3.21,3.21,0,0,1-3.2-3.2v-29a3.2,3.2,0,0,1,3.2-3.2H361.87a3.19,3.19,0,0,1,3.19,3.2v29A3.2,3.2,0,0,1,361.87,87.54ZM6.26,54.1a1.2,1.2,0,0,0-1.2,1.2v29a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2v-29a1.19,1.19,0,0,0-1.19-1.2Z"/><rect fill="#bcbec0" x="4.07" y="100.74" width="360" height="86.66" rx="2.2"/><path fill="#343738" d="M361.87,188.4H6.26a3.21,3.21,0,0,1-3.2-3.2V102.93a3.2,3.2,0,0,1,3.2-3.19H361.87a3.19,3.19,0,0,1,3.19,3.19V185.2A3.2,3.2,0,0,1,361.87,188.4ZM6.26,101.74a1.19,1.19,0,0,0-1.2,1.19V185.2a1.2,1.2,0,0,0,1.2,1.2H361.87a1.19,1.19,0,0,0,1.19-1.2V102.93a1.19,1.19,0,0,0-1.19-1.19Z"/><rect fill="#414042" x="4.27" y="204.92" width="180" height="35.07" rx="3.24"/><rect fill="#414042" x="269.6" y="59.23" width="86.61" height="21.4" rx="3.24"/><path fill="#231f20" d="M24.9,21.32c-.06-1.12-.13-2.48-.12-3.48h0c-.27.94-.61,1.95-1,3.07L22.3,24.83h-.79L20.2,21c-.38-1.14-.71-2.19-.94-3.14h0c0,1-.08,2.36-.16,3.57l-.21,3.47h-1l.57-8.09h1.33l1.38,3.91c.33,1,.61,1.88.81,2.72h0c.2-.81.49-1.7.85-2.72l1.44-3.91h1.33l.5,8.09h-1Z"/><path fill="#231f20" d="M28.36,22.16a1.86,1.86,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.84,4.84,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4.49,4.49,0,0,1,0,.49Zm3.09-.75A1.5,1.5,0,0,0,30,19.69a1.76,1.76,0,0,0-1.62,1.72Z"/><path fill="#231f20" d="M38.8,16.36v7c0,.51,0,1.1,0,1.5H37.9l0-1h0a2.16,2.16,0,0,1-2,1.14c-1.41,0-2.49-1.19-2.49-3,0-1.93,1.19-3.12,2.61-3.12a2,2,0,0,1,1.75.89h0V16.36Zm-1.06,5.07a1.65,1.65,0,0,0-.05-.44,1.54,1.54,0,0,0-1.52-1.22c-1.09,0-1.74,1-1.74,2.24s.58,2.15,1.72,2.15a1.59,1.59,0,0,0,1.54-1.26,1.71,1.71,0,0,0,.05-.46Z"/><path fill="#231f20" d="M41.73,17.44a.66.66,0,0,1-1.31,0,.65.65,0,0,1,.66-.66A.63.63,0,0,1,41.73,17.44Zm-1.18,7.44V19.07h1.06v5.81Z"/><path fill="#231f20" d="M46.57,24.88l-.08-.74h0a2.14,2.14,0,0,1-1.77.87,1.66,1.66,0,0,1-1.78-1.67c0-1.4,1.25-2.17,3.49-2.16v-.12a1.19,1.19,0,0,0-1.31-1.34,3,3,0,0,0-1.52.43l-.24-.7a3.63,3.63,0,0,1,1.91-.51c1.78,0,2.21,1.21,2.21,2.37v2.17a8.52,8.52,0,0,0,.09,1.4Zm-.15-3c-1.15,0-2.46.18-2.46,1.31a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.41-1,1.35,1.35,0,0,0,.06-.34Z"/><path fill="#231f20" d="M52.77,17.68H50.31v-.89h6v.89H53.82v7.2h-1Z"/><path fill="#231f20" d="M58.19,17.44a.62.62,0,0,1-.67.65.63.63,0,0,1-.64-.65.65.65,0,0,1,.66-.66A.63.63,0,0,1,58.19,17.44ZM57,24.88V19.07h1v5.81Z"/><path fill="#231f20" d="M61.1,17.4v1.67h1.51v.8H61.1V23c0,.72.2,1.13.79,1.13a2.21,2.21,0,0,0,.61-.07l0,.79a2.48,2.48,0,0,1-.94.15,1.46,1.46,0,0,1-1.14-.45A2.15,2.15,0,0,1,60.06,23V19.87h-.9v-.8h.9V17.68Z"/><path fill="#231f20" d="M63.8,16.36h1v8.52h-1Z"/><path fill="#231f20" d="M67.22,22.16a1.86,1.86,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.8,4.8,0,0,1-1.93.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.73,4,4,0,0,1,0,.49Zm3.09-.75a1.51,1.51,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z"/><path fill="#231f20" d="M23.74,73.08a5.25,5.25,0,0,1-2.14.38,3.77,3.77,0,0,1-4-4.09,4,4,0,0,1,4.22-4.24,4.26,4.26,0,0,1,1.92.36l-.25.85A3.84,3.84,0,0,0,21.87,66a3,3,0,0,0-3.16,3.34,2.94,2.94,0,0,0,3.11,3.25,4.24,4.24,0,0,0,1.7-.34Z"/><path fill="#231f20" d="M25,64.83h1.06v3.62h0a2,2,0,0,1,.76-.75,2.16,2.16,0,0,1,1.08-.3c.78,0,2,.48,2,2.49v3.45H28.9V70c0-.94-.35-1.73-1.34-1.73a1.51,1.51,0,0,0-1.42,1.06,1.26,1.26,0,0,0-.07.5v3.5H25Z"/><path fill="#231f20" d="M36.93,70.39A2.83,2.83,0,0,1,34,73.47a2.76,2.76,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.09A2.76,2.76,0,0,1,36.93,70.39Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-1,1.77-2.25c0-1-.5-2.23-1.74-2.23S32.32,69.35,32.32,70.45Z"/><path fill="#231f20" d="M38.12,72.26a2.69,2.69,0,0,0,1.39.42c.77,0,1.12-.38,1.12-.86s-.3-.78-1.07-1.07c-1.05-.37-1.54-1-1.54-1.64a1.79,1.79,0,0,1,2-1.71,2.91,2.91,0,0,1,1.43.36l-.26.77A2.32,2.32,0,0,0,40,68.2c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.39,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.39Z"/><path fill="#231f20" d="M42.87,72.26a2.69,2.69,0,0,0,1.39.42c.77,0,1.13-.38,1.13-.86s-.3-.78-1.08-1.07c-1.05-.37-1.54-1-1.54-1.64a1.8,1.8,0,0,1,2-1.71,2.9,2.9,0,0,1,1.42.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.62,0-1,.36-1,.79s.35.69,1.1,1c1,.39,1.53.89,1.53,1.75,0,1-.8,1.74-2.17,1.74a3.34,3.34,0,0,1-1.64-.39Z"/><path fill="#231f20" d="M48.35,70.63a1.87,1.87,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.47,2.47,0,0,1,2.4,2.74,4.15,4.15,0,0,1,0,.49Zm3.1-.75A1.51,1.51,0,0,0,50,68.16a1.76,1.76,0,0,0-1.62,1.72Z"/><path fill="#231f20" d="M56.36,65.26h4.35v.87H57.4v2.69h3.06v.86H57.4v3.66h-1Z"/><path fill="#231f20" d="M63,65.91a.66.66,0,0,1-1.31,0,.64.64,0,0,1,.66-.66A.62.62,0,0,1,63,65.91Zm-1.18,7.43v-5.8h1.06v5.8Z"/><path fill="#231f20" d="M64.66,64.83h1.06v8.51H64.66Z"/><path fill="#231f20" d="M68.08,70.63a1.86,1.86,0,0,0,2,2,4,4,0,0,0,1.61-.3l.18.75a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,4.68,4.68,0,0,1,0,.49Zm3.09-.75a1.49,1.49,0,0,0-1.46-1.72,1.75,1.75,0,0,0-1.62,1.72Z"/><path fill="#231f20" d="M24.9,115.34c-.06-1.13-.13-2.48-.12-3.49h0c-.28,1-.62,2-1,3.07l-1.43,3.92h-.79L20.2,115c-.38-1.14-.71-2.18-.94-3.14h0c0,1-.08,2.36-.16,3.57l-.21,3.47h-1l.57-8.08h1.33l1.38,3.91c.33,1,.61,1.88.81,2.72h0c.2-.82.49-1.7.85-2.72l1.44-3.91h1.33l.5,8.08h-1Z"/><path fill="#231f20" d="M28.36,116.18a1.85,1.85,0,0,0,2,2,3.8,3.8,0,0,0,1.61-.3l.18.76a4.67,4.67,0,0,1-1.93.36,2.7,2.7,0,0,1-2.86-2.93c0-1.75,1-3.13,2.73-3.13a2.46,2.46,0,0,1,2.39,2.74,4.88,4.88,0,0,1,0,.49Zm3.09-.76A1.49,1.49,0,0,0,30,113.71a1.75,1.75,0,0,0-1.62,1.71Z"/><path fill="#231f20" d="M38.8,110.38v7c0,.52,0,1.1.05,1.5h-1l0-1h0a2.16,2.16,0,0,1-2,1.14c-1.41,0-2.49-1.18-2.49-3,0-1.93,1.19-3.12,2.61-3.12a2,2,0,0,1,1.75.89h0v-3.46Zm-1.06,5.07a1.77,1.77,0,0,0-.05-.45,1.54,1.54,0,0,0-1.52-1.22c-1.09,0-1.74,1-1.74,2.24s.58,2.15,1.72,2.15a1.59,1.59,0,0,0,1.54-1.26,1.64,1.64,0,0,0,.05-.45Z"/><path fill="#231f20" d="M41.73,111.45a.66.66,0,0,1-1.31,0,.65.65,0,0,1,.66-.66A.63.63,0,0,1,41.73,111.45Zm-1.18,7.44v-5.8h1.06v5.8Z"/><path fill="#231f20" d="M46.57,118.89l-.08-.73h0a2.16,2.16,0,0,1-1.77.86,1.66,1.66,0,0,1-1.78-1.66c0-1.41,1.25-2.18,3.49-2.16v-.12a1.2,1.2,0,0,0-1.31-1.35,3,3,0,0,0-1.52.43l-.24-.69a3.64,3.64,0,0,1,1.91-.52c1.78,0,2.21,1.21,2.21,2.38v2.17a8.47,8.47,0,0,0,.09,1.39Zm-.15-3c-1.15,0-2.46.18-2.46,1.3a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1.36,1.36,0,0,0,.06-.33Z"/><path fill="#231f20" d="M51.72,110.91a16,16,0,0,1,2.22-.16,4.65,4.65,0,0,1,3.28,1,3.74,3.74,0,0,1,1.14,2.91,4.25,4.25,0,0,1-1.17,3.14A5,5,0,0,1,53.62,119a17.16,17.16,0,0,1-1.9-.09Zm1.05,7.15a6.25,6.25,0,0,0,1,.06,3.11,3.11,0,0,0,3.45-3.43c0-1.9-1.07-3.12-3.28-3.12a5.82,5.82,0,0,0-1.22.11Z"/><path fill="#231f20" d="M60.32,116.18a1.85,1.85,0,0,0,2,2,3.75,3.75,0,0,0,1.6-.3l.18.76a4.63,4.63,0,0,1-1.93.36,2.69,2.69,0,0,1-2.85-2.93c0-1.75,1-3.13,2.72-3.13a2.46,2.46,0,0,1,2.4,2.74,2.81,2.81,0,0,1,0,.49Zm3.09-.76A1.5,1.5,0,0,0,62,113.71a1.74,1.74,0,0,0-1.62,1.71Z"/><path fill="#231f20" d="M65.6,117.81a2.79,2.79,0,0,0,1.39.42c.76,0,1.12-.38,1.12-.86s-.3-.78-1.07-1.07c-1.05-.37-1.54-1-1.54-1.64a1.79,1.79,0,0,1,2-1.71,2.91,2.91,0,0,1,1.43.36l-.26.77a2.32,2.32,0,0,0-1.19-.33c-.63,0-1,.36-1,.79s.34.69,1.1,1c1,.38,1.52.89,1.52,1.75,0,1-.79,1.74-2.17,1.74a3.33,3.33,0,0,1-1.63-.4Z"/><path fill="#231f20" d="M74.63,118.67A3.81,3.81,0,0,1,73,119a2.76,2.76,0,0,1-2.89-3A3,3,0,0,1,73.19,113a3.4,3.4,0,0,1,1.46.3l-.24.81a2.45,2.45,0,0,0-1.22-.28,2,2,0,0,0-2,2.2,2,2,0,0,0,2,2.17,3,3,0,0,0,1.3-.29Z"/><path fill="#231f20" d="M75.87,114.9c0-.69,0-1.27-.05-1.81h.92l0,1.13h0a1.75,1.75,0,0,1,1.6-1.27,1.28,1.28,0,0,1,.3,0v1a1.79,1.79,0,0,0-.36,0A1.47,1.47,0,0,0,77,115.3a2.57,2.57,0,0,0,0,.5v3.09h-1Z"/><path fill="#231f20" d="M81,111.45a.63.63,0,0,1-.68.65.63.63,0,0,1-.63-.65.64.64,0,0,1,.66-.66A.63.63,0,0,1,81,111.45Zm-1.18,7.44v-5.8H80.9v5.8Z"/><path fill="#231f20" d="M82.65,115c0-.74,0-1.34-.05-1.89h1l0,1h0A2.27,2.27,0,0,1,85.68,113c1.4,0,2.46,1.19,2.46,3,0,2.09-1.27,3.12-2.64,3.12a2,2,0,0,1-1.79-.91h0v3.15h-1Zm1,1.55a2,2,0,0,0,0,.43,1.63,1.63,0,0,0,1.58,1.23c1.12,0,1.76-.91,1.76-2.24,0-1.16-.61-2.16-1.72-2.16a1.7,1.7,0,0,0-1.6,1.31,2,2,0,0,0-.07.43Z"/><path fill="#231f20" d="M90.75,111.42v1.67h1.51v.8H90.75V117c0,.72.2,1.13.79,1.13a2.13,2.13,0,0,0,.61-.08l0,.8a2.73,2.73,0,0,1-.94.14,1.49,1.49,0,0,1-1.14-.44,2.17,2.17,0,0,1-.4-1.51v-3.17h-.9v-.8h.9v-1.4Z"/><path fill="#231f20" d="M94.62,111.45a.65.65,0,1,1-1.3,0,.64.64,0,0,1,.66-.66A.62.62,0,0,1,94.62,111.45Zm-1.17,7.44v-5.8h1v5.8Z"/><path fill="#231f20" d="M101.51,115.94A2.83,2.83,0,0,1,98.62,119a2.76,2.76,0,0,1-2.78-3A2.83,2.83,0,0,1,98.71,113,2.75,2.75,0,0,1,101.51,115.94ZM96.9,116c0,1.27.73,2.23,1.77,2.23s1.76-1,1.76-2.25c0-1-.49-2.23-1.74-2.23S96.9,114.9,96.9,116Z"/><path fill="#231f20" d="M102.84,114.66c0-.6,0-1.1,0-1.57h.93l.06,1h0a2.14,2.14,0,0,1,1.92-1.09c.81,0,2,.48,2,2.47v3.47h-1v-3.35c0-.93-.35-1.71-1.34-1.71a1.5,1.5,0,0,0-1.42,1.08,1.45,1.45,0,0,0-.07.49v3.49h-1.06Z"/><path fill="#fff" d="M77,224.71a3.68,3.68,0,0,0,1.87.53c1.07,0,1.69-.57,1.69-1.38s-.43-1.19-1.52-1.61c-1.32-.47-2.13-1.15-2.13-2.29a2.32,2.32,0,0,1,2.61-2.19,3.73,3.73,0,0,1,1.79.39L81,219a3.25,3.25,0,0,0-1.54-.38c-1.1,0-1.52.66-1.52,1.21,0,.76.49,1.13,1.61,1.56,1.37.53,2.06,1.19,2.06,2.37s-.92,2.33-2.83,2.33a4.25,4.25,0,0,1-2.06-.51Z"/><path fill="#fff" d="M87.84,224.4c0,.6,0,1.13,0,1.58H87L86.9,225h0A2.18,2.18,0,0,1,85,226.11c-.91,0-2-.5-2-2.54v-3.39H84v3.21c0,1.1.33,1.85,1.29,1.85a1.52,1.52,0,0,0,1.39-1,1.57,1.57,0,0,0,.1-.54v-3.56h1Z"/><path fill="#fff" d="M89.55,226c0-.39,0-1,0-1.5v-7h1v3.64h0a2.15,2.15,0,0,1,2-1.07c1.44,0,2.46,1.2,2.45,3,0,2.07-1.31,3.1-2.6,3.1A2.06,2.06,0,0,1,90.55,225h0l-.05,1Zm1.09-2.33a2.3,2.3,0,0,0,0,.39,1.63,1.63,0,0,0,1.58,1.23c1.11,0,1.77-.9,1.77-2.23,0-1.16-.6-2.16-1.73-2.16a1.7,1.7,0,0,0-1.61,1.3,2.34,2.34,0,0,0-.06.43Z"/><path fill="#fff" d="M96.43,221.75c0-.6,0-1.09-.05-1.57h.92l0,.93h0A2,2,0,0,1,99.21,220a1.71,1.71,0,0,1,1.64,1.17h0a2.33,2.33,0,0,1,.64-.76,2,2,0,0,1,1.29-.41c.76,0,1.9.51,1.9,2.52V226h-1v-3.29c0-1.11-.41-1.78-1.26-1.78a1.34,1.34,0,0,0-1.24,1,1.63,1.63,0,0,0-.09.53V226h-1V222.5c0-.92-.41-1.59-1.21-1.59A1.45,1.45,0,0,0,97.54,222a1.49,1.49,0,0,0-.08.52V226h-1Z"/><path fill="#fff" d="M107.61,218.55a.62.62,0,0,1-.67.64.63.63,0,0,1-.64-.64.64.64,0,0,1,.66-.66A.62.62,0,0,1,107.61,218.55ZM106.43,226v-5.8h1.06V226Z"/><path fill="#fff" d="M110.51,218.51v1.67H112v.8h-1.51v3.13c0,.72.21,1.13.8,1.13a2.76,2.76,0,0,0,.61-.07l0,.79a2.63,2.63,0,0,1-.93.14,1.49,1.49,0,0,1-1.14-.44,2.15,2.15,0,0,1-.41-1.51V221h-.9v-.8h.9v-1.39Z"/><path fill="#fff" d="M285.85,65.37v4.78c0,1.81.8,2.58,1.88,2.58s2-.79,2-2.58V65.37h1.06v4.71c0,2.48-1.31,3.5-3.06,3.5s-2.91-1-2.91-3.45V65.37Z"/><path fill="#fff" d="M292.53,69.54c0-.74,0-1.34,0-1.9h.94l.05,1h0a2.27,2.27,0,0,1,2.06-1.13c1.4,0,2.46,1.19,2.46,2.95,0,2.09-1.27,3.12-2.64,3.12a2,2,0,0,1-1.79-.91h0v3.15h-1.05Zm1.05,1.55a2,2,0,0,0,.05.43,1.62,1.62,0,0,0,1.58,1.23c1.11,0,1.76-.91,1.76-2.24,0-1.16-.61-2.16-1.73-2.16a1.68,1.68,0,0,0-1.59,1.31,1.55,1.55,0,0,0-.07.43Z"/><path fill="#fff" d="M299.36,64.93h1.06v8.52h-1.06Z"/><path fill="#fff" d="M307.45,70.5a2.83,2.83,0,0,1-2.89,3.08,2.77,2.77,0,0,1-2.79-3,2.84,2.84,0,0,1,2.88-3.08A2.75,2.75,0,0,1,307.45,70.5Zm-4.61.06c0,1.27.73,2.23,1.76,2.23s1.77-1,1.77-2.26c0-1-.49-2.23-1.74-2.23S302.84,69.46,302.84,70.56Z"/><path fill="#fff" d="M312,73.45l-.09-.73h0a2.19,2.19,0,0,1-1.78.86,1.65,1.65,0,0,1-1.77-1.67c0-1.4,1.24-2.17,3.49-2.15v-.12a1.21,1.21,0,0,0-1.32-1.35,2.9,2.9,0,0,0-1.51.43l-.24-.69a3.6,3.6,0,0,1,1.9-.52c1.78,0,2.21,1.21,2.21,2.38v2.17a7.44,7.44,0,0,0,.1,1.39Zm-.16-3c-1.15,0-2.46.18-2.46,1.3a.94.94,0,0,0,1,1,1.45,1.45,0,0,0,1.4-1,1,1,0,0,0,.06-.34Z"/><path fill="#fff" d="M319.58,64.93v7c0,.52,0,1.1.05,1.5h-.95l-.05-1h0a2.15,2.15,0,0,1-2,1.14c-1.4,0-2.48-1.19-2.48-3,0-1.93,1.18-3.12,2.6-3.12a1.93,1.93,0,0,1,1.75.89h0V64.93ZM318.52,70a2.35,2.35,0,0,0,0-.45A1.56,1.56,0,0,0,317,68.34c-1.09,0-1.74,1-1.74,2.24s.58,2.15,1.72,2.15a1.6,1.6,0,0,0,1.55-1.26,2.19,2.19,0,0,0,0-.46Z"/><path fill="#fff" d="M337.48,66.46l1.08-1.1v4.56a.48.48,0,0,0,.48.47.47.47,0,0,0,.47-.47V65.36l1.09,1.1a.48.48,0,0,0,.67,0h0a.47.47,0,0,0,0-.67h0l-1.9-1.9a.56.56,0,0,0-.15-.1.55.55,0,0,0-.36,0l-.16.1-1.9,1.9a.48.48,0,1,0,.68.68Zm5.83,3a.48.48,0,0,0-.48.48v1.9a.47.47,0,0,1-.47.47h-6.64a.47.47,0,0,1-.48-.47v-1.9a.48.48,0,1,0-.95,0v1.9a1.43,1.43,0,0,0,1.43,1.42h6.64a1.42,1.42,0,0,0,1.42-1.42v-1.9A.47.47,0,0,0,343.31,69.44Z"/></svg> // ), // }, ]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/grid-wrap-item/index.js": /*!********************************************!*\ !*** ./src/blocks/grid-wrap-item/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./block.json */ "./src/blocks/grid-wrap-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_17__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M56.4043 116.3H103.695L103.695 43.9998H56.4043L56.4043 116.3Z", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-7.62939e-06 116.275H47.291L47.291 84.6754H-7.62939e-06L-7.62939e-06 116.275Z", fill: "url(#paint0_linear_61_759)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-7.62939e-06 75.625H47.291L47.291 44.025L-7.62939e-06 44.025L-7.62939e-06 75.625Z", fill: "url(#paint1_linear_61_759)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M112.709 116.275H160V84.6754H112.709V116.275Z", fill: "url(#paint2_linear_61_759)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M112.709 75.625H160V44.025L112.709 44.025V75.625Z", fill: "url(#paint3_linear_61_759)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_759", x1: "47.291", y1: "100.475", x2: "-7.62939e-06", y2: "100.475", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_759", x1: "47.291", y1: "59.825", x2: "-7.62939e-06", y2: "59.825", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_759", x1: "160", y1: "100.475", x2: "112.709", y2: "100.475", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_759", x1: "160", y1: "59.825", x2: "112.709", y2: "59.825", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/column"], transform: (attributes, innerBlocks) => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.createBlock)("post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" } } }, innerBlocks); } }], to: [{ type: "block", blocks: ["core/column"], transform: (attributes, innerBlocks) => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.createBlock)("core/column", {}, innerBlocks); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); //blockCssY.items = []; //blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'flex-grow': { "Desktop": "1" } }; //blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'flex-basis': { "Desktop": "0" } }; //setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function generateElementSudoCss(obj) { var stylesObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options") { var selector = myStore.getElementSelector(sudoSrc, wrapperSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); } }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var elementCss = generateElementSudoCss(wrapper); }, [wrapper]); function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [ //['core/paragraph', { placeholder: '', content: 'Hello Text...' }], ]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} border border-dashed` }); //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_19__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", innerBlocksProps, innerBlocksProps.children)); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/grid-wrap/index.js": /*!***************************************!*\ !*** ./src/blocks/grid-wrap/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./variations */ "./src/blocks/grid-wrap/variations.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/grid-wrap/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M56.4043 116.3H103.695L103.695 43.9998H56.4043L56.4043 116.3Z", fill: "url(#paint0_linear_61_758)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M-7.62939e-06 116.275H47.291L47.291 84.6754H-7.62939e-06L-7.62939e-06 116.275Z", fill: "url(#paint1_linear_61_758)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M-7.62939e-06 75.625H47.291L47.291 44.025L-7.62939e-06 44.025L-7.62939e-06 75.625Z", fill: "url(#paint2_linear_61_758)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M112.709 116.275H160V84.6754H112.709V116.275Z", fill: "url(#paint3_linear_61_758)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M112.709 75.625H160V44.025L112.709 44.025V75.625Z", fill: "url(#paint4_linear_61_758)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_758", x1: "103.695", y1: "80.1498", x2: "56.4043", y2: "80.1498", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_758", x1: "47.291", y1: "100.475", x2: "-7.62939e-06", y2: "100.475", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_758", x1: "47.291", y1: "59.825", x2: "-7.62939e-06", y2: "59.825", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_758", x1: "160", y1: "100.475", x2: "112.709", y2: "100.475", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_758", x1: "160", y1: "59.825", x2: "112.709", y2: "59.825", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/columns"], transform: (attributes, innerBlocks) => { var gridTemplateColumns = ""; innerBlocks.map(i => { gridTemplateColumns += "1fr "; }); var innerBlockX = innerBlocks.map((item, index) => { var widthX = item.attributes.width; var backgroundColorX = item.attributes.backgroundColor; return { clientId: item.clientId, name: item.name == "core/column" ? "post-grid/grid-wrap-item" : item.name, isValid: item.isValid, originalContent: "", validationIssues: [], attributes: { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { width: { Desktop: widthX }, backgroundColor: { Desktop: "var(--wp--preset--color--" + backgroundColorX + ") !important" } } }, blockId: "pgfaaa4b544973abc", blockCssY: { items: {} } }, innerBlocks: item.innerBlocks }; }); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/grid-wrap", { wrapper: { options: { tag: "div", class: "pg-grid-wrap" }, styles: { display: { Desktop: "grid" }, gap: { Desktop: "1em" }, gridTemplateColumns: { Desktop: gridTemplateColumns } } }, item: { options: { tag: "div", class: "pg-grid-wrap-item" } } }, innerBlockX); } }], to: [{ type: "block", blocks: ["core/columns"], transform: (attributes, innerBlocks) => { var innerBlockX = innerBlocks.map((item, index) => { return { clientId: item.clientId, name: item.name == "post-grid/grid-wrap-item" ? "core/column" : item.name, isValid: item.isValid, originalContent: "", validationIssues: [], attributes: { blockId: "pgfaaa4b544973abc", blockCssY: { items: {} } }, innerBlocks: item.innerBlocks }; }); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/columns", { isStackedOnMobile: true }, innerBlockX); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var item = attributes.item; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var itemSelector = blockClass + " .pg-grid-wrap-item"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); // blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'display': { "Desktop": "grid" } }; // blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'gap': { "Desktop": "20px" } }; // setAttributes({ blockCssY: { items: blockCssY.items } }); //setAttributes({ wrapper: { ...wrapper, styles: { display: { Desktop: 'grid' }, gap: { Desktop: '20px' } } } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = item; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function applyFlex(attr, newVal) { onChangeStyleWrapper("styles", newVal, attr); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, item); obj[sudoScource] = cssObj; setAttributes({ item: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } const ALLOWED_BLOCKS = ["post-grid/grid-wrap-item"]; const MY_TEMPLATE = [["post-grid/grid-wrap-item", {}], ["post-grid/grid-wrap-item", {}], ["post-grid/grid-wrap-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); const addChild = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/grid-wrap-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); //setActiveTab(slide.clientId); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addChild(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "grid-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "grid-wrap" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { var wrapperX = { ...wrapper, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }; setAttributes({ wrapper: wrapperX }); var elementCss = myStore.generateElementCss(wrapperX, wrapperSelector); var itemsX = { ...blockCssY.items, ...elementCss }; setAttributes({ blockCssY: { items: itemsX } }); myStore.generateBlockCss(blockCssY.items, blockId); replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "grid-item-wrap" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "grid-item-wrap" }, styles: {} } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_24__["default"], { blockName: "grid-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} pg-grid-wrap` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/grid-wrap/variations.js": /*!********************************************!*\ !*** ./src/blocks/grid-wrap/variations.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "layout-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-1"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "76.67", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "76.67", height: "23.34" })) }, { name: "layout-2", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-2"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-2"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "83.33 13.33 83.33 43.33 83.33 66.67 118.33 66.67 118.33 43.33 118.33 13.33 83.33 13.33" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "41.67 13.33 41.67 43.33 41.67 66.67 76.67 66.67 76.67 43.33 76.67 13.33 41.67 13.33" })) }, { name: "layout-3", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-3"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-3"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34", transform: "translate(201.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "76.67", height: "23.34", transform: "translate(160 49.99) rotate(180)" })) }, { name: "layout-4", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-4"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-4"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "76.67", height: "23.34" })) }, { name: "layout-5", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-5"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-5"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "41.67 13.33 41.67 43.33 41.67 66.67 76.67 66.67 76.67 43.33 76.67 13.33 41.67 13.33" })) }, { name: "layout-6", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-6"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-6"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "2" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34", transform: "translate(118.33 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "118.33 66.67 118.33 36.67 118.33 13.33 83.33 13.33 83.33 36.67 83.33 66.67 118.33 66.67" })) }, { name: "layout-7", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-7"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-7"), isPro: false, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34" })) }, { name: "layout-8", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-8"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-8"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "20.83 13.33 20.83 43.33 20.83 66.67 55.83 66.67 55.83 43.33 55.83 13.33 20.83 13.33" })) }, { name: "layout-9", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-9"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-9"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "2" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "53.35", transform: "translate(160 80) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-10", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-10"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-10"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "23.84", y: "43.33", width: "35", height: "23.34", transform: "translate(82.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "65.5", y: "43.33", width: "35", height: "23.34", transform: "translate(166.01 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "23.84", y: "13.33", width: "35", height: "23.34", transform: "translate(82.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "65.5", y: "13.33", width: "35", height: "23.34", transform: "translate(166.01 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "142.17 66.67 142.17 36.67 142.17 13.33 107.17 13.33 107.17 36.67 107.17 66.67 142.17 66.67" })) }, { name: "layout-11", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-11"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-11"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "35", height: "23.34", transform: "translate(160 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "76.67", height: "23.34", transform: "translate(118.33 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-12", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-12"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-12"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "2" }, gridColumnEnd: { Desktop: "4" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "35", height: "23.34", transform: "translate(160 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "76.67", height: "23.34", transform: "translate(201.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" })) }, { name: "layout-13", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-13"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-13"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "76.67", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "23.34", transform: "translate(160 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-14", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-14"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-14"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "2" }, gridColumnEnd: { Desktop: "4" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "76.67", height: "23.34", transform: "translate(201.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "23.34", transform: "translate(160 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-15", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 15"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 15"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "5" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "76.67", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "76.67", height: "23.34" })) }, { name: "layout-16", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 16"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 16"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "76.67", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "76.67", height: "23.34" })), innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "5" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"] }, { name: "layout-17", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 17"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 17"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "0 13.33 0 43.33 0 66.67 35 66.67 35 43.33 35 13.33 0 13.33" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "41.67 13.33 41.67 43.33 41.67 66.67 76.67 66.67 76.67 43.33 76.67 13.33 41.67 13.33" })), innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "2" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "2" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"] }, { name: "layout-18", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 18"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 18"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "35", height: "23.34", transform: "translate(35 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "160 66.67 160 36.67 160 13.33 125 13.33 125 36.67 125 66.67 160 66.67" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "35", height: "23.34", transform: "translate(35 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34", transform: "translate(118.33 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "118.33 66.67 118.33 36.67 118.33 13.33 83.33 13.33 83.33 36.67 83.33 66.67 118.33 66.67" })), innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "4" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "4" }, gridColumnEnd: { Desktop: "5" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"] }, { name: "layout-19", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-19"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-19"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "grid-item-wrap" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "4" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "4" }, gridColumnEnd: { Desktop: "5" } } } }], ["post-grid/grid-wrap-item", { wrapper: { options: { tag: "div", class: "pg-grid-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "35", height: "23.34", transform: "translate(35 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "160 66.67 160 36.67 160 13.33 125 13.33 125 36.67 125 66.67 160 66.67" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "118.33 66.67 118.33 36.67 118.33 13.33 83.33 13.33 83.33 36.67 83.33 66.67 118.33 66.67" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "76.67", height: "23.34" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/icon/index.js": /*!**********************************!*\ !*** ./src/blocks/icon/index.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/icon/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M157 57H3C1.34315 57 0 58.3431 0 60V94C0 95.6568 1.34315 97 3 97H157C158.657 97 160 95.6568 160 94V60C160 58.3431 158.657 57 157 57Z", fill: "url(#paint0_linear_61_613)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M109 71H20V82H109V71Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M138.943 69.1227C138.698 68.9943 138.408 68.9613 138.125 69.0493L119.776 74.5338C118.955 74.7521 118.72 75.9034 119.39 76.4267L123.547 79.8751L138.943 69.1227Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M139.446 69.6655C137.762 70.8455 124.13 80.3592 124.13 80.3592L130.043 85.264C130.554 85.7058 131.408 85.541 131.709 84.9411C131.709 84.9411 139.406 70.6157 139.406 70.6157C139.567 70.3112 139.582 69.9663 139.446 69.6655Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M123.099 80.4585C123.066 80.5099 123.051 80.5722 123.051 80.6346V84.2444C123.019 85.1472 124.196 85.6986 124.86 85.0698C124.86 85.0698 126.727 83.463 126.727 83.463C126.361 83.167 123.099 80.4585 123.099 80.4585Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_613", x1: "0", y1: "77", x2: "160", y2: "77", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/read-more"], transform: attributes => { var content = attributes.content; var linkTarget = attributes.linkTarget; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/icon", { text: { options: { text: content, linkTarget: linkTarget, linkTo: "postUrl", linkAttr: [] } } }); } }, { type: "block", blocks: ["core/home-link"], transform: attributes => { var content = attributes.label; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/icon", { text: { options: { text: content, linkAttr: [] } } }); } }], to: [{ type: "block", blocks: ["core/read-more"], transform: attributes => { var content = attributes.text; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/read-more", { content: content.options.text, linkTarget: content.options.linkTarget }); } }, { type: "block", blocks: ["core/home-link"], transform: attributes => { var content = attributes.text; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/home-link", { label: content.options.text }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var text = attributes.text; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var utmTracking = attributes.utmTracking; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__.applyFilters)("isProFeature", true); const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [currentPostContent, setCurrentpostContent] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "content", postId); const [customFields, setCustomFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const textEnable = text.options.enable == undefined ? true : text.options.enable; // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const textSelector = blockClass + " .text"; const iconSelector = blockClass + " .text-icon"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const [preview, setPreview] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(true); const [customText, setCustomText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(text.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var textX = myStore.parseCustomTags(text.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setCustomText(textX); }, [text.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var textX = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setprefixText(textX); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var textX = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setpostfixText(textX); }, [postfix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[textSelector] = text; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function getMetaField(metaKey) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_meta", method: "POST", data: { postId: postId, meta_key: metaKey } }).then(res => { if (res["meta_value"] != undefined && res["meta_value"].length > 0) { customFields[metaKey] = res["meta_value"]; setCustomFields({}); setCustomFields(customFields); } }); } var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__.applyFilters)("linkToArgs", linkToArgsBasic); var textSrcArgsX = { siteTitle: { label: "Site Title", value: "siteTitle" }, tagline: { label: "Tag line", value: "tagline" }, siteUrl: { label: "Site URL", value: "siteUrl" }, currentYear: { label: "Current Year", value: "currentYear" }, currentDate: { label: "Current Date", value: "currentDate", isPro: true }, postTitle: { label: "Post Title", value: "postTitle", isPro: true } }; var textSrcArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__.applyFilters)("textSrcArgs", textSrcArgsX); const [linkPickerExcerpt, setLinkPickerExcerpt] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerText, setLinkPickerText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; // console.log(content); // console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var textX = attributes.text; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (textX != undefined) { var textY = { ...textX, options: text.options }; setAttributes({ text: textY }); blockCssObj[textSelector] = textY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function setTextSrc(option, index) { var options = { ...text.options, src: option.value }; setAttributes({ text: { ...text, options: options } }); } function setFieldLinkTo(option, index) { var options = { ...text.options, linkTo: option.value }; setAttributes({ text: { ...text, options: options } }); } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryText(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; text[sudoScource] = sudoScourceArgs; }); var textX = Object.assign({}, text); setAttributes({ text: textX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, text); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ text: object }); var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleText(sudoScource, key) { var textX = { ...text }; var object = myStore.deletePropertyDeep(textX, [sudoScource, key, breakPointX]); setAttributes({ text: object }); var blockCssX = { ...blockCssY }; var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssX.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, text); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ text: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddText(sudoScource, cssObj) { let obj = Object.assign({}, text); obj[sudoScource] = cssObj; setAttributes({ text: obj }); var selector = myStore.getElementSelector(sudoScource, textSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var [linkAttrItemsText, setlinkAttrItemsText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. var [wrapAttrItems, setwrapAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; text.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItemsText(sdsd); }, [text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; if (wrapper.options.attr != undefined) { wrapper.options.attr.map(x => { if (x.val) sdsd[x.id] = x.val; }); } setwrapAttrItems(sdsd); }, [wrapper]); var postUrl = text.options.customUrl != undefined && text.options.customUrl.length > 0 ? text.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Edit Text?", help: preview ? "Edit Text Disabled." : "Edit Text Enabled.", checked: preview ? false : true, onChange: e => { setPreview(!preview); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "BUTTON", value: "button" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { if (wrapper.options.attr == undefined) { wrapper.options.attr = {}; } var sdsd = wrapper.options.attr.concat({ id: "", val: "" }); var options = { ...wrapper.options, attr: sdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }, "Add")), wrapper.options.attr != undefined && wrapper.options.attr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: wrapper.options.attr[i].id, onChange: newVal => { wrapper.options.attr[i].id = newVal; var ssdsd = wrapper.options.attr.concat([]); var options = { ...wrapper.options, attr: ssdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { wrapper.options.attr[i].val = newVal; var ssdsd = wrapper.options.attr.concat([]); var options = { ...wrapper.options, attr: ssdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { wrapper.options.attr.splice(i, 1); var ssdsd = wrapper.options.attr.concat([]); var options = { ...wrapper.options, attr: ssdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable text?", help: textEnable ? "Text enabled" : "Text disabled.", checked: textEnable ? true : false, onChange: e => { var options = { ...text.options, enable: text.options.enable ? false : true }; setAttributes({ text: { ...text, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Text Source", placeholder: "Text Source", value: text.options.text, onChange: newVal => { var options = { ...text.options, text: newVal }; setAttributes({ text: { ...text, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: linkToArgs[text.options.linkTo] == undefined ? "Choose" : linkToArgs[text.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), text.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, text.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: text.options.linkToAuthorMeta, onChange: newVal => { var options = { ...text.options, linkToAuthorMeta: newVal }; setAttributes({ text: { ...text, options: options } }); } })), text.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: text.options.linkToAuthorMeta, onChange: newVal => { var options = { ...text.options, linkToAuthorMeta: newVal }; setAttributes({ text: { ...text, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: text.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...text.options, linkTarget: newVal }; setAttributes({ text: { ...text, options: options } }); } }))), text.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: linkPickerText ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], onClick: ev => { setLinkPickerText(prev => !prev); } }), text.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], onClick: ev => { var options = { ...text.options, customUrl: "" }; setAttributes({ text: { ...text, options: options } }); } }), linkPickerText && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: text.options.customUrl, onChange: newVal => { var options = { ...text.options, customUrl: newVal.url }; setAttributes({ text: { ...text, options: options } }); //setLinkPickerText(false) } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", text.options.customUrl.length != 0 ? text.options.customUrl : "No link", " ")))), text.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ` ${isVisible ? "pb-6" : ""} transition-all duration-200 w-full flex justify-between items-center relative` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = text.options.linkAttr.concat({ id: "", val: "" }); if (isProFeature) { setIsVisible(!isVisible); } if (!isProFeature) { var options = { ...text.options, linkAttr: sdsd }; setAttributes({ text: { ...text, options: options } }); } } }, "Add"), isProFeature && isVisible && // <div className="absolute bottom-2 right-0 pg-bg-color text-white no-underline px-2 rounded-sm py-1 "> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { href: "https://getpostgrid.com/pricing/", target: "_blank", className: "absolute bottom-2 right-0 pg-bg-color text-white hover:text-white no-underline px-2 rounded-sm py-1 " }, "Subscribe to use") // </div> )), text.options.linkAttr != undefined && !isProFeature && text.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: text.options.linkAttr[i].id, onChange: newVal => { text.options.linkAttr[i].id = newVal; var ssdsd = text.options.linkAttr.concat([]); var options = { ...text.options, linkAttr: ssdsd }; setAttributes({ text: { ...text, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { text.options.linkAttr[i].val = newVal; var ssdsd = text.options.linkAttr.concat([]); var options = { ...text.options, linkAttr: ssdsd }; setAttributes({ text: { ...text, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { text.options.linkAttr.splice(i, 1); var ssdsd = text.options.linkAttr.concat([]); var options = { ...text.options, linkAttr: ssdsd }; setAttributes({ text: { ...text, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: text, onChange: onChangeStyleText, onAdd: onAddStyleText, onRemove: onRemoveStyleText, onBulkAdd: onBulkAddText })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: text, onChange: onPickCssLibraryText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }, { label: "Before Link", value: "beforeLink" }, { label: "After Link", value: "afterLink" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "icon", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockReadMore", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "icon" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, wrapAttrItems), icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), text.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeLink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "text", onClick: handleLinkClick }, linkAttrItemsText, { target: text.options.linkTarget, href: postUrl }), icon.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), textEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text" onClick: ev => { setPreview(!preview); } }, customText), !preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, textEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText // className="text" , { tagName: "span", value: text.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...text.options, text: content }; setAttributes({ text: { ...text, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }))), icon.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "afterLink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), text.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text", onClick: ev => { setPreview(!preview); } }, customText), !preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, textEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: text.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...text.options, text: content }; setAttributes({ text: { ...text, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") })), icon.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))), text.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text", onClick: ev => { setPreview(!preview); } }, customText), !preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, textEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: customText, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...text.options, text: content }; setAttributes({ text: { ...text, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") })), icon.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), text.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeLink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "text", onClick: handleLinkClick }, linkAttrItemsText, { target: text.options.linkTarget, href: postUrl }), icon.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text", onClick: ev => { setPreview(!preview); } }, customText), !preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, textEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: text.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...text.options, text: content }; setAttributes({ text: { ...text, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "bg-gray-900 cursor-pointer text-white mx-3 py-1 px-2 inline-block", onClick: ev => { setPreview(!preview); } }, "End Edit")), icon.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "afterLink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), text.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text", onClick: ev => { setPreview(!preview); } }, customText), !preview && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, textEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: customText, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...text.options, text: content }; setAttributes({ text: { ...text, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") })), icon.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/image-gallery-item/index.js": /*!************************************************!*\ !*** ./src/blocks/image-gallery-item/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./block.json */ "./src/blocks/image-gallery-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_17__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "161", height: "160", viewBox: "0 0 161 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M76.1669 11H1V148.964H76.1669V11Z", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 70.104V16C161 13.2386 158.761 11 156 11L90.8331 11C88.0717 11 85.8331 13.2386 85.8331 16V70.104C85.8331 72.8655 88.0717 75.104 90.8332 75.104H156C158.761 75.104 161 72.8655 161 70.104Z", fill: "url(#paint0_linear_61_846)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M128.779 26.4624L115.292 45.7442L109.999 38.1051L94.9473 59.6419H151.932L128.779 26.4624Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 143.964V89.8599C161 87.0984 158.761 84.8599 156 84.8599H90.8332C88.0717 84.8599 85.8332 87.0984 85.8332 89.8599V143.964C85.8332 146.725 88.0717 148.964 90.8332 148.964H156C158.761 148.964 161 146.725 161 143.964Z", fill: "url(#paint1_linear_61_846)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M128.779 100.322L115.292 119.604L109.999 111.965L94.9473 133.548H151.932L128.779 100.322Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M44.6824 60.8843L29.2163 83.0653L23.0944 74.2757L5.78711 99.1258H71.3337L44.6824 60.8843Z", fill: "url(#paint2_linear_61_846)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_846", x1: "123.417", y1: "11", x2: "123.417", y2: "75.104", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_846", x1: "123.417", y1: "84.8599", x2: "123.417", y2: "148.964", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_846", x1: "5.78711", y1: "80.005", x2: "71.3337", y2: "80.005", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { // var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); //blockCssY.items = []; //blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'flex-grow': { "Desktop": "1" } }; //blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'flex-basis': { "Desktop": "0" } }; //setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); // useEffect(() => { // var blockCssObj = {}; // blockCssObj[wrapperSelector] = wrapper; // var blockCssRules = myStore.getBlockCssRules(blockCssObj); // var items = blockCssRules; // setAttributes({ blockCssY: { items: items } }); // }, [blockId]); function generateElementSudoCss(obj) { var stylesObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options") { var selector = myStore.getElementSelector(sudoSrc, wrapperSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); } }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var elementCss = generateElementSudoCss(wrapper); }, [wrapper]); function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [["post-grid/image", { wrapper: { options: { tag: "div", class: "", useAsBackground: "no" }, styles: { width: { Desktop: "100%" }, height: { Desktop: "100%" }, overflow: { Desktop: "hidden" } } }, image: { options: { imgSrcType: "media", imgSrcMetaKey: "", imgSrcMetaKeyType: "ID", imgSrcImgId: "", srcUrl: "", srcId: "", linkTo: "", linkToMetaKey: "", linkTocustomUrl: "", altTextSrc: "imgAltText", altTextCustom: "", altTextMetaKey: "", titleTextSrc: "imgTitle", titleTextCustom: "", titleTextMetaKey: "", linkTarget: "_blank", linkAttr: [], class: "", size: { Desktop: "full", Tablet: "full", Mobile: "full" } }, styles: { maxWidth: { Desktop: "100%" }, height: { Desktop: "auto" }, display: { Desktop: "block" } } }, lightbox: { options: { enable: false, class: "" }, styles: {} } }]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} border border-dashed` }); //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_19__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", innerBlocksProps, innerBlocksProps.children)); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/image-gallery/index.js": /*!*******************************************!*\ !*** ./src/blocks/image-gallery/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./variations */ "./src/blocks/image-gallery/variations.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/image-gallery/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M70.1668 11H5C2.23858 11 0 13.2386 0 16V143.964C0 146.725 2.23858 148.964 5.00001 148.964H70.1669C72.9283 148.964 75.1669 146.725 75.1669 143.964V16C75.1669 13.2386 72.9283 11 70.1668 11Z", fill: "url(#paint0_linear_61_834)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M43.6824 60.8843L28.2163 83.0653L22.0944 74.2757L4.78711 99.1258H70.3337L43.6824 60.8843Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 70.104V16C160 13.2386 157.761 11 155 11L89.8331 11C87.0717 11 84.8331 13.2386 84.8331 16V70.104C84.8331 72.8655 87.0717 75.104 89.8332 75.104H155C157.761 75.104 160 72.8655 160 70.104Z", fill: "url(#paint1_linear_61_834)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M127.779 26.4624L114.292 45.7442L108.999 38.1051L93.9473 59.6419H150.932L127.779 26.4624Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 143.964V89.8599C160 87.0984 157.761 84.8599 155 84.8599H89.8332C87.0717 84.8599 84.8332 87.0984 84.8332 89.8599V143.964C84.8332 146.725 87.0717 148.964 89.8332 148.964H155C157.761 148.964 160 146.725 160 143.964Z", fill: "url(#paint2_linear_61_834)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M127.779 100.322L114.292 119.604L108.999 111.965L93.9473 133.548H150.932L127.779 100.322Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_834", x1: "0", y1: "79.982", x2: "75.1669", y2: "79.982", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_834", x1: "122.417", y1: "11", x2: "122.417", y2: "75.104", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_834", x1: "122.417", y1: "84.8599", x2: "122.417", y2: "148.964", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var lightbox = attributes.lightbox; var item = attributes.item; const lightboxEnable = lightbox.options.enable == undefined ? true : lightbox.options.enable; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var itemSelector = blockClass + " .pg-image-gallery-item"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var lightboxX = attributes.lightbox; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (lightboxX != undefined) { var lightboxY = { ...lightboxX, options: lightbox.options }; setAttributes({ lightbox: lightboxY }); blockCssObj[lightboxSelector] = lightboxY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function applyFlex(attr, newVal) { onChangeStyleWrapper("styles", newVal, attr); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, item); obj[sudoScource] = cssObj; setAttributes({ item: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } const ALLOWED_BLOCKS = ["post-grid/image-gallery-item"]; const MY_TEMPLATE = [["post-grid/image-gallery-item", {}], ["post-grid/image-gallery-item", {}], ["post-grid/image-gallery-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); const addChild = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/image-gallery-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); //setActiveTab(slide.clientId); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addChild(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Lightbox", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable?", help: lightboxEnable ? "Lightbox Enabled" : "Lightbox Disabled.", checked: lightboxEnable ? true : false, onChange: e => { var options = { ...lightbox.options, enable: lightboxEnable ? false : true }; setAttributes({ lightbox: { ...lightbox, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "image-gallery", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "image-gallery" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { var wrapperX = { ...wrapper, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }; setAttributes({ wrapper: wrapperX }); var elementCss = myStore.generateElementCss(wrapperX, wrapperSelector); var itemsX = { ...blockCssY.items, ...elementCss }; setAttributes({ blockCssY: { items: itemsX } }); myStore.generateBlockCss(blockCssY.items, blockId); replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_25__["default"], { blockName: "image-gallery", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/image-gallery/variations.js": /*!************************************************!*\ !*** ./src/blocks/image-gallery/variations.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "layout-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-1"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr " }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "76.67", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "76.67", height: "23.34" })) }, { name: "layout-2", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-2"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-2"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gridTemplateRows: { Desktop: "400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "83.33 13.33 83.33 43.33 83.33 66.67 118.33 66.67 118.33 43.33 118.33 13.33 83.33 13.33" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "41.67 13.33 41.67 43.33 41.67 66.67 76.67 66.67 76.67 43.33 76.67 13.33 41.67 13.33" })) }, { name: "layout-3", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-3"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-3"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34", transform: "translate(201.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "76.67", height: "23.34", transform: "translate(160 49.99) rotate(180)" })) }, { name: "layout-4", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-4"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-4"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "76.67", height: "23.34" })) }, { name: "layout-5", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-5"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-5"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "41.67 13.33 41.67 43.33 41.67 66.67 76.67 66.67 76.67 43.33 76.67 13.33 41.67 13.33" })) }, { name: "layout-6", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-6"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-6"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr " }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "2" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34", transform: "translate(118.33 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "118.33 66.67 118.33 36.67 118.33 13.33 83.33 13.33 83.33 36.67 83.33 66.67 118.33 66.67" })) }, { name: "layout-7", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-7"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-7"), isPro: false, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34" })) }, { name: "layout-8", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-8"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-8"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "20.83 13.33 20.83 43.33 20.83 66.67 55.83 66.67 55.83 43.33 55.83 13.33 20.83 13.33" })) }, { name: "layout-9", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-9"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-9"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "2" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "53.35", transform: "translate(160 80) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-10", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-10"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-10"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "23.84", y: "43.33", width: "35", height: "23.34", transform: "translate(82.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "65.5", y: "43.33", width: "35", height: "23.34", transform: "translate(166.01 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "23.84", y: "13.33", width: "35", height: "23.34", transform: "translate(82.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "65.5", y: "13.33", width: "35", height: "23.34", transform: "translate(166.01 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "142.17 66.67 142.17 36.67 142.17 13.33 107.17 13.33 107.17 36.67 107.17 66.67 142.17 66.67" })) }, { name: "layout-11", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-11"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-11"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "35", height: "23.34", transform: "translate(160 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "76.67", height: "23.34", transform: "translate(118.33 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-12", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-12"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-12"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "2" }, gridColumnEnd: { Desktop: "4" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "35", height: "23.34", transform: "translate(160 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "76.67", height: "23.34", transform: "translate(201.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" })) }, { name: "layout-13", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-13"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-13"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "76.67", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "23.34", transform: "translate(160 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "43.33", width: "35", height: "23.34", transform: "translate(243.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-14", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-14"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-14"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "2" }, gridColumnEnd: { Desktop: "4" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "43.33", width: "35", height: "23.34", transform: "translate(76.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "43.33", width: "76.67", height: "23.34", transform: "translate(201.67 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "20.83", y: "13.33", width: "35", height: "23.34", transform: "translate(76.67 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "62.5", y: "13.33", width: "35", height: "23.34", transform: "translate(160 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "104.17", y: "13.33", width: "35", height: "23.34", transform: "translate(243.33 49.99) rotate(180)" })) }, { name: "layout-15", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 15"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 15"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "5" } } } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "76.67", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "76.67", height: "23.34" })) }, { name: "layout-16", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 16"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 16"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "76.67", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "76.67", height: "23.34" })), innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "5" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"] }, { name: "layout-17", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 17"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 17"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "13.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "0 13.33 0 43.33 0 66.67 35 66.67 35 43.33 35 13.33 0 13.33" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "125", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "83.33", y: "43.33", width: "35", height: "23.34" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "41.67 13.33 41.67 43.33 41.67 66.67 76.67 66.67 76.67 43.33 76.67 13.33 41.67 13.33" })), innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "2" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "2" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"] }, { name: "layout-18", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 18"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("Layout 18"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "35", height: "23.34", transform: "translate(35 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "160 66.67 160 36.67 160 13.33 125 13.33 125 36.67 125 66.67 160 66.67" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "35", height: "23.34", transform: "translate(35 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "13.33", width: "35", height: "23.34", transform: "translate(118.33 49.99) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "118.33 66.67 118.33 36.67 118.33 13.33 83.33 13.33 83.33 36.67 83.33 66.67 118.33 66.67" })), innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "4" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "4" }, gridColumnEnd: { Desktop: "5" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"] }, { name: "layout-19", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-19"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-19"), isPro: !isProFeature ? false : true, wrapObj: { options: { tag: "div", class: "pg-image-gallery" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr 1fr" }, gridTemplateRows: { Desktop: "400px 400px " }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, innerBlocks: [["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridColumnStart: { Desktop: "1" }, gridColumnEnd: { Desktop: "3" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "3" }, gridColumnEnd: { Desktop: "4" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: { gridRowStart: { Desktop: "1" }, gridRowEnd: { Desktop: "3" }, gridColumnStart: { Desktop: "4" }, gridColumnEnd: { Desktop: "5" } } } }], ["post-grid/image-gallery-item", { wrapper: { options: { tag: "div", class: "pg-image-gallery-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 160 80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "43.33", width: "35", height: "23.34", transform: "translate(35 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "41.67", y: "43.33", width: "35", height: "23.34", transform: "translate(118.33 110.01) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "160 66.67 160 36.67 160 13.33 125 13.33 125 36.67 125 66.67 160 66.67" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "118.33 66.67 118.33 36.67 118.33 13.33 83.33 13.33 83.33 36.67 83.33 66.67 118.33 66.67" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "13.33", width: "76.67", height: "23.34" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/image/index.js": /*!***********************************!*\ !*** ./src/blocks/image/index.js ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./placeholder.jpg */ "./src/blocks/image/placeholder.jpg"); /* harmony import */ var _lazyPlaceholder_gif__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./lazyPlaceholder.gif */ "./src/blocks/image/lazyPlaceholder.gif"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/image/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; __webpack_require__(/*! fslightbox */ "./node_modules/fslightbox/index.js"); var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M21.96 5.99976H137.04C139.78 5.99976 142 8.2205 142 10.9587V126.027C142 128.765 139.78 130.986 137.04 130.986H21.96C19.2201 130.986 17 128.765 17 126.027V10.9587C17 8.2205 19.2201 5.99976 21.96 5.99976Z", stroke: "url(#paint0_linear_61_233)", "stroke-width": "12" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M146 144.657H13C11.8954 144.657 11 145.553 11 146.657V158C11 159.104 11.8954 160 13 160H146C147.105 160 148 159.104 148 158V146.657C148 145.553 147.105 144.657 146 144.657Z", fill: "url(#paint1_linear_61_233)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M88.454 44.9314L65.7519 81.3817L56.7072 66.9683L32.9199 105.205H50.9187H80.5855H126.08L88.454 44.9314Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_233", x1: "8.26", y1: "67.945", x2: "148", y2: "67.945", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_233", x1: "11", y1: "152.328", x2: "148", y2: "152.328", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/image"], transform: attributes => { console.log(attributes); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/image", { wrapper: { options: { tag: "div", class: "pg-image", useAsBackground: "no" }, styles: { width: { Desktop: "100%" }, overflow: { Desktop: "hidden" } } }, image: { options: { imgSrcType: attributes.id == undefined ? "customUrl" : "media", imgSrcMetaKey: "", imgSrcMetaKeyType: "", imgSrcImgId: attributes.id == undefined ? "" : attributes.id, srcUrl: attributes?.url, lazy: false, lazySrc: "", lazySrcId: "", lazySrcType: "media", srcId: "", linkTo: attributes.href == undefined ? "" : "customUrl", linkToMetaKey: "", linkTocustomUrl: attributes?.href, altTextSrc: "imgAltText", altTextCustom: attributes?.alt, altTextMetaKey: "", titleTextSrc: "imgCaption", titleTextCustom: attributes?.caption, titleTextMetaKey: "", linkTarget: "_blank", linkAttr: [], class: "", size: { Desktop: "full", Tablet: "full", Mobile: "full" }, styles: { display: { Desktop: "block" }, maxWidth: { Desktop: "100%" }, height: { Desktop: "auto" } } } }, lightbox: { options: { enable: attributes.lightbox == undefined ? "false" : attributes.lightbox.enabled } } }); } }], to: [{ type: "block", blocks: ["core/image"], transform: attributes => { var image = attributes.image.options; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/image", { alt: image.altTextCustom, caption: image.titleTextCustom, id: image.imgSrcType == "media" ? image.srcId : null, lightbox: { enabled: attributes.lightbox.options.enable }, href: image.linkTo == "customUrl" ? image.linkTocustomUrl : null, url: image.srcUrl }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var galleryId = context["post-grid/galleryId"] == undefined ? null : context["post-grid/galleryId"]; var galleryLightbox = context["post-grid/lightbox"] == undefined ? null : context["post-grid/lightbox"]; let image = attributes.image; var wrapper = attributes.wrapper; var lightbox = attributes.lightbox; const lightboxEnable = lightbox.options.enable == undefined ? true : lightbox.options.enable; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var blockCssY = attributes.blockCssY; var utmTracking = attributes.utmTracking; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("isProFeature", true); var postId = context["postId"]; var postType = context["postType"]; const wrapperSelector = blockClass; var linkSelector = ""; var imgSelector = ""; var breakPointX = myStore.getBreakPoint(); const [loading, setLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerSrcUrl, setlinkPickerSrcUrl] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerLazySrcUrl, setlinkPickerLazySrcUrl] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [postImage, setPostImage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [postLazyImage, setPostLazyImage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [imageSizes, setImageSizes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); let filterArgsBasic = [{ label: "Blur", isPro: false, value: "blur", val: "", unit: "px" }, { label: "Brightness", isPro: false, value: "brightness", val: "10", unit: "%" }, { label: "Contrast", isPro: true, value: "contrast", val: "10", unit: "%" }, { label: "Grayscale", isPro: true, value: "grayscale", val: "10", unit: "%" }, { label: "Hue-rotate", isPro: true, value: "hue-rotate", val: "10", unit: "deg" }, { label: "Invert", isPro: true, value: "invert", val: "10", unit: "%" }, { label: "Opacity", isPro: true, value: "opacity", val: "10", unit: "%" }, { label: "Saturate", isPro: true, value: "saturate", val: "10", unit: "%" }, { label: "Sepia", value: "sepia", val: "10", unit: "%" }]; let filterArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("imageFilterArgs", filterArgsBasic); var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("linkToArgs", linkToArgsBasic); var customTagArgsBasic = { "": { label: "Choose", value: "" }, h1: { label: "H1", value: "h1" }, h2: { label: "H2", value: "h2" }, h3: { label: "H3", value: "h3" }, h4: { label: "H4", value: "h4" }, h5: { label: "H5", value: "h5" }, h6: { label: "H6", value: "h6" }, span: { label: "SPAN", value: "span" }, div: { label: "DIV", value: "div" }, p: { label: "P", value: "p" } }; let customTagArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("customTagArgs", customTagArgsBasic); var altTextSrcArgsBasic = { none: { label: "No Alt Text", value: "" }, imgAltText: { label: "Image Alt Text", value: "imgAltText" }, imgTitle: { label: "Image Title", value: "imgTitle" }, imgCaption: { label: "Image Caption", value: "imgCaption" }, imgDescription: { label: "Image Description", value: "imgDescription" }, imgSlug: { label: "Image Slug", value: "imgSlug" }, postTitle: { label: "Post Title", value: "postTitle" }, postSlug: { label: "Post Slug", value: "postSlug" }, excerpt: { label: "Post Excerpt", value: "excerpt", isPro: true }, customField: { label: "Post Custom Field", value: "customField", isPro: true }, custom: { label: "Custom", value: "custom", isPro: true } }; let altTextSrcArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("altTextSrcArgs", altTextSrcArgsBasic); const ALLOWED_MEDIA_TYPES = ["image"]; const [currentPostImageId, setCurrentPostImageId] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(image.options.srcId); const [currentPostLazyImageId, setCurrentPostLazyImageId] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(image.options.lazySrcId); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (currentPostImageId.length != 0 && image.options.imgSrcType == "media") { setLoading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11___default()({ path: "/wp/v2/media/" + currentPostImageId, method: "POST", data: { id: currentPostImageId } }).then(res => { setPostImage(res); var options = { ...image.options, srcUrl: res.source_url, srcId: res.id }; setAttributes({ image: { ...image, options: options } }); setLoading(false); var imgSizes = []; Object.keys(res.media_details.sizes).map(x => { var height = res.media_details.sizes[x].height; var width = res.media_details.sizes[x].width; //var crop = res[x].crop var label = x.replaceAll("_", " "); imgSizes[x] = { label: label + "(" + width + "*" + height + ")", value: x, height: height, width: width }; }); setImageSizes(imgSizes); }); // apiFetch({ // path: '/post-grid/v2/get_image_sizes', // method: 'POST', // data: {}, // }).then((res) => { // var imgSizes = []; // Object.keys(res).map(x => { // var height = res[x].height // var width = res[x].width // var crop = res[x].crop // imgSizes.push({ label: x + "(" + width + "*" + height + ")", value: x, height: height, width: width, crop: crop }); // }) // setImageSizes(imgSizes) // }); } }, [currentPostImageId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (image.options.imgSrcMetaKey.length != 0) { setLoading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11___default()({ path: "/post-grid/v2/get_post_meta", method: "POST", data: { postId: postId, meta_key: image.options.imgSrcMetaKey, type: "string", template: "" } }).then(res => { var metaKeyType = image.options.imgSrcMetaKeyType != undefined ? image.options.imgSrcMetaKeyType : "ID"; if (metaKeyType == "ID") { setCurrentPostImageId(res.meta_value); } else { //setPostImage(res) setPostImage({ media_details: { sizes: {} }, guid: { rendered: res.meta_value } }); } setLoading(false); }); } }, [image.options.imgSrcMetaKey, image.options.imgSrcMetaKeyType, image.options.imgSrcType]); // useEffect(() => { // var blockCssObj = {}; // blockCssObj[wrapperSelector] = wrapper; // blockCssObj[imgSelector] = image; // //setAttributes({ wrapper: wrapper, image: image, }); // var blockCssRules = myStore.getBlockCssRules(blockCssObj); // var items = blockCssRules; // setAttributes({ blockCssY: { items: items } }); // }, [wrapper]); function setFeaturedImageSize(option, index) { var newValuesObj = {}; if (Object.keys(image.options.size).length == 0) { newValuesObj[breakPointX] = option.value; } else { newValuesObj = image.options.size; newValuesObj[breakPointX] = option.value; } var options = { ...image.options, size: newValuesObj }; setAttributes({ image: { ...image, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {}, [image]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ image: image }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); //blockCssY.items[imgSelector] = { ...blockCssY.items[imgSelector], 'width': { "Desktop": "100%" } }; //blockCssY.items[imgSelector] = { ...blockCssY.items[imgSelector], 'height': { "Desktop": "auto" } }; //setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[imgSelector] = image; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { let imageX = attributes.image; var wrapperX = attributes.wrapper; var lightboxX = attributes.lightbox; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (lightboxX != undefined) { var lightboxY = { ...lightboxX, options: lightbox.options }; setAttributes({ lightbox: lightboxY }); blockCssObj[lightboxSelector] = lightboxY; } if (imageX != undefined) { var imageY = { ...imageX, options: image.options }; setAttributes({ image: imageY }); blockCssObj[imageSelector] = imageY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } // Wrapper CSS Class Selectors if (wrapper.options.tag.length != 0) { var imgSelector = blockClass + " img"; if (image.options.linkTo.length > 0) { linkSelector = blockClass + " a"; } else { linkSelector = blockClass; } } else { linkSelector = blockClass; var imgSelector = "img" + blockClass; } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function handleLinkClickX(ev, src) { if (lightbox.options.enable == true) { var lightboxHandle = new FsLightbox(); lightboxHandle.props.sources = [src]; lightboxHandle.open(); } ev.stopPropagation(); ev.preventDefault(); return false; } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryImage(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; image[sudoScource] = sudoScourceArgs; }); var imageX = Object.assign({}, image); setAttributes({ image: imageX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleImage(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, image); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ image: object }); var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleImage(sudoScource, key) { var object = myStore.deletePropertyDeep(image, [sudoScource, key, breakPointX]); setAttributes({ image: object }); var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleImage(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, image); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ image: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddImage(sudoScource, cssObj) { let obj = Object.assign({}, image); obj[sudoScource] = cssObj; setAttributes({ image: obj }); var selector = myStore.getElementSelector(sudoScource, imgSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetImage(sudoScources) { let obj = Object.assign({}, image); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ image: obj }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [image]); var linkAttrObj = () => { var sdsd = {}; image.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = image.options.linkTocustomUrl != undefined && image.options.linkTocustomUrl.length > 0 ? image.options.linkTocustomUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3 pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Image Sources"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: image.options.imgSrcType, options: [{ label: "Media", value: "media" }, { label: "Custom Field", value: "customField" }, { label: "Image Source URL", value: "customUrl" } // { label: 'Image ID', value: 'imgId' }, ], onChange: newVal => { var options = { ...image.options, imgSrcType: newVal }; setAttributes({ image: { ...image, options: options } }); } })), image.options.srcUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id setCurrentPostImageId(media.id); var options = { ...image.options, srcUrl: media.url, srcId: media.id }; setAttributes({ image: { ...image, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: image.options.srcId, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: image.options.srcUrl, alt: "", className: "cursor-pointer", onClick: open }) })), image.options.srcUrl.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id setCurrentPostImageId(media.id); var options = { ...image.options, srcUrl: media.url, srcId: media.id }; setAttributes({ image: { ...image, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: image.options.srcId, render: ({ open }) => // <Button // className="my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full" // onClick={open}> // Open Media Library // </Button> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__, alt: "", className: "cursor-pointer", onClick: open }) })), image.options.imgSrcType == "media" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mt-5", for: "" }, "Choose Image"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id setCurrentPostImageId(media.id); var options = { ...image.options, srcUrl: media.url, srcId: media.id }; setAttributes({ image: { ...image, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: image.options.srcId, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full hover:text-white ", onClick: open }, "Open Media Library") }))), image.options.imgSrcType == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.imgSrcMetaKey, onChange: newVal => { var options = { ...image.options, imgSrcMetaKey: newVal }; setAttributes({ image: { ...image, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Metakey Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: image.options.imgSrcMetaKeyType, options: [{ label: "ID", value: "ID" }, { label: "URL", value: "URL" }], onChange: newVal => { var options = { ...image.options, imgSrcMetaKeyType: newVal }; setAttributes({ image: { ...image, options: options } }); } }))), image.options.imgSrcType == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Image URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerSrcUrl ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], onClick: ev => { setlinkPickerSrcUrl(prev => !prev); } }), image.options.srcUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { var options = { ...image.options, srcUrl: "" }; setAttributes({ image: { ...image, options: options } }); setlinkPickerSrcUrl(false); } }), linkPickerSrcUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: image.options.srcUrl, onChange: newVal => { var options = { ...image.options, srcUrl: newVal.url }; setAttributes({ image: { ...image, options: options } }); setPostImage({ ...postImage, srcUrl: newVal.url, media_details: { sizes: {} }, guid: { rendered: newVal.url } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Image Source URL:"), " ", image.options.srcUrl.length != 0 ? image.options.srcUrl : "No link", " "))))), image.options.imgSrcType == "imgId" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Image ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.imgSrcImgId, onChange: newVal => { var options = { ...image.options, imgSrcImgId: newVal }; setAttributes({ image: { ...image, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } })), wrapper.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Image as Background"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.useAsBackground, options: [{ label: "No", value: "no" }, { label: "Yes", value: "yes" }], onChange: newVal => { var options = { ...wrapper.options, useAsBackground: newVal }; var styles = { ...wrapper.styles, backgroundImage: {} }; if (newVal == "no") { setAttributes({ wrapper: { ...wrapper, options: options, styles: styles } }); var itemsX = { ...blockCssY.items }; itemsX[wrapperSelector] = { ...blockCssY.items[wrapperSelector], "background-image": {} }; setAttributes({ blockCssY: { items: itemsX } }); } if (newVal == "yes") { var newValuesObj = {}; if (wrapper.styles.backgroundImage == undefined || Object.keys(wrapper.styles.backgroundImage).length == 0) { newValuesObj[breakPointX] = 'url("' + postImage.guid.rendered + '")'; } else { newValuesObj = wrapper.styles.backgroundImage; newValuesObj[breakPointX] = 'url("' + postImage.guid.rendered + '")'; } var styles = { ...wrapper.styles, backgroundImage: newValuesObj }; setAttributes({ wrapper: { ...wrapper, styles: styles, options: options } }); var itemsX = { ...blockCssY.items }; itemsX[wrapperSelector] = { ...blockCssY.items[wrapperSelector], "background-image": newValuesObj }; setAttributes({ blockCssY: { items: itemsX } }); } } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Image", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (image.options.imgSrcType == "media" || image.options.imgSrcType == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 block pb-2 " }, "Thumbnail Size"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right" // btnClass="w-full block text-center " , btnClass: "flex w-full gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // variant="secondary" , options: imageSizes // buttonTitle="Choose" , buttonTitle: image.options.size == undefined ? "Choose" : imageSizes[image.options.size[breakPointX]] == undefined ? "Choose" : imageSizes[image.options.size[breakPointX]].label, onChange: setFeaturedImageSize, values: image.options.size[breakPointX] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: linkToArgs[image.options.linkTo] == undefined || image.options.linkTo.length == 0 ? "Choose" : linkToArgs[image.options.linkTo].label, options: linkToArgs, onChange: (option, index) => { var options = { ...image.options, linkTo: option.value }; setAttributes({ image: { ...image, options: options } }); }, values: "" })), image.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.linkToMetaKey, onChange: newVal => { var options = { ...image.options, linkToMetaKey: newVal }; setAttributes({ image: { ...image, options: options } }); } })), image.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), image.options.linkTocustomUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { var options = { ...image.options, linkTocustomUrl: "" }; setAttributes({ image: { ...image, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: image.options.linkTocustomUrl, onChange: newVal => { var options = { ...image.options, linkTocustomUrl: newVal.url }; setAttributes({ image: { ...image, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", image.options.linkTocustomUrl.length != 0 ? image.options.linkTocustomUrl : "No link", " ")))), image.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: image.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...image.options, linkTarget: newVal }; setAttributes({ image: { ...image, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Alt Text Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: image.options.altTextSrc.length == 0 ? "Choose" : altTextSrcArgs[image.options.altTextSrc].label, options: altTextSrcArgs, onChange: (option, index) => { var options = { ...image.options, altTextSrc: option.value }; setAttributes({ image: { ...image, options: options } }); }, values: "" })), image.options.altTextSrc == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Custom Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: [{ label: "Custom", value: "" }, { label: "Yoast meta", value: "_yoast_wpseo_metadesc" }, { label: "Rank Math meta", value: "rank_math_description" }, { label: "AIO SEO meta", value: "_aioseo_og_description" }, { label: "SEOPress meta", value: "_seopress_titles_desc" }, { label: "WP Meta SEO meta", value: "_metaseo_metadesc" }, { label: "The SEO Framework meta", value: "_genesis_description" }, { label: "SEO SIMPLE PACK meta", value: "ssp_meta_description" }], onChange: (option, index) => { var options = { ...image.options, altTextMetaKey: option.value }; setAttributes({ image: { ...image, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.altTextMetaKey, onChange: newVal => { var options = { ...image.options, altTextMetaKey: newVal }; setAttributes({ image: { ...image, options: options } }); } }))), image.options.altTextSrc == "custom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Alt Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.altTextCustom, onChange: newVal => { var options = { ...image.options, altTextCustom: newVal }; setAttributes({ image: { ...image, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Title Text Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: image.options.titleTextSrc == undefined || image.options.titleTextSrc.length == 0 ? "Choose" : altTextSrcArgs[image.options.titleTextSrc].label, options: altTextSrcArgs, onChange: (option, index) => { var options = { ...image.options, titleTextSrc: option.value }; setAttributes({ image: { ...image, options: options } }); }, values: "" })), image.options.titleTextSrc == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Custom Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: [{ label: "Custom", value: "" }, { label: "Yoast meta", value: "_yoast_wpseo_metadesc" }, { label: "Rank Math meta", value: "rank_math_description" }, { label: "AIO SEO meta", value: "_aioseo_og_description" }, { label: "SEOPress meta", value: "_seopress_titles_desc" }, { label: "WP Meta SEO meta", value: "_metaseo_metadesc" }, { label: "The SEO Framework meta", value: "_genesis_description" }, { label: "SEO SIMPLE PACK meta", value: "ssp_meta_description" }], onChange: (option, index) => { var options = { ...image.options, titleTextMetaKey: option.value }; setAttributes({ image: { ...image, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.titleTextMetaKey, onChange: newVal => { var options = { ...image.options, titleTextMetaKey: newVal }; setAttributes({ image: { ...image, options: options } }); } }))), image.options.titleTextSrc == "custom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Title Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: image.options.titleTextCustom, onChange: newVal => { var options = { ...image.options, titleTextCustom: newVal }; setAttributes({ image: { ...image, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = image.options.linkAttr.concat({ id: "", val: "" }); var options = { ...image.options, linkAttr: sdsd }; setAttributes({ image: { ...image, options: options } }); linkAttrObj(); } }, "Add")), image.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: image.options.linkAttr[i].id, onChange: newVal => { image.options.linkAttr[i].id = newVal; var ssdsd = image.options.linkAttr.concat([]); var options = { ...image.options, linkAttr: ssdsd }; setAttributes({ image: { ...image, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { image.options.linkAttr[i].val = newVal; var ssdsd = image.options.linkAttr.concat([]); var options = { ...image.options, linkAttr: ssdsd }; setAttributes({ image: { ...image, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { image.options.linkAttr.splice(i, 1); var ssdsd = image.options.linkAttr.concat([]); var options = { ...image.options, linkAttr: ssdsd }; setAttributes({ image: { ...image, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: image, onChange: onChangeStyleImage, onAdd: onAddStyleImage, onRemove: onRemoveStyleImage, onBulkAdd: onBulkAddImage, onReset: onResetImage })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_21__["default"], { blockId: blockId, obj: image, onChange: onPickCssLibraryImage })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: galleryId != null ? "hidden" : "" // title="Lightbox" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Lightbox"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Enable?", help: lightboxEnable ? "Lightbox Enabled" : "Lightbox Disabled.", checked: lightboxEnable ? true : false, onChange: e => { var options = { ...lightbox.options, enable: lightboxEnable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ lightbox: { ...lightbox, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Lazy Load", initialOpen: false // className={galleryId != null ? "hidden" : ""} }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Lazy Load Enable?", help: image.options.lazy ? "Lazy Load Enabled" : "Lazy Load Disabled.", checked: image.options.lazy ? true : false, onChange: e => { var options = { ...image.options, lazy: image.options.lazy ? false : true }; setAttributes({ image: { ...image, options: options } }); } })), image.options.lazy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pt-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Placeholder Image"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: image.options.lazySrcType, options: [{ label: "Media", value: "media" }, // { label: "Custom Field", value: "customField" }, { label: "Image Source URL", value: "customUrl" } // { label: 'Image ID', value: 'imgId' }, ], onChange: newVal => { var options = { ...image.options, lazySrcType: newVal }; setAttributes({ image: { ...image, options: options } }); } })), image.options.lazySrc.length !== undefined && image.options.lazySrc.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id setCurrentPostLazyImageId(media.id); var options = { ...image.options, lazySrc: media.url, lazySrcId: media.id }; setAttributes({ image: { ...image, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: image.options.srcId, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: image.options.lazySrc, alt: "", className: "cursor-pointer", onClick: open }) })), image.options.lazySrc.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id setCurrentPostLazyImageId(media.id); var options = { ...image.options, lazySrc: media.url, lazySrcId: media.id }; setAttributes({ image: { ...image, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: image.options.lazySrcId, render: ({ open }) => // <Button // className="my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full" // onClick={open}> // Open Media Library // </Button> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: _lazyPlaceholder_gif__WEBPACK_IMPORTED_MODULE_17__, alt: "", className: "cursor-pointer", onClick: open }) })), image.options.lazySrcType == "media" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mt-5", for: "" }, "Choose Image"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id setCurrentPostLazyImageId(media.id); var options = { ...image.options, lazySrc: media.url, lazySrcId: media.id }; setAttributes({ image: { ...image, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: image.options.lazySrcId, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full hover:text-white ", onClick: open }, "Open Media Library") }))), image.options.lazySrcType == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Image URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerLazySrcUrl ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], onClick: ev => { setlinkPickerLazySrcUrl(prev => !prev); } }), image.options.lazySrc.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { var options = { ...image.options, lazySrc: "" }; setAttributes({ image: { ...image, options: options } }); setlinkPickerLazySrcUrl(false); } }), linkPickerLazySrcUrl && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: image.options.lazySrc, onChange: newVal => { var options = { ...image.options, lazySrc: newVal.url }; setAttributes({ image: { ...image, options: options } }); setPostLazyImage({ ...postLazyImage, lazySrc: newVal.url, media_details: { sizes: {} }, guid: { rendered: newVal.url } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Image Source URL:"), " ", image.options.lazySrc.length != 0 ? image.options.lazySrc : "No link", " "))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "image", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockImage", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "image" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Spinner, null)), !loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (image.options.imgSrcType == "media" || image.options.imgSrcType == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postImage == null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__, alt: "" }))), postImage != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.useAsBackground == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps), wrapper.options.useAsBackground == "no" && (image.options.imgSrcType == "media" || image.options.imgSrcType == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, image.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: handleLinkClick }, blockProps, { href: postUrl, target: image.options.linkTarget }), postImage.media_details.sizes[image.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text })), postImage.media_details.sizes[image.options.size[breakPointX]] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage.media_details.sizes[image.options.size[breakPointX]].source_url, alt: postImage.alt_text }))), image.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postImage.media_details.sizes[image.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, linkAttrItems, { src: postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text })), postImage.media_details.sizes[image.options.size[breakPointX]] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, linkAttrItems, { src: postImage.media_details.sizes[image.options.size[breakPointX]].source_url, alt: postImage.alt_text })))), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, image.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { onClick: e => { handleLinkClickX(e, postImage.media_details.sizes[image.options.size[breakPointX]].source_url); }, href: postUrl, target: image.options.linkTarget }, postImage.media_details.sizes[image.options.size[breakPointX]] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage.media_details.sizes[image.options.size[breakPointX]].source_url, alt: postImage.alt_text })), postImage.media_details.sizes[image.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text }))), image.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (image.options.imgSrcType == "media" || image.options.imgSrcType == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postImage.media_details.sizes[image.options.size[breakPointX]] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { onClick: e => { handleLinkClickX(e, postImage.media_details.sizes[image.options.size[breakPointX]].source_url); }, src: postImage.media_details.sizes[image.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[image.options.size[breakPointX]].source_url : "", alt: postImage.alt_text })), postImage.media_details.sizes[image.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { onClick: e => { handleLinkClickX(e, postImage.media_details.sizes[image.options.size[breakPointX]].source_url); }, src: postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text }))))))), image.options.imgSrcType == "customUrl" && image.options.srcUrl.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__, alt: "" })), image.options.imgSrcType == "customUrl" && image.options.srcUrl.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, image.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: handleLinkClick }, blockProps, { href: postUrl, target: image.options.linkTarget }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: image.options.srcUrl, alt: image.options.altTextCustom }))), image.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, linkAttrItems, { src: image.options.srcUrl, alt: image.options.altTextCustom })))), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, image.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { onClick: e => { handleLinkClickX(e, image.options.srcUrl); }, href: postUrl, target: image.options.linkTarget }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: image.options.srcUrl, alt: image.options.altTextCustom }))), image.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: image.options.srcUrl, alt: image.options.altTextCustom })))))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/layer/index.js": /*!***********************************!*\ !*** ./src/blocks/layer/index.js ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./block.json */ "./src/blocks/layer/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_15__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M157.276 48.4749L82.6307 5.675C81.0383 4.775 78.9482 4.775 77.3557 5.675L2.71028 48.4749C0.122571 49.9749 -0.773174 53.175 0.719735 55.775C1.21737 56.675 1.91392 57.375 2.80966 57.875L77.4551 98.075C79.0476 98.875 80.9387 98.875 82.5311 98.075L157.177 57.875C159.764 56.475 160.759 53.275 159.366 50.675C158.868 49.775 158.172 48.9749 157.276 48.4749ZM80.0429 87.275L16.4451 53.075L80.0429 16.575L143.641 53.075L80.0429 87.275Z", fill: "url(#paint0_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M5.39746 115.675L77.5547 154.275C79.1472 155.075 81.0382 155.075 82.5311 154.275L154.688 115.675V103.575L80.0429 143.575L5.39746 103.575V115.675Z", fill: "url(#paint1_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.0375 93.0748L5.39754 85.9747L4.8999 73.6748L23.2128 83.8748L18.0375 93.0748Z", fill: "url(#paint2_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M34.2945 90.2918L29.2031 99.4614L51.2801 111.836L56.3715 102.667L34.2945 90.2918Z", fill: "url(#paint3_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M80.0428 127.875L62.2275 117.875L67.3033 108.675L80.0428 115.775L92.6827 108.675L97.7587 117.875L80.0428 127.875Z", fill: "url(#paint4_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M125.922 90.122L103.863 102.527L108.967 111.69L131.026 99.2843L125.922 90.122Z", fill: "url(#paint5_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.949 93.0751L136.873 83.875L154.688 73.875V85.975L141.949 93.0751Z", fill: "url(#paint6_linear_61_500)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_500", x1: "-0.00292969", y1: "51.8375", x2: "159.997", y2: "51.8375", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_500", x1: "5.39746", y1: "129.225", x2: "154.688", y2: "129.225", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_500", x1: "4.8999", y1: "83.3748", x2: "23.2128", y2: "83.3748", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_500", x1: "40.2416", y1: "105.649", x2: "45.3699", y2: "96.4999", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_500", x1: "62.2275", y1: "118.275", x2: "97.7587", y2: "118.275", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_500", x1: "106.415", y1: "107.108", x2: "128.524", y2: "94.7925", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_500", x1: "136.873", y1: "83.475", x2: "154.688", y2: "83.475", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [["core/paragraph", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} pg-layer` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { __experimentalDirectInsert: true, templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_18__["default"], { slug: "layer" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", innerBlocksProps, innerBlocksProps.children)); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/layers/index.js": /*!************************************!*\ !*** ./src/blocks/layers/index.js ***! \************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/layers/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M157.275 48.4749L82.63 5.675C81.0376 4.775 78.9477 4.775 77.3552 5.675L2.70979 48.4749C0.122083 49.9749 -0.773663 53.175 0.719246 55.775C1.21688 56.675 1.91343 57.375 2.80917 57.875L77.4546 98.075C79.0471 98.875 80.9382 98.875 82.5306 98.075L157.176 57.875C159.764 56.475 160.759 53.275 159.366 50.675C158.868 49.775 158.072 48.9749 157.275 48.4749ZM79.9428 87.275L16.345 53.075L79.9428 16.575L143.541 53.075L79.9428 87.275Z", fill: "url(#paint0_linear_61_513)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M82.5306 126.175L154.588 86.3748V74.1748L79.9428 115.375L5.29736 74.1748V86.3748L77.3553 126.175C79.0472 127.075 80.9382 127.075 82.5306 126.175Z", fill: "url(#paint1_linear_61_513)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M5.29736 115.675L77.4546 154.275C79.0471 155.075 80.9381 155.075 82.431 154.275L154.588 115.675V103.575L79.9428 143.575L5.29736 103.575V115.675Z", fill: "url(#paint2_linear_61_513)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_513", x1: "-0.00341797", y1: "51.8375", x2: "159.997", y2: "51.8375", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_513", x1: "5.29736", y1: "100.512", x2: "154.588", y2: "100.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_513", x1: "5.29736", y1: "129.225", x2: "154.588", y2: "129.225", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/quote"], transform: (attributes, innerBlocks) => { console.log(innerBlocks); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/layers", { wrapper: { options: { tag: "div", class: "pg-layers", id: "", linkTo: "postUrl", linkToAuthorMeta: "", linkToCustomMeta: "", linkTarget: "_blank", customUrl: "" } } }, innerBlocks); } }, { type: "block", blocks: ["post-grid/layer"], transform: (attributes, innerBlocks) => { console.log(innerBlocks); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/layers", { wrapper: { options: { tag: "div", class: "pg-layers", id: "", linkTo: "postUrl", linkToAuthorMeta: "", linkToCustomMeta: "", linkTarget: "_blank", customUrl: "" } } }, innerBlocks); } }], to: [{ type: "block", blocks: ["post-grid/grid-wrap"], transform: (attributes, innerBlocks) => { //var text = attributes.text console.log(innerBlocks); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/grid-wrap", { wrapper: { options: { tag: "div", class: "pg-grid-wrap" } } }, innerBlocks); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); const CustomTagWrapper = `${wrapper.options.tag}`; var postUrl = wrapper.options.customUrl != undefined && wrapper.options.customUrl.length > 0 ? wrapper.options.customUrl : currentPostUrl; var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("linkToArgs", linkToArgsBasic); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function setFieldLinkTo(option, index) { var options = { ...wrapper.options, linkTo: option.value }; setAttributes({ wrapper: { ...wrapper, options: options } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { __experimentalDirectInsert: true, templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Block ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: wrapper.options.id, onChange: newVal => { var options = { ...wrapper.options, id: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "a", value: "a" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), wrapper.options.tag == "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: wrapper.options.linkTo == undefined ? "Choose" : linkToArgs[wrapper.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), wrapper.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: wrapper.options.linkToAuthorMeta, onChange: newVal => { var options = { ...wrapper.options, linkToAuthorMeta: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), wrapper.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: wrapper.options.linkToAuthorMeta, onChange: newVal => { var options = { ...wrapper.options, linkToAuthorMeta: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), wrapper.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), wrapper.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], onClick: ev => { var options = { ...wrapper.options, customUrl: "" }; setAttributes({ wrapper: { ...wrapper, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: wrapper.options.customUrl, onChange: newVal => { var options = { ...wrapper.options, customUrl: newVal.url }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", wrapper.options.customUrl.length != 0 ? wrapper.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...wrapper.options, linkTarget: newVal }; setAttributes({ text: { ...text, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "layers", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "layers" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag == "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { onClick: handleLinkClick, href: postUrl, target: wrapper.options.linkTarget }), innerBlocksProps.children), wrapper.options.tag != "a" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagWrapper, innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/list-nested-item/index.js": /*!**********************************************!*\ !*** ./src/blocks/list-nested-item/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./block.json */ "./src/blocks/list-nested-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_16__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 15.7134H57.2178V24.2285H160V15.7134Z", fill: "url(#paint0_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M37.3753 6L15.5906 23.7577L6.24672 16.1839L0 21.2759L15.5906 33.9844L43.622 11.092L37.3753 6Z", fill: "url(#paint1_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M159.948 100.869H57.1655V109.384H159.948V100.869Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 141.215H57.2178V149.73H160V141.215Z", fill: "url(#paint2_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0 90.5991V119.611H35.5906V90.5991H0ZM8.29396 112.85V97.3599H27.4541V112.85H8.29396Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0 160H35.5906V130.946H0V160ZM27.5066 137.664V153.154H8.34646V137.664H27.5066Z", fill: "url(#paint3_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M147.559 46.5645H89.5015V51.3569H147.559V46.5645Z", fill: "url(#paint4_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M147.559 69.1577H89.5015V73.9502H147.559V69.1577Z", fill: "url(#paint5_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M57.2178 40.7451V57.3047H77.3228V40.7451H57.2178ZM61.8897 53.3253V44.4678H72.6508V53.2397L61.8897 53.3253Z", fill: "url(#paint6_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M57.1655 79.3884H77.2705V63H57.1655V79.3884ZM72.5986 66.8083V75.3662H62.0999V66.8083H72.5986Z", fill: "url(#paint7_linear_67_1115)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_67_1115", x1: "57.2178", y1: "19.9709", x2: "160", y2: "19.9709", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_67_1115", x1: "0", y1: "19.9922", x2: "43.6221", y2: "19.9922", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_67_1115", x1: "57.2178", y1: "145.473", x2: "160", y2: "145.473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_67_1115", x1: "0", y1: "145.473", x2: "35.5905", y2: "145.473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_67_1115", x1: "89.5015", y1: "48.9607", x2: "147.559", y2: "48.9607", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_67_1115", x1: "89.5015", y1: "71.5539", x2: "147.559", y2: "71.5539", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_67_1115", x1: "57.2178", y1: "49.0249", x2: "77.3228", y2: "49.0249", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_67_1115", x1: "57.1655", y1: "71.1942", x2: "77.2705", y2: "71.1942", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var icon = attributes.icon; var parentIcon = context["post-grid/icon"] == undefined ? [] : context["post-grid/icon"]; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; const iconSelector = blockClass + " .icon"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setAttributes({ icon: parentIcon }); }, [parentIcon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const MY_TEMPLATE = [["core/paragraph", { content: "Hello" }]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { __experimentalDirectInsert: true, templateInsertUpdatesSelection: true, template: MY_TEMPLATE //renderAppender: InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_18__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "Li", value: "li" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_10__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose...", value: "" }, // { label: "Left", value: "left" }, { label: "Before Text", value: "before" }, { label: "After Text", value: "after" } // { label: "Right", value: "right" }, ], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", innerBlocksProps, icon.options.position == "before" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), innerBlocksProps.children, icon.options.position == "after" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var icon = attributes.icon; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} ` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/list-nested/index.js": /*!*****************************************!*\ !*** ./src/blocks/list-nested/index.js ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./block.json */ "./src/blocks/list-nested/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_18__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 15.7134H57.2178V24.2285H160V15.7134Z", fill: "url(#paint0_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M37.3753 6L15.5906 23.7577L6.24672 16.1839L0 21.2759L15.5906 33.9844L43.6221 11.092L37.3753 6Z", fill: "url(#paint1_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 101.207H57.2178V109.722H160V101.207Z", fill: "url(#paint2_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 141.215H57.2178V149.73H160V141.215Z", fill: "url(#paint3_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0.0522461 90.9375V119.949H35.6428V90.9375H0.0522461ZM8.34621 113.188V97.6983H27.5063V113.188H8.34621Z", fill: "url(#paint4_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0 160H35.5905V130.946H0V160ZM27.5066 137.664V153.154H8.34646V137.664H27.5066Z", fill: "url(#paint5_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M147.559 46.5645H89.5015V51.3569H147.559V46.5645Z", fill: "url(#paint6_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M147.559 69.1577H89.5015V73.9502H147.559V69.1577Z", fill: "url(#paint7_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M57.2178 40.7451V57.3047H77.3228V40.7451H57.2178ZM61.8897 53.3253V44.4678H72.6508V53.2397L61.8897 53.3253Z", fill: "url(#paint8_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M57.2178 79.7268H77.3228V63.3384H57.2178V79.7268ZM72.6508 67.1467V75.7046H62.1522V67.1467H72.6508Z", fill: "url(#paint9_linear_61_755)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_755", x1: "57.2178", y1: "19.9709", x2: "160", y2: "19.9709", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_755", x1: "0", y1: "19.9922", x2: "43.6221", y2: "19.9922", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_755", x1: "57.2178", y1: "105.465", x2: "160", y2: "105.465", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_755", x1: "57.2178", y1: "145.473", x2: "160", y2: "145.473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_755", x1: "0.0522461", y1: "105.443", x2: "35.6428", y2: "105.443", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_755", x1: "0", y1: "145.473", x2: "35.5905", y2: "145.473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_755", x1: "89.5015", y1: "48.9607", x2: "147.559", y2: "48.9607", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_61_755", x1: "89.5015", y1: "71.5539", x2: "147.559", y2: "71.5539", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint8_linear_61_755", x1: "57.2178", y1: "49.0249", x2: "77.3228", y2: "49.0249", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint9_linear_61_755", x1: "57.2178", y1: "71.5326", x2: "77.3228", y2: "71.5326", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, deprecated: [{ attributes: { items: { type: "array", default: [{ text: "", icon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fas fa-chevron-right" }, styles: {} }] } } }], transforms: { from: [{ type: "block", blocks: ["core/list"], transform: (attributes, innerBlocks) => { var innerBlocksX = innerBlocks.map((item, index) => { var content = item.attributes.content; return { clientId: item.clientId + index, name: "post-grid/list-nested-item", isValid: true, originalContent: "", validationIssues: [], attributes: { wrapper: { options: { tag: "li", class: "pg-list-nested-item" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-chevron-right", class: "icon", position: "before" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "18px" }, margin: { Desktop: "0px 10px 0px 10px" } } }, blockId: "pg70d7453016a5", blockCssY: { items: { ".pg70d7453016a5 .icon": { color: { Desktop: "#000000" }, "font-size": { Desktop: "18px" }, margin: { Desktop: "0px 10px 0px 10px" } } } } }, innerBlocks: [{ clientId: item.clientId, name: "core/paragraph", isValid: true, originalContent: "<p>Hello</p>", validationIssues: [], attributes: { content: content, dropCap: false }, innerBlocks: [] }] }; }); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.createBlock)("post-grid/list-nested", {}, innerBlocksX); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var itemsX = attributes.itemsX; var wrapper = attributes.wrapper; var item = attributes.item; var items = attributes.items; var icon = attributes.icon; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [isOpen, setisOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var itemSelector = blockClass + " .pg-list-nested-item"; const iconSelector = blockClass + " .icon"; const CustomTagWrapper = `${wrapper.options.tag}`; const CustomTagItem = `${item.options.tag}`; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); if (items.length > 0) { if (itemsX.items.length == 0) { setAttributes({ itemsX: { ...itemsX, items: items } }); } } }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = item; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // for (var x in breakPoints) { // var itemX = breakPoints[x]; // breakPointList.push({ label: itemX.name, icon: itemX.icon, value: itemX.id }) // } const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var itemsX = attributes.items; var itemsXX = attributes.itemsX; var itemX = attributes.item; var iconX = attributes.icon; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (itemX != undefined) { var itemY = { ...itemX, options: item.options }; setAttributes({ item: itemY }); blockCssObj[itemSelector] = itemY; } if (itemsXX != undefined) { var itemsXY = { ...itemsXX, options: itemsX.options }; setAttributes({ itemsX: itemsXY }); blockCssObj[itemsXSelector] = itemsXY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemsSelector] = itemsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryItem(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; item[sudoScource] = sudoScourceArgs; }); var itemX = Object.assign({}, item); setAttributes({ item: itemX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } // function onChangeStyleWrapper(sudoScource, newVal, attr) { // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, wrapper); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ wrapper: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); // sudoScourceX[attr][breakPointX] = newVal; // let itemsX = Object.assign({}, blockCssY.items); // if (itemsX[elementSelector] == undefined) { // itemsX[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); // } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const ALLOWED_BLOCKS = ["post-grid/list-nested-item"]; const MY_TEMPLATE = [["post-grid/list-nested-item", { wrapper: { options: { tag: "li", class: "pg-list-nested-item" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-chevron-right", class: "icon", position: "before" } } }]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}`, reversed: item.options.reversed ? "reversed" : "", start: item.options.start }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_20__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "No Wrapper", value: "" }, { label: "Ul", value: "ul" }, { label: "Ol", value: "ol" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: item.options.tag, options: [{ label: "Choose", value: "" }, { label: "li", value: "li" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...item.options, tag: newVal }; setAttributes({ item: { ...item, options: options } }); } })), wrapper.options.tag == "ol" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { label: "Reversed?", help: item.options.reversed ? "Counter reversed?" : "No reversed", checked: item.options.reversed ? true : false, onChange: e => { var options = { ...item.options, reversed: item.options.reversed ? false : true }; setAttributes({ item: { ...item, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Counter start with"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: item.options.start, onChange: newVal => { var options = { ...item.options, start: newVal }; setAttributes({ item: { ...item, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Ordered list type?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: item.options.type, options: [{ label: "Choose", value: "" }, { label: "Decimal numbers (1, 2, 3, 4)", value: "1" }, { label: "Alphabetically ordered list", value: "a" }, { label: "Alphabetically ordered list, uppercase", value: "A" }, { label: "Roman numbers, lowercase (i, ii, iii, iv)", value: "i" }, { label: "Roman numbers, uppercase (I, II, III, IV)", value: "I" }], onChange: newVal => { var options = { ...item.options, type: newVal }; setAttributes({ item: { ...item, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleItem })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: item, onChange: onPickCssLibraryItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose...", value: "" }, // { label: "Left", value: "left" }, { label: "Before Text", value: "before" }, { label: "After Text", value: "after" } // { label: "Right", value: "right" }, ], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__["default"], { blockName: "list-nested", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_21__["default"], { slug: "list-nested" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagWrapper, innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); const CustomTagWrapper = `${wrapper.options.tag}`; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/list/index.js": /*!**********************************!*\ !*** ./src/blocks/list/index.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/list/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 11.9551H57.1855V22.4158H160V11.9551Z", fill: "url(#paint0_linear_61_754)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M37.3599 0L15.5418 21.8182L6.27675 12.553L0 18.7298L15.5418 34.3711L43.6366 6.27651L37.3599 0Z", fill: "url(#paint1_linear_61_754)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 61.0708H57.1855V71.5316H160V61.0708Z", fill: "url(#paint2_linear_61_754)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 110.187H57.1855V120.647H160V110.187Z", fill: "url(#paint3_linear_61_754)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M0 48.5181V84.0847H35.5668V48.5181H0ZM8.36852 75.8157V56.787H27.3972V75.8157H8.36852Z", fill: "url(#paint4_linear_61_754)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M0 133.2H35.6665V97.5342H0V133.2ZM27.3972 105.903V124.931H8.36852V105.903H27.3972Z", fill: "url(#paint5_linear_61_754)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_754", x1: "57.1855", y1: "17.1855", x2: "160", y2: "17.1855", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_754", x1: "0", y1: "17.1855", x2: "43.6366", y2: "17.1855", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_754", x1: "57.1855", y1: "66.3012", x2: "160", y2: "66.3012", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_754", x1: "57.1855", y1: "115.417", x2: "160", y2: "115.417", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_754", x1: "0", y1: "66.3014", x2: "35.5668", y2: "66.3014", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_754", x1: "0", y1: "115.367", x2: "35.6665", y2: "115.367", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, deprecated: [{ attributes: { items: { type: "array", default: [{ text: "", icon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fas fa-chevron-right" }, styles: {} }] } } }], edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var itemsX = attributes.itemsX; var wrapper = attributes.wrapper; var item = attributes.item; var items = attributes.items; var icon = attributes.icon; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [isOpen, setisOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var itemSelector = blockClass + " .item"; const iconSelector = blockClass + " .icon"; const CustomTag = `${wrapper.options.tag}`; const CustomTagItem = `${item.options.tag}`; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); if (items.length > 0) { if (itemsX.items.length == 0) { setAttributes({ itemsX: { ...itemsX, items: items } }); } } }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = item; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // for (var x in breakPoints) { // var itemX = breakPoints[x]; // breakPointList.push({ label: itemX.name, icon: itemX.icon, value: itemX.id }) // } const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var itemsX = attributes.items; var itemsXX = attributes.itemsX; var itemX = attributes.item; var iconX = attributes.icon; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (itemX != undefined) { var itemY = { ...itemX, options: item.options }; setAttributes({ item: itemY }); blockCssObj[itemSelector] = itemY; } if (itemsXX != undefined) { var itemsXY = { ...itemsXX, options: itemsX.options }; setAttributes({ itemsX: itemsXY }); blockCssObj[itemsXSelector] = itemsXY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemsSelector] = itemsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryItem(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; item[sudoScource] = sudoScourceArgs; }); var itemX = Object.assign({}, item); setAttributes({ item: itemX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-500 p-2 mx-3 px-5 text-white my-4 text-center cursor-pointer" , onClick: ev => { var itemsZ = { ...itemsX }; var itemx = itemsZ.items.concat({ text: "", icon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fas fa-chevron-right" }, styles: {} }); setAttributes({ itemsX: { ...itemsX, items: itemx } }); } }, "Add List Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "Ul", value: "ul" }, { label: "Ol", value: "ol" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.options.tag, options: [{ label: "Choose", value: "" }, { label: "li", value: "li" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...item.options, tag: newVal }; setAttributes({ item: { ...item, options: options } }); } })), wrapper.options.tag == "ol" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Reversed?", help: item.options.reversed ? "Counter reversed?" : "No reversed", checked: item.options.reversed ? true : false, onChange: e => { var options = { ...item.options, reversed: item.options.reversed ? false : true }; setAttributes({ item: { ...item, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Counter start with"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: item.options.start, onChange: newVal => { var options = { ...item.options, start: newVal }; setAttributes({ item: { ...item, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Ordered list type?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: item.options.type, options: [{ label: "Choose", value: "" }, { label: "Decimal numbers (1, 2, 3, 4)", value: "1" }, { label: "Alphabetically ordered list", value: "a" }, { label: "Alphabetically ordered list, uppercase", value: "A" }, { label: "Roman numbers, lowercase (i, ii, iii, iv)", value: "i" }, { label: "Roman numbers, uppercase (I, II, III, IV)", value: "I" }], onChange: newVal => { var options = { ...item.options, type: newVal }; setAttributes({ item: { ...item, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleItem })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: item, onChange: onPickCssLibraryItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_13__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose...", value: "" }, { label: "Before Text", value: "before" }, { label: "After Text", value: "after" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "list", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "list" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { reversed: item.options.reversed ? "reversed" : "", start: item.options.start }), itemsX.items != undefined && itemsX.items.map((itemX, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagItem, { className: ` ${item.options.class}`, onClick: ev => { var ssdsd = itemsX.items.concat([]); // setAttributes({ items: { items: ssdsd } }); setAttributes({ itemsX: { ...itemsX, items: ssdsd } }); } }, icon.options.position == "before" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { tagName: "div", className: "inline-block", value: itemX.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onSplit: (value, isAfterOriginal) => { (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/paragraph", { content: value }); }, onChange: content => { var itemsZ = { ...itemsX }; var item = { ...itemsZ.items[i], text: content }; itemsZ.items[i] = item; setAttributes({ itemsX: { ...itemsX, items: itemsZ.items } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }), icon.options.position == "after" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text-lg cursor-pointer px-2 text-red-500 py-1 float-right icon-close", onClick: ev => { itemsX.items.splice(i, 1); var ssdsd = itemsX.items.concat([]); //setAttributes({ items: { items: ssdsd } }) setAttributes({ itemsX: { ...itemsX, items: ssdsd } }); ev.preventDefault(); } }))); })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/masonry-wrap-item/index.js": /*!***********************************************!*\ !*** ./src/blocks/masonry-wrap-item/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./block.json */ "./src/blocks/masonry-wrap-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_17__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "161", height: "160", viewBox: "0 0 161 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M1 115.556H48.5555V96.8892H1V115.556Z", fill: "url(#paint0_linear_67_1106)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 44H113.444V62.6666H161V44Z", fill: "url(#paint1_linear_67_1106)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M104.111 44H56.5557V75.5555H104.111V44Z", fill: "url(#paint2_linear_67_1106)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M1 88.8888H48.5555V44H1V88.8888Z", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M161 71.1108H113.444V115.555H161V71.1108Z", fill: "url(#paint3_linear_67_1106)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M104.111 84H56.5557V115.556H104.111V84Z", fill: "url(#paint4_linear_67_1106)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_67_1106", x1: "1", y1: "106.222", x2: "48.5555", y2: "106.222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_67_1106", x1: "113.444", y1: "53.3333", x2: "161", y2: "53.3333", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_67_1106", x1: "56.5557", y1: "59.7777", x2: "104.111", y2: "59.7777", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_67_1106", x1: "113.444", y1: "93.333", x2: "161", y2: "93.333", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_67_1106", x1: "56.5557", y1: "99.7777", x2: "104.111", y2: "99.7777", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function generateElementSudoCss(obj) { var stylesObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options") { var selector = myStore.getElementSelector(sudoSrc, wrapperSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); } }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var elementCss = generateElementSudoCss(wrapper); }, [wrapper]); function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [["post-grid/image", { wrapper: { options: { tag: "div", class: "", useAsBackground: "no" }, styles: { width: { Desktop: "100%" }, height: { Desktop: "100%" }, overflow: { Desktop: "hidden" } } }, image: { options: { imgSrcType: "media", imgSrcMetaKey: "", imgSrcMetaKeyType: "ID", imgSrcImgId: "", srcUrl: "", srcId: "", linkTo: "", linkToMetaKey: "", linkTocustomUrl: "", altTextSrc: "imgAltText", altTextCustom: "", altTextMetaKey: "", titleTextSrc: "imgTitle", titleTextCustom: "", titleTextMetaKey: "", linkTarget: "_blank", linkAttr: [], class: "", size: { Desktop: "full", Tablet: "full", Mobile: "full" } }, styles: { maxWidth: { Desktop: "100%" }, height: { Desktop: "auto" }, display: { Desktop: "block" } } }, lightbox: { options: { enable: false, class: "" }, styles: {} } }]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} border border-dashed` }); //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_18__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_19__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", innerBlocksProps, innerBlocksProps.children)); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/masonry-wrap/index.js": /*!******************************************!*\ !*** ./src/blocks/masonry-wrap/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./variations */ "./src/blocks/masonry-wrap/variations.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/masonry-wrap/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); /* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_23___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_23__); /* harmony import */ var imagesloaded__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); /* harmony import */ var imagesloaded__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(imagesloaded__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M-0.00488281 115.556H47.5506V96.8892H-0.00488281V115.556Z", fill: "url(#paint0_linear_61_609)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.995 44H112.439V62.6666H159.995V44Z", fill: "url(#paint1_linear_61_609)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M103.106 44H55.5508V75.5555H103.106V44Z", fill: "url(#paint2_linear_61_609)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M-0.00488281 88.8888H47.5506V44H-0.00488281V88.8888Z", fill: "url(#paint3_linear_61_609)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.995 71.1108H112.439V115.555H159.995V71.1108Z", fill: "url(#paint4_linear_61_609)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M103.106 84H55.5508V115.556H103.106V84Z", fill: "url(#paint5_linear_61_609)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_609", x1: "-0.00488281", y1: "106.222", x2: "47.5506", y2: "106.222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_609", x1: "112.439", y1: "53.3333", x2: "159.995", y2: "53.3333", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_609", x1: "55.5508", y1: "59.7777", x2: "103.106", y2: "59.7777", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_609", x1: "-0.00488281", y1: "66.4444", x2: "47.5506", y2: "66.4444", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_609", x1: "112.439", y1: "93.333", x2: "159.995", y2: "93.333", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_609", x1: "55.5508", y1: "99.7777", x2: "103.106", y2: "99.7777", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var item = attributes.item; var masonryOptions = attributes.masonryOptions; var lightbox = attributes.lightbox; const lightboxEnable = lightbox.options.enable == undefined ? true : lightbox.options.enable; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var itemSelector = blockClass + " .pg-masonry-wrap-item"; // var masonryOptionsSelector = blockClass + " .pg-masonry-wrap-item"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); var icons = { bed: "", layout: "", smiley: "", columns: "", globe: "" }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { function loadMasonry() { // var elemX = document.querySelectorAll("." + blockId); var elemX = document.querySelector(blockClass); if (elemX != null) { // elemX.forEach((arg) => { imagesloaded__WEBPACK_IMPORTED_MODULE_24___default()(elemX, function () { var msnry = new (masonry_layout__WEBPACK_IMPORTED_MODULE_23___default())(elemX, masonryOptions); }); // }); } } // setTimeout(() => { loadMasonry(); // }, 500); }, [masonryOptions, blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); // setTimeout(() => { // loadMasonry(); // console.log("first"); // }, 5000); // console.log(Math.floor(new Date("2012.08.10").getTime() / 1000)); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = item; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); // loadMasonry(); }, [blockId]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; // console.log(content); // console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeStyleGutter(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function applyFlex(attr, newVal) { onChangeStyleWrapper("styles", newVal, attr); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, item); obj[sudoScource] = cssObj; setAttributes({ item: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var masonryOptionsArgs = { itemSelector: { label: "Item Selector", value: ".pg-masonry-wrap-item" }, columnWidth: { label: "Column Width", value: 200 }, gutter: { label: "Gutter", value: 15 }, percentPosition: { label: "Percent Position", value: true }, horizontalOrder: { label: "Horizontal Order", value: true }, stamp: { label: "Stamp", value: ".stamp" }, fitWidth: { label: "Fit Width", value: true }, originLeft: { label: "Origin Left", value: true }, originTop: { label: "Origin Top", value: true }, stagger: { label: "Stagger", value: 30 }, resize: { label: "Resize", value: true } }; var RemoveMasonryArg = function ({ index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var masonryOptionsX = { ...masonryOptions }; delete masonryOptionsX[index]; setAttributes({ masonryOptions: masonryOptionsX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })); }; const ALLOWED_BLOCKS = ["post-grid/masonry-wrap-item", "post-grid/post-query", "post-grid/post-query-pagination"]; const MY_TEMPLATE = [["post-grid/masonry-wrap-item", {}], ["post-grid/masonry-wrap-item", {}], ["post-grid/masonry-wrap-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender }); const addChild = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/masonry-wrap-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); //setActiveTab(slide.clientId); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addChild(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Masonry", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_25__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: masonryOptionsArgs, onChange: (option, index) => { var masonryOptionsX = { ...masonryOptions }; masonryOptionsX[index] = option.value; setAttributes({ masonryOptions: masonryOptionsX }); }, values: "" })), Object.entries(masonryOptions).map((item, index) => { var id = item[0]; var value = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "itemSelector" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Selector")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: masonryOptions.itemSelector, onChange: newVal => { setAttributes({ masonryOptions: { ...masonryOptions, itemSelector: newVal } }); } })), id == "gutter" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Gutter")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { type: "number", value: masonryOptions.gutter, onChange: newVal => { setAttributes({ masonryOptions: { ...masonryOptions, gutter: parseInt(newVal) } }); onChangeStyleItem("styles", parseInt(newVal) + "px", "marginBottom"); } })), id == "columnWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Column width")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { type: "number", value: masonryOptions.columnWidth, onChange: newVal => { setAttributes({ masonryOptions: { ...masonryOptions, columnWidth: parseInt(newVal) } }); } })), id == "horizontalOrder" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Horizontal Order?", help: masonryOptions.horizontalOrder ? "Horizontal Order Enabled" : "Horizontal Order Disabled", checked: masonryOptions.horizontalOrder, onChange: newHorizontalOrder => { const updatedMasonryOptions = { ...masonryOptions, horizontalOrder: newHorizontalOrder }; setAttributes({ masonryOptions: updatedMasonryOptions }); } }))), id == "percentPosition" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Percent Position?", help: masonryOptions.percentPosition ? "Percent Position Enabled" : "Percent Position Disabled", checked: masonryOptions.percentPosition, onChange: newPercentPosition => { const updatedMasonryOptions = { ...masonryOptions, percentPosition: newPercentPosition }; setAttributes({ masonryOptions: updatedMasonryOptions }); } }))), id == "stamp" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Stamp"))), id == "fitWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Fit Width?", help: masonryOptions.fitWidth ? "Fit Width Enabled" : "Fit Width Disabled.", checked: masonryOptions.fitWidth, onChange: fitWidth => { const updatedMasonryOptions = { ...masonryOptions, fitWidth: fitWidth }; setAttributes({ masonryOptions: updatedMasonryOptions }); } }))), id == "originLeft" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Origin Left?", help: masonryOptions.originLeft ? "Origin Left Enabled" : "Origin Left Disabled.", checked: masonryOptions.originLeft, onChange: originLeft => { const updatedMasonryOptions = { ...masonryOptions, originLeft: originLeft }; setAttributes({ masonryOptions: updatedMasonryOptions }); } }))), id == "originTop" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Origin Top?", help: masonryOptions.originTop ? "Origin Top Enabled" : "Origin Top Disabled.", checked: masonryOptions.originTop, onChange: originTop => { const updatedMasonryOptions = { ...masonryOptions, originTop: originTop }; setAttributes({ masonryOptions: updatedMasonryOptions }); } }))), id == "stagger" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Stagger?", help: masonryOptions.stagger ? "Stagger Enabled" : "Stagger Disabled.", checked: masonryOptions.stagger, onChange: stagger => { const updatedMasonryOptions = { ...masonryOptions, stagger: stagger }; setAttributes({ masonryOptions: updatedMasonryOptions }); } }))), id == "resize" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveMasonryArg, { index: id }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Resize?", help: masonryOptions.resize ? "Resize Enabled" : "Resize Disabled.", checked: masonryOptions.resize, onChange: resize => { const updatedMasonryOptions = { ...masonryOptions, resize: resize }; setAttributes({ masonryOptions: updatedMasonryOptions }); } })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Lightbox", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable?", help: lightboxEnable ? "Lightbox Enabled" : "Lightbox Disabled.", checked: lightboxEnable ? true : false, onChange: e => { var options = { ...lightbox.options, enable: lightboxEnable ? false : true }; setAttributes({ lightbox: { ...lightbox, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "masonry-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_26__["default"], { slug: "masonry-wrap" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_27__["default"], { blockName: "masonry-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class} ` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/masonry-wrap/variations.js": /*!***********************************************!*\ !*** ./src/blocks/masonry-wrap/variations.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "2-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("2 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("2 Col Masonry"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-masonry-wrap" }, styles: {} }, masonryOptions: { gutter: 20, itemSelector: ".pg-masonry-wrap-item", columnWidth: 420 }, item: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: { width: { Desktop: "420px" }, marginBottom: { Desktop: "20px" } } }, lightbox: { options: { enable: false } } }, innerBlocks: [["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { viewBox: "0 0 160 80", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0 80L74 80V60.2899L0 60.2899V80Z", fill: "url(#paint0_linear_21_35)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 4.80015e-06L86 0L86 35.942L160 35.942L160 4.80015e-06Z", fill: "url(#paint1_linear_21_35)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0 51.0145L74 51.0145L74 3.43323e-05L0 3.43323e-05L0 51.0145Z", fill: "url(#paint2_linear_21_35)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 45.2174L86 45.2174L86 80L160 80L160 45.2174Z", fill: "url(#paint3_linear_21_35)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_21_35", x1: "74", y1: "70.1449", x2: "0", y2: "70.1449", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_21_35", x1: "86", y1: "17.971", x2: "160", y2: "17.971", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_21_35", x1: "74", y1: "25.5073", x2: "0", y2: "25.5073", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_21_35", x1: "86", y1: "62.6087", x2: "160", y2: "62.6087", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, { name: "3-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 Col masonry"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-masonry-wrap" }, styles: {} }, masonryOptions: { gutter: 20, itemSelector: ".pg-masonry-wrap-item", columnWidth: 300 }, item: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: { width: { Desktop: "300px" }, marginBottom: { Desktop: "20px" } } }, lightbox: { options: { enable: false } } }, innerBlocks: [["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { viewBox: "0 0 160 80", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-0.000198364 80H47.7017V58.8889L-0.000198364 58.8889V80Z", fill: "url(#paint0_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 4.15769e-06L112.298 0L112.298 21.1111L160 21.1111L160 4.15769e-06Z", fill: "url(#paint1_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M103.354 4.15769e-06L55.6523 0L55.6523 35.5555L103.354 35.5555L103.354 4.15769e-06Z", fill: "url(#paint2_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-0.000198364 50L47.7017 50L47.7017 3.8147e-06L-0.000198364 3.8147e-06L-0.000198364 50Z", fill: "url(#paint3_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 30L112.298 30L112.298 80L160 80L160 30Z", fill: "url(#paint4_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M103.354 44.4445L55.6523 44.4445L55.6523 80L103.354 80L103.354 44.4445Z", fill: "url(#paint5_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_21_36", x1: "47.7017", y1: "69.4445", x2: "-0.000202179", y2: "69.4445", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_21_36", x1: "112.298", y1: "10.5555", x2: "160", y2: "10.5556", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_21_36", x1: "55.6523", y1: "17.7778", x2: "103.354", y2: "17.7778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_21_36", x1: "47.7017", y1: "25", x2: "-0.000202179", y2: "25", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_21_36", x1: "112.298", y1: "55", x2: "160", y2: "55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_21_36", x1: "55.6523", y1: "62.2222", x2: "103.354", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, { name: "4-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("4 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("4 Col Masonry"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-masonry-wrap" }, styles: {} }, masonryOptions: { gutter: 20, itemSelector: ".pg-masonry-wrap-item", columnWidth: 220 }, item: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: { width: { Desktop: "220px" }, marginBottom: { Desktop: "20px" } } }, lightbox: { options: { enable: false } } }, innerBlocks: [["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }], ["post-grid/masonry-wrap-item", { wrapper: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: {} } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { viewBox: "0 0 159 80", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-6.10352e-05 80H34.4326V58.889L-6.10352e-05 58.889V80Z", fill: "url(#paint0_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M74.6043 0.000248973L40.1716 0.000244141L40.1716 35.5557L74.6043 35.5557L74.6043 0.000248973Z", fill: "url(#paint1_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-6.10352e-05 49.9999L34.4326 49.9999L34.4326 4.19617e-05L-6.10352e-05 4.19617e-05L-6.10352e-05 49.9999Z", fill: "url(#paint2_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M115.493 0.00024892L81.0603 0.000244141L81.0603 21.1113L115.493 21.1113L115.493 0.00024892Z", fill: "url(#paint3_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M115.493 30.0004L81.0603 30.0004L81.0603 80.0002L115.493 80.0002L115.493 30.0004Z", fill: "url(#paint4_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M74.6043 44.4445L40.1716 44.4445L40.1716 79.9999L74.6043 79.9999L74.6043 44.4445Z", fill: "url(#paint5_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 0.00024892L123.578 0.000244141L123.578 35.5557L158.01 35.5557L158.01 0.00024892Z", fill: "url(#paint6_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 44.4445L123.578 44.4445L123.578 79.9999L158.01 79.9999L158.01 44.4445Z", fill: "url(#paint7_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 0.00024892L123.578 0.000244141L123.578 35.5557L158.01 35.5557L158.01 0.00024892Z", fill: "url(#paint8_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 44.4445L123.578 44.4445L123.578 79.9999L158.01 79.9999L158.01 44.4445Z", fill: "url(#paint9_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_21_38", x1: "34.4326", y1: "69.4445", x2: "-6.10352e-05", y2: "69.4445", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_21_38", x1: "40.1716", y1: "17.778", x2: "74.6043", y2: "17.778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_21_38", x1: "34.4326", y1: "25", x2: "-6.10352e-05", y2: "25", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_21_38", x1: "81.0603", y1: "10.5558", x2: "115.493", y2: "10.5558", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_21_38", x1: "81.0603", y1: "55.0003", x2: "115.493", y2: "55.0003", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_21_38", x1: "40.1716", y1: "62.2222", x2: "74.6043", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_21_38", x1: "123.578", y1: "17.778", x2: "158.01", y2: "17.778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_21_38", x1: "123.578", y1: "62.2222", x2: "158.01", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint8_linear_21_38", x1: "123.578", y1: "17.778", x2: "158.01", y2: "17.778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint9_linear_21_38", x1: "123.578", y1: "62.2222", x2: "158.01", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, { name: "3-column-masonry-post", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 column post"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 column masonry post"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-masonry-wrap" }, styles: {} }, masonryOptions: { gutter: 20, itemSelector: ".pg-masonry-wrap-item", columnWidth: 300 }, item: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: { width: { Desktop: "300px" }, marginBottom: { Desktop: "20px" } } }, lightbox: { options: { enable: false } } }, innerBlocks: [["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, itemsWrap: { options: { excludedWrapper: true }, styles: [] }, itemWrap: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], id: "postType" }, { val: "10", id: "postsPerPage" }] } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { viewBox: "0 0 160 80", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-0.000198364 80H47.7017V58.8889L-0.000198364 58.8889V80Z", fill: "url(#paint0_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 4.15769e-06L112.298 0L112.298 21.1111L160 21.1111L160 4.15769e-06Z", fill: "url(#paint1_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M103.354 4.15769e-06L55.6523 0L55.6523 35.5555L103.354 35.5555L103.354 4.15769e-06Z", fill: "url(#paint2_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-0.000198364 50L47.7017 50L47.7017 3.8147e-06L-0.000198364 3.8147e-06L-0.000198364 50Z", fill: "url(#paint3_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 30L112.298 30L112.298 80L160 80L160 30Z", fill: "url(#paint4_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M103.354 44.4445L55.6523 44.4445L55.6523 80L103.354 80L103.354 44.4445Z", fill: "url(#paint5_linear_21_36)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_21_36", x1: "47.7017", y1: "69.4445", x2: "-0.000202179", y2: "69.4445", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_21_36", x1: "112.298", y1: "10.5555", x2: "160", y2: "10.5556", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_21_36", x1: "55.6523", y1: "17.7778", x2: "103.354", y2: "17.7778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_21_36", x1: "47.7017", y1: "25", x2: "-0.000202179", y2: "25", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_21_36", x1: "112.298", y1: "55", x2: "160", y2: "55", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_21_36", x1: "55.6523", y1: "62.2222", x2: "103.354", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, { name: "4-column-masonry-post", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("4 column post"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("4 column masonry post"), isDefault: true, isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-masonry-wrap" }, styles: {} }, masonryOptions: { gutter: 20, itemSelector: ".pg-masonry-wrap-item", columnWidth: 220 }, item: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: { width: { Desktop: "220px" }, marginBottom: { Desktop: "20px" } } }, lightbox: { options: { enable: false } } }, innerBlocks: [["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, itemsWrap: { options: { excludedWrapper: true }, styles: [] }, itemWrap: { options: { tag: "div", class: "pg-masonry-wrap-item" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], id: "postType" }, { val: "10", id: "postsPerPage" }] } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { viewBox: "0 0 159 80", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-6.10352e-05 80H34.4326V58.889L-6.10352e-05 58.889V80Z", fill: "url(#paint0_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M74.6043 0.000248973L40.1716 0.000244141L40.1716 35.5557L74.6043 35.5557L74.6043 0.000248973Z", fill: "url(#paint1_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M-6.10352e-05 49.9999L34.4326 49.9999L34.4326 4.19617e-05L-6.10352e-05 4.19617e-05L-6.10352e-05 49.9999Z", fill: "url(#paint2_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M115.493 0.00024892L81.0603 0.000244141L81.0603 21.1113L115.493 21.1113L115.493 0.00024892Z", fill: "url(#paint3_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M115.493 30.0004L81.0603 30.0004L81.0603 80.0002L115.493 80.0002L115.493 30.0004Z", fill: "url(#paint4_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M74.6043 44.4445L40.1716 44.4445L40.1716 79.9999L74.6043 79.9999L74.6043 44.4445Z", fill: "url(#paint5_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 0.00024892L123.578 0.000244141L123.578 35.5557L158.01 35.5557L158.01 0.00024892Z", fill: "url(#paint6_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 44.4445L123.578 44.4445L123.578 79.9999L158.01 79.9999L158.01 44.4445Z", fill: "url(#paint7_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 0.00024892L123.578 0.000244141L123.578 35.5557L158.01 35.5557L158.01 0.00024892Z", fill: "url(#paint8_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158.01 44.4445L123.578 44.4445L123.578 79.9999L158.01 79.9999L158.01 44.4445Z", fill: "url(#paint9_linear_21_38)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_21_38", x1: "34.4326", y1: "69.4445", x2: "-6.10352e-05", y2: "69.4445", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_21_38", x1: "40.1716", y1: "17.778", x2: "74.6043", y2: "17.778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_21_38", x1: "34.4326", y1: "25", x2: "-6.10352e-05", y2: "25", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_21_38", x1: "81.0603", y1: "10.5558", x2: "115.493", y2: "10.5558", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_21_38", x1: "81.0603", y1: "55.0003", x2: "115.493", y2: "55.0003", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_21_38", x1: "40.1716", y1: "62.2222", x2: "74.6043", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_21_38", x1: "123.578", y1: "17.778", x2: "158.01", y2: "17.778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_21_38", x1: "123.578", y1: "62.2222", x2: "158.01", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint8_linear_21_38", x1: "123.578", y1: "17.778", x2: "158.01", y2: "17.778", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint9_linear_21_38", x1: "123.578", y1: "62.2222", x2: "158.01", y2: "62.2222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/menu-wrap-item/index.js": /*!********************************************!*\ !*** ./src/blocks/menu-wrap-item/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./block.json */ "./src/blocks/menu-wrap-item/block.json"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_17__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", y: "10.4", width: "7.49", height: "15.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "28.51", y: "10.4", width: "7.49", height: "15.2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "25.18 26.5 22.47 26.5 22.47 24.7 23.37 24.7 23.37 23.79 25.18 23.79 25.18 26.5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "16.51", y: "24.69", width: "2.98", height: "1.81" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "13.53 26.5 10.82 26.5 10.82 23.79 12.63 23.79 12.63 24.7 13.53 24.7 13.53 26.5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "10.82", y: "16.07", width: "1.81", height: "3.86" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "12.63 12.21 10.82 12.21 10.82 9.5 13.53 9.5 13.53 11.3 12.63 11.3 12.63 12.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "16.51", y: "9.5", width: "2.98", height: "1.81" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("polygon", { fill: "#1d4ed8", points: "25.18 12.21 23.37 12.21 23.37 11.3 22.47 11.3 22.47 9.5 25.18 9.5 25.18 12.21" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "23.37", y: "16.07", width: "1.81", height: "3.86" })) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var linkX = attributes.link; var icon = attributes.icon; var subMenuWrap = attributes.subMenuWrap; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var subMenuWrapSelector = blockClass + " .pg-sub-menu"; const iconSelector = blockClass + " .pg-menu-icon"; const linkSelector = blockClass + " .pg-menu-link"; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [linkPickerMenu, setLinkPickerMenu] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[subMenuWrapSelector] = subMenuWrap; blockCssObj[iconSelector] = icon; blockCssObj[linkSelector] = linkX; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function generateElementSudoCss(obj) { var stylesObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options") { var selector = myStore.getElementSelector(sudoSrc, wrapperSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); } }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var elementCss = generateElementSudoCss(wrapper); }, [wrapper]); function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // function onChangeStyleSubMenuWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, subMenuWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ subMenuWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, subMenuWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSubMenuWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(subMenuWrap, [sudoScource, key, breakPointX]); setAttributes({ subMenuWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, subMenuWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSubMenuWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, subMenuWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ subMenuWrap: object }); } function onBulkAddSubMenuWrap(sudoScource, cssObj) { let obj = Object.assign({}, subMenuWrap); obj[sudoScource] = cssObj; setAttributes({ subMenuWrap: obj }); var selector = myStore.getElementSelector(sudoScource, subMenuWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // function onChangeStyleIcon(sudoScource, newVal, attr) { // var path = [sudoScource, attr, breakPointX]; // let obj = Object.assign({}, icon); // const object = myStore.updatePropertyDeep(obj, path, newVal); // setAttributes({ icon: object }); // var elementSelector = myStore.getElementSelector( // sudoScource, // iconSelector // ); // var cssPropty = myStore.cssAttrParse(attr); // let itemsX = Object.assign({}, blockCssY.items); // if (itemsX[elementSelector] == undefined) { // itemsX[elementSelector] = {}; // } // var cssPath = [elementSelector, cssPropty, breakPointX]; // const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); // setAttributes({ blockCssY: { items: cssItems } }); // } // function onRemoveStyleIcon(sudoScource, key) { // var object = myStore.deletePropertyDeep(icon, [ // sudoScource, // key, // breakPointX, // ]); // setAttributes({ icon: object }); // var elementSelector = myStore.getElementSelector( // sudoScource, // iconSelector // ); // var cssPropty = myStore.cssAttrParse(key); // var cssObject = myStore.deletePropertyDeep(blockCssY.items, [ // elementSelector, // cssPropty, // breakPointX, // ]); // setAttributes({ blockCssY: { items: cssObject } }); // } // function onAddStyleIcon(sudoScource, key) { // var path = [sudoScource, key, breakPointX]; // let obj = Object.assign({}, icon); // const object = myStore.addPropertyDeep(obj, path, ""); // setAttributes({ icon: object }); // } // function onBulkAddIcon(sudoScource, cssObj) { // // let obj = Object.assign({}, icon); // obj[sudoScource] = cssObj; // setAttributes({ icon: obj }); // var selector = myStore.getElementSelector(sudoScource, iconSelector); // var stylesObj = {}; // Object.entries(cssObj).map((args) => { // var attr = args[0]; // var cssPropty = myStore.cssAttrParse(attr); // if (stylesObj[selector] == undefined) { // stylesObj[selector] = {}; // } // if (stylesObj[selector][cssPropty] == undefined) { // stylesObj[selector][cssPropty] = {}; // } // stylesObj[selector][cssPropty] = args[1]; // }); // var cssItems = { ...blockCssY.items }; // var cssItemsX = { ...cssItems, ...stylesObj }; // setAttributes({ blockCssY: { items: cssItemsX } }); // } // function onPickCssLibraryIcon(args) { // Object.entries(args).map((x) => { // var sudoScource = x[0]; // var sudoScourceArgs = x[1]; // icon[sudoScource] = sudoScourceArgs; // }); // var iconX = Object.assign({}, icon); // setAttributes({ icon: iconX }); // var styleObj = {}; // Object.entries(args).map((x) => { // var sudoScource = x[0]; // var sudoScourceArgs = x[1]; // var elementSelector = myStore.getElementSelector( // sudoScource, // iconSelector // ); // var sudoObj = {}; // Object.entries(sudoScourceArgs).map((y) => { // var cssPropty = y[0]; // var cssProptyVal = y[1]; // var cssProptyKey = myStore.cssAttrParse(cssPropty); // sudoObj[cssProptyKey] = cssProptyVal; // }); // styleObj[elementSelector] = sudoObj; // }); // var cssItems = Object.assign(blockCssY.items, styleObj); // setAttributes({ blockCssY: { items: cssItems } }); // } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const MY_TEMPLATE = [ //['core/paragraph', { placeholder: '', content: 'Hello Text...' }], ]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ${wrapper.options.isActive ? "active" : ""}` }); //const isParentOfSelectedBlock = useSelect((select) => select('core/block-editor').hasSelectedInnerBlock(clientId, true)) const ALLOWED_BLOCKS = ["post-grid/menu-wrap-item", "post-grid/flex-wrap", "post-grid/grid-wrap", "post-grid/image", "post-grid/list-nested", "post-grid/layers", "core/paragraph"]; const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Menu Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { className: "mr-2", value: linkX.options.text, onChange: newVal => { var options = { ...linkX.options, text: newVal }; setAttributes({ linkX: { ...linkX, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Button, { className: linkPickerMenu ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"], onClick: ev => { setLinkPickerMenu(prev => !prev); } }), linkX.options.url.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], onClick: ev => { var options = { ...linkX.options, url: "" }; setAttributes({ link: { ...linkX, options: options } }); setLinkPickerMenu(false); console.log("first"); } }), linkPickerMenu && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.__experimentalLinkControl, { settings: [], value: linkX.options.url, onChange: newVal => { console.log(newVal); var options = { ...linkX.options, url: newVal.url }; setAttributes({ link: { ...linkX, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", linkX.options.url.length != 0 ? linkX.options.url : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.ToggleControl, { label: "Menu Active?", help: wrapper.options.isActive ? "Menu Active" : "Menu Inactive.", checked: wrapper.options.isActive ? true : false, onChange: e => { var options = { ...wrapper.options, isActive: wrapper.options.isActive ? false : true }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_15__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Label", value: "beforeLabel" }, { label: "After Label", value: "afterLabel" }, // { label: "Before Prefix", value: "beforePrefix" }, // { label: "After Prefix", value: "afterPrefix" }, // { label: "Before Postfix", value: "beforePostfix" }, // { label: "After Postfix", value: "afterPostfix" }, { label: "Before Link", value: "beforeLink" }, { label: "After Link", value: "afterLink" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Sub MenuWrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: subMenuWrap, onChange: onChangeStyleSubMenuWrap, onAdd: onAddStyleSubMenuWrap, onRemove: onRemoveStyleSubMenuWrap, onBulkAdd: onBulkAddSubMenuWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", innerBlocksProps, linkX.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, icon.options.position == "beforeLink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: linkX.options.class, href: linkX.options.url }, icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), linkX.options.text, icon.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "afterLink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", { className: subMenuWrap.options.class }, innerBlocksProps.children))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InnerBlocks.Content, null); } }); /***/ }), /***/ "./src/blocks/menu-wrap/index.js": /*!***************************************!*\ !*** ./src/blocks/menu-wrap/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./variations */ "./src/blocks/menu-wrap/variations.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/menu-wrap/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M156.157 140.406H3.84337C1.73741 140.406 0 138.972 0 137.235V40.8954C0 39.158 1.73741 37.7246 3.84337 37.7246H156.157C158.263 37.7246 160 39.158 160 40.8954V137.235C160 138.972 158.263 140.406 156.157 140.406Z", fill: "url(#paint0_linear_61_753)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { x: "118.334", y: "19.2207", width: "36.9115", height: "36.9115", rx: "5.42816", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M138.572 37.6653L149.456 27.6971C149.938 27.2561 149.938 26.5062 149.456 26.0652C148.975 25.6241 148.156 25.6241 147.674 26.0652L136.79 36.0333L125.905 26.0652C125.424 25.6241 124.605 25.6241 124.123 26.0652C123.642 26.5062 123.642 27.2561 124.123 27.6971L135.008 37.6653L124.123 47.6335C123.642 48.0745 123.642 48.8244 124.123 49.2654C124.364 49.486 124.701 49.6183 124.99 49.6183C125.279 49.6183 125.616 49.486 125.857 49.2654L136.742 39.2973L147.626 49.2654C147.867 49.486 148.204 49.6183 148.493 49.6183C148.83 49.6183 149.119 49.486 149.36 49.2654C149.841 48.8244 149.841 48.0745 149.36 47.6335L138.572 37.6653Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M100.404 102.597H19.7388V112.259H100.404V102.597Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M100.404 79.7988H19.7388V89.4609H100.404V79.7988Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M100.404 56.1323H20.1328V66.9886H100.404V56.1323Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_753", x1: "0", y1: "89.0652", x2: "160", y2: "89.0652", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var menuWrap = attributes.menuWrap; var subMenuWrap = attributes.subMenuWrap; var link = attributes.link; var icon = attributes.icon; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var menuWrapSelector = blockClass + " .pg-menu"; var subMenuWrapSelector = blockClass + " .pg-sub-menu"; const iconSelector = blockClass + " .pg-menu-icon"; const linkSelector = blockClass + " .pg-menu-link"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); // blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'display': { "Desktop": "flex" } }; //blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'gap': { "Desktop": "1em" } }; setAttributes({ blockCssY: { items: blockCssY.items } }); //setAttributes({ wrapper: { ...wrapper, styles: { display: { Desktop: 'flex' }, gap: { Desktop: '20px' } } } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[menuWrapSelector] = menuWrap; blockCssObj[subMenuWrapSelector] = subMenuWrap; blockCssObj[iconSelector] = icon; blockCssObj[linkSelector] = link; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var menuWrapX = attributes.menuWrap; var subMenuWrapX = attributes.subMenuWrap; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (subMenuWrapX != undefined) { var subMenuWrapY = { ...subMenuWrapX, options: subMenuWrap.options }; setAttributes({ subMenuWrap: subMenuWrapY }); blockCssObj[subMenuWrapSelector] = subMenuWrapY; } if (menuWrapX != undefined) { var menuWrapY = { ...menuWrapX, options: menuWrap.options }; setAttributes({ menuWrap: menuWrapY }); blockCssObj[menuWrapSelector] = menuWrapY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function applyFlex(attr, newVal) { onChangeStyleWrapper("styles", newVal, attr); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // function onChangeStyleMenuWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, menuWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ menuWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, menuWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleMenuWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(menuWrap, [sudoScource, key, breakPointX]); setAttributes({ menuWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, menuWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleMenuWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, menuWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ menuWrap: object }); } function onBulkAddMenuWrap(sudoScource, cssObj) { let obj = Object.assign({}, menuWrap); obj[sudoScource] = cssObj; setAttributes({ menuWrap: obj }); var selector = myStore.getElementSelector(sudoScource, menuWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleSubMenuWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, subMenuWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ subMenuWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, subMenuWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSubMenuWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(subMenuWrap, [sudoScource, key, breakPointX]); setAttributes({ subMenuWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, subMenuWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSubMenuWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, subMenuWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ subMenuWrap: object }); } function onBulkAddSubMenuWrap(sudoScource, cssObj) { let obj = Object.assign({}, subMenuWrap); obj[sudoScource] = cssObj; setAttributes({ subMenuWrap: obj }); var selector = myStore.getElementSelector(sudoScource, subMenuWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // function onChangeStyleLink(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, link); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ link: object }); var elementSelector = myStore.getElementSelector(sudoScource, linkSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLink(sudoScource, key) { var object = myStore.deletePropertyDeep(link, [sudoScource, key, breakPointX]); setAttributes({ link: object }); var elementSelector = myStore.getElementSelector(sudoScource, linkSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLink(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, link); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ link: object }); } function onBulkAddLink(sudoScource, cssObj) { let obj = Object.assign({}, link); obj[sudoScource] = cssObj; setAttributes({ link: obj }); var selector = myStore.getElementSelector(sudoScource, linkSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } const addChild = () => { var childBlocks = wp.data.select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId); const slide = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/menu-wrap-item"); const position = childBlocks.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(slide, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); //setActiveTab(slide.clientId); }; const ALLOWED_BLOCKS = ["post-grid/menu-wrap-item"]; const MY_TEMPLATE = [["post-grid/menu-wrap-item", {}], ["post-grid/menu-wrap-item", {}], ["post-grid/menu-wrap-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addChild(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Flex Options", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 block my-3" }, "Justify Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "flex-start" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "flex-start"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex Start" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "5.5", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "11.44", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "17.39", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "flex-end" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "flex-end"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex End" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "14.94", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "20.88", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "26.83", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "center" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "center"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "10.22", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "22.11", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "space-between" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "space-between"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Space Between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "5.5", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "26.83", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "space-around" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "space-around"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Space Around" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "7.34", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.12", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "24.9", y: "5.5", width: "3.67", height: "25" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.justifyContent == undefined ? "bg-[#5655ff]" : wrapper.styles.justifyContent[breakPointX] == "space-evenly" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("justifyContent", "space-evenly"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Space Evenly" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "5.5", width: "3.67", height: "25" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 block" }, "Align Items"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "flex-start" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "flex-start"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex Start" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "5.5", width: "3.67", height: "8.88" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "16.42" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "5.5", width: "3.67", height: "12.5" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "flex-end" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "flex-end"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Flex End" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "21.62", width: "3.67", height: "8.88", transform: "translate(50.08 52.12) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "14.08", width: "3.67", height: "16.42", transform: "translate(36 44.58) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "18", width: "3.67", height: "12.5", transform: "translate(21.92 48.5) rotate(180)" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "center" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "center"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "13.56", width: "3.67", height: "8.88", transform: "translate(50.08 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "9.79", width: "3.67", height: "16.42", transform: "translate(36 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "13.56", width: "3.67", height: "8.88", transform: "translate(21.92 36) rotate(180)" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.alignItems == undefined ? "bg-[#5655ff]" : wrapper.styles.alignItems[breakPointX] == "stretch" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("alignItems", "stretch"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Stretch" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "23.2", y: "9.79", width: "3.67", height: "16.42", transform: "translate(50.08 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "9.79", width: "3.67", height: "16.42", transform: "translate(36 36) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "9.12", y: "9.79", width: "3.67", height: "16.42", transform: "translate(21.92 36) rotate(180)" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 block" }, "Flex Direction"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "row" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "row"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Row" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "5.5", y: "9.52", width: "3.67", height: "16.42" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "24.95 12.19 23.25 13.85 25.93 16.51 13.19 16.51 12.33 16.5 12.31 18.91 25.95 18.91 23.29 21.57 24.95 23.27 30.5 17.73 24.95 12.19" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "row-reverse" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "row-reverse"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Row Reverse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "26.83", y: "9.52", width: "3.67", height: "16.42", transform: "translate(57.33 35.45) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "11.05 12.19 12.75 13.85 10.07 16.51 22.81 16.51 23.67 16.5 23.69 18.91 10.04 18.91 12.71 21.57 11.05 23.27 5.5 17.73 11.05 12.19" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "column" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "column"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Column" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "20.45", width: "3.67", height: "16.42", transform: "translate(-10.66 46.66) rotate(-90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "23.54 11.05 21.88 12.75 19.21 10.07 19.21 22.81 19.22 23.67 16.82 23.69 16.81 10.04 14.16 12.71 12.46 11.05 18 5.5 23.54 11.05" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexDirection == undefined ? "bg-[#5655ff]" : wrapper.styles.flexDirection[breakPointX] == "column-reverse" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexDirection", "column-reverse"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Column-reverse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "5.5", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "-0.87", width: "3.67", height: "16.42", transform: "translate(25.34 -10.66) rotate(90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "12.46 24.95 14.13 23.25 16.79 25.93 16.79 13.19 16.78 12.33 19.18 12.31 19.19 25.95 21.84 23.29 23.54 24.95 18 30.5 12.46 24.95" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 block" }, "Flex Wrap"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!grid !grid-cols-4 place-items-center gap-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexWrap == undefined ? "bg-[#5655ff]" : wrapper.styles.flexWrap[breakPointX] == "wrap" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexWrap", "wrap"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "6.08", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "1.95", width: "3.67", height: "25", transform: "translate(32.45 -3.55) rotate(90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "16.79 18.15 15.81 19.11 17.35 20.65 6.01 20.65 5.51 20.64 5.5 22.03 17.37 22.03 15.83 23.56 16.79 24.54 19.99 21.35 16.79 18.15" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexWrap == undefined ? "bg-[#5655ff]" : wrapper.styles.flexWrap[breakPointX] == "wrap-reverse" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexWrap", "wrap-reverse"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "Wrap Reverse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "6.08", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "10.21", width: "3.67", height: "25", transform: "translate(40.71 4.71) rotate(90)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("polygon", { fill: "#fff", points: "8.7 19.01 9.68 18.05 8.14 16.51 19.48 16.51 19.98 16.51 19.99 15.13 8.12 15.12 9.66 13.6 8.7 12.61 5.5 15.81 8.7 19.01" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: `hover:bg-[#3737c7] cursor-pointer h-[50px] w-[50px] ${wrapper.styles.flexWrap == undefined ? "bg-[#5655ff]" : wrapper.styles.flexWrap[breakPointX] == "nowrap" ? "bg-[#1f1f8b]" : "bg-[#5655ff]"}`, onClick: ev => { applyFlex("flexWrap", "nowrap"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Tooltip, { text: "No Wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#5655ff", x: "5.5", y: "6.08", width: "25", height: "25" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("rect", { fill: "#fff", x: "16.16", y: "5.5", width: "3.67", height: "25", transform: "translate(36) rotate(90)" })))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Menu Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Menu Wrap Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: menuWrap.options.class, onChange: newVal => { var options = { ...menuWrap.options, class: newVal }; setAttributes({ menuWrap: { ...menuWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: menuWrap, onChange: onChangeStyleMenuWrap, onAdd: onAddStyleMenuWrap, onRemove: onRemoveStyleMenuWrap, onBulkAdd: onBulkAddMenuWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Sub MenuWrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Sub Menu Wrap Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: subMenuWrap.options.class, onChange: newVal => { var options = { ...subMenuWrap.options, class: newVal }; setAttributes({ subMenuWrap: { ...subMenuWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: subMenuWrap, onChange: onChangeStyleSubMenuWrap, onAdd: onAddStyleSubMenuWrap, onRemove: onRemoveStyleSubMenuWrap, onBulkAdd: onBulkAddSubMenuWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Link", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: link, onChange: onChangeStyleLink, onAdd: onAddStyleLink, onRemove: onRemoveStyleLink, onBulkAdd: onBulkAddLink })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_19__["default"], { blockName: "menu-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "menu-wrap" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/menu-wrap-item", { wrapper: { options: { tag: "div", class: "flex-item-wrap" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }], ["post-grid/menu-wrap-item", { wrapper: { options: { tag: "div", class: "flex-item-wrap" }, styles: { flexBasis: { Desktop: "0" }, flexGrow: { Desktop: "1" } } } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_24__["default"], { blockName: "menu-wrap", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("ul", { className: menuWrap.options.class }, innerBlocksProps.children)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/menu-wrap/variations.js": /*!********************************************!*\ !*** ./src/blocks/menu-wrap/variations.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)('isProFeature', true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: '1-column', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('1 Col'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('1 Col'), isDefault: true, isPro: false, atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }, { name: '2-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('2-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('2-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "119.78", width: "32.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "79.58", width: "72.71", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "72.71", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'] }, { name: '3-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('3-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('3-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "99.24", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "106.1", width: "46.18", height: "82.57" })) }, { name: '4-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('4-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('4-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "32.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "40.21", width: "31.66", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "80.41", width: "31.66", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "120.62", width: "31.66", height: "82.57" })) }, { name: '5-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('5-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('5-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "31.7", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "63.4", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "95.09", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "126.79", width: "25.5", height: "82.57" })) }, { name: '33-66', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('33-66'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('33-66'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "33%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "66%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "99.24", height: "82.57" })) }, { name: '66-33', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('66-33'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('66-33'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "66%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "33%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "99.24", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "106.1", width: "46.18", height: "82.57" })) }, { name: '25-50-25', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-50-25'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-50-25'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "50%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })) }, { name: '25-25-50', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-25-50'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-25-50'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "50%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "31.29", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "38.16", width: "31.29", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "76.33", width: "75.96", height: "82.57" })) }, { name: '50-25-25', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('50-25-25'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('50-25-25'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "50%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/menu-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "pg-menu-wrap-item" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "120.99", width: "31.29", height: "82.57", transform: "translate(273.28 82.57) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "82.83", width: "31.29", height: "82.57", transform: "translate(196.95 82.57) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "75.96", height: "82.57", transform: "translate(75.96 82.57) rotate(180)" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/number-counter/index.js": /*!********************************************!*\ !*** ./src/blocks/number-counter/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_i18n__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/number-counter/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.6278 32.4219V63.2791H9.80766V38.6144H9.56322L0.00976562 43.0441V37.2584L10.3373 32.4219H18.6278Z", fill: "url(#paint0_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M41.8188 63.2791V58.5782L56.6685 48.408C57.9314 47.5039 58.9906 46.6903 59.8461 45.9671C60.7153 45.2439 61.3739 44.5357 61.822 43.8427C62.2702 43.1395 62.4942 42.3812 62.4942 41.5675C62.4942 40.6635 62.2158 39.8851 61.6591 39.2322C61.1023 38.5692 60.3418 38.062 59.3776 37.7104C58.4135 37.3488 57.3203 37.168 56.0981 37.168C54.8216 37.168 53.708 37.3588 52.7574 37.7405C51.8069 38.1222 51.0735 38.6697 50.5575 39.3828C50.0415 40.096 49.7835 40.9448 49.7835 41.9291H41.4115C41.4115 39.9102 42.0293 38.1574 43.2651 36.6708C44.5009 35.1842 46.2323 34.034 48.4594 33.2204C50.6865 32.4068 53.2531 32 56.1592 32C59.1468 32 61.7473 32.3917 63.9609 33.1752C66.188 33.9487 67.9194 35.0234 69.1552 36.3996C70.3909 37.7757 71.0088 39.3527 71.0088 41.1306C71.0088 42.2958 70.6965 43.4459 70.0718 44.5809C69.4607 45.716 68.3675 46.9766 66.7923 48.3628C65.217 49.7389 62.9967 51.3912 60.1313 53.3198L54.0407 57.7344V57.9454H71.5588V63.2791H41.8188Z", fill: "url(#paint1_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M91.2259 63.2791V58.5782L106.075 48.408C107.338 47.5039 108.398 46.6903 109.253 45.9671C110.122 45.2439 110.781 44.5357 111.229 43.8427C111.677 43.1395 111.901 42.3812 111.901 41.5675C111.901 40.6635 111.623 39.8851 111.066 39.2322C110.509 38.5692 109.749 38.062 108.785 37.7104C107.82 37.3488 106.727 37.168 105.505 37.168C104.229 37.168 103.115 37.3588 102.164 37.7405C101.214 38.1222 100.481 38.6697 99.9645 39.3828C99.4485 40.096 99.1905 40.9448 99.1905 41.9291H90.8185C90.8185 39.9102 91.4364 38.1574 92.6721 36.6708C93.9079 35.1842 95.6393 34.034 97.8664 33.2204C100.094 32.4068 102.66 32 105.566 32C108.554 32 111.154 32.3917 113.368 33.1752C115.595 33.9487 117.326 35.0234 118.562 36.3996C119.798 37.7757 120.416 39.3527 120.416 41.1306C120.416 42.2958 120.104 43.4459 119.479 44.5809C118.868 45.716 117.775 46.9766 116.199 48.3628C114.624 49.7389 112.404 51.3912 109.538 53.3198L103.448 57.7344V57.9454H120.966V63.2791H91.2259Z", fill: "url(#paint2_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.6138 60.0787V101.799H9.79313V68.4512H9.54868L-0.00537109 74.4403V66.6178L10.3228 60.0787H18.6138Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M41.8063 101.799V95.4429L56.6569 81.6924C57.9199 80.4702 58.9792 79.3701 59.8348 78.3923C60.7039 77.4145 61.3626 76.4571 61.8108 75.52C62.2589 74.5693 62.483 73.544 62.483 72.444C62.483 71.2217 62.2046 70.1692 61.6478 69.2864C61.091 68.3901 60.3305 67.7043 59.3662 67.229C58.402 66.74 57.3087 66.4956 56.0865 66.4956C54.8099 66.4956 53.6963 66.7536 52.7456 67.2697C51.795 67.7858 51.0616 68.5259 50.5455 69.4901C50.0295 70.4544 49.7714 71.6019 49.7714 72.9329H41.3989C41.3989 70.2031 42.0168 67.8333 43.2527 65.8233C44.4885 63.8134 46.2201 62.2584 48.4473 61.1584C50.6746 60.0583 53.2413 59.5083 56.1476 59.5083C59.1354 59.5083 61.7361 60.0379 63.9497 61.0972C66.177 62.143 67.9085 63.5961 69.1444 65.4567C70.3802 67.3172 70.9981 69.4494 70.9981 71.8532C70.9981 73.4286 70.6858 74.9836 70.0611 76.5182C69.4499 78.0528 68.3567 79.7572 66.7813 81.6313C65.2059 83.4919 62.9855 85.7259 60.12 88.3334L54.029 94.3022V94.5873H71.5482V101.799H41.8063Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M106.637 102.369C103.595 102.369 100.886 101.846 98.5093 100.801C96.1463 99.7412 94.2789 98.2881 92.9072 96.4411C91.5492 94.5806 90.8498 92.4348 90.809 90.0038H99.6908C99.7452 91.0224 100.078 91.9187 100.689 92.6928C101.314 93.4534 102.142 94.0441 103.174 94.4651C104.206 94.8861 105.368 95.0966 106.658 95.0966C108.002 95.0966 109.191 94.859 110.223 94.3836C111.255 93.9083 112.063 93.2496 112.647 92.4076C113.231 91.5656 113.523 90.5946 113.523 89.4946C113.523 88.381 113.21 87.3963 112.586 86.5408C111.975 85.6716 111.092 84.9926 109.938 84.5036C108.797 84.0147 107.439 83.7703 105.863 83.7703H101.972V77.2923H105.863C107.194 77.2923 108.369 77.0614 109.387 76.5997C110.42 76.1379 111.221 75.4996 111.791 74.6848C112.362 73.8564 112.647 72.8921 112.647 71.7921C112.647 70.7464 112.396 69.8297 111.893 69.042C111.404 68.2407 110.712 67.616 109.815 67.1678C108.933 66.7197 107.9 66.4956 106.719 66.4956C105.524 66.4956 104.431 66.7129 103.439 67.1475C102.448 67.5685 101.653 68.1728 101.056 68.9605C100.458 69.7482 100.139 70.6717 100.098 71.731H91.6442C91.685 69.3272 92.3708 67.2086 93.7017 65.3752C95.0326 63.5418 96.8253 62.109 99.0797 61.0769C101.348 60.0312 103.908 59.5083 106.76 59.5083C109.639 59.5083 112.158 60.0312 114.317 61.0769C116.477 62.1226 118.154 63.535 119.349 65.3141C120.558 67.0796 121.155 69.0624 121.142 71.2624C121.155 73.5983 120.429 75.5472 118.962 77.1089C117.509 78.6707 115.614 79.6621 113.278 80.0831V80.4091C116.348 80.8029 118.684 81.869 120.286 83.6073C121.902 85.3321 122.703 87.4914 122.69 90.0853C122.703 92.462 122.018 94.5738 120.632 96.4207C119.261 98.2677 117.366 99.7209 114.949 100.78C112.531 101.839 109.761 102.369 106.637 102.369Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.6243 97.1372V127.994H9.80581V103.33H9.56142L0.00976562 107.759V101.974L10.3353 97.1372H18.6243Z", fill: "url(#paint3_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M41.811 127.994V123.294L56.6578 113.123C57.9205 112.219 58.9795 111.406 59.8349 110.682C60.7038 109.959 61.3623 109.251 61.8104 108.558C62.2584 107.855 62.4825 107.096 62.4825 106.283C62.4825 105.379 62.2041 104.6 61.6474 103.947C61.0908 103.285 60.3304 102.777 59.3665 102.426C58.4025 102.064 57.3095 101.883 56.0875 101.883C54.8113 101.883 53.6979 102.074 52.7475 102.456C51.7971 102.838 51.0639 103.385 50.548 104.098C50.032 104.811 49.7741 105.66 49.7741 106.644H41.4037C41.4037 104.626 42.0214 102.873 43.257 101.386C44.4925 99.8995 46.2236 98.7494 48.4503 97.9358C50.677 97.1221 53.2431 96.7153 56.1486 96.7153C59.1356 96.7153 61.7357 97.1071 63.9488 97.8906C66.1755 98.664 67.9066 99.7388 69.1421 101.115C70.3777 102.491 70.9954 104.068 70.9954 105.846C70.9954 107.011 70.6832 108.161 70.0586 109.296C69.4476 110.431 68.3547 111.692 66.7797 113.078C65.2047 114.454 62.9848 116.107 60.12 118.035L54.0306 122.45V122.661H71.5453V127.994H41.811Z", fill: "url(#paint4_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M90.5773 122.57V117.432L107.99 97.1372H113.978V104.249H110.434L99.4569 117.101V117.342H124.202V122.57H90.5773ZM110.597 127.994V121.003L110.76 118.728V97.1372H119.029V127.994H110.597Z", fill: "url(#paint5_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M136.835 74.7634C137.417 75.2246 138.264 75.1268 138.725 74.5427L141.984 70.4177L146.818 64.9989L146.818 98.8374C146.818 99.5811 147.421 100.183 148.164 100.183C148.907 100.183 149.509 99.5811 149.509 98.8374L149.509 65.3371L157.631 74.7383C158.116 75.2999 158.966 75.3636 159.529 74.8774C160.091 74.3911 160.153 73.5415 159.667 72.979L149.071 60.7141C148.818 60.4208 148.451 60.2512 148.063 60.2476C148.06 60.2476 148.056 60.2476 148.052 60.2476C147.668 60.2476 147.303 60.4109 147.049 60.6971L139.924 68.6871L136.614 72.8731C136.153 73.4563 136.251 74.3023 136.835 74.7634Z", fill: "url(#paint6_linear_61_780)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_780", x1: "-2.90313", y1: "47.8369", x2: "124.054", y2: "47.8369", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64", "stop-opacity": "0.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42", "stop-opacity": "0.62" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_780", x1: "-2.90313", y1: "47.8369", x2: "124.054", y2: "47.8369", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64", "stop-opacity": "0.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42", "stop-opacity": "0.62" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_780", x1: "-2.90313", y1: "47.8369", x2: "124.054", y2: "47.8369", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64", "stop-opacity": "0.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42", "stop-opacity": "0.62" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_780", x1: "-2.90258", y1: "112.552", x2: "126.804", y2: "112.552", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64", "stop-opacity": "0.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42", "stop-opacity": "0.62" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_780", x1: "-2.90258", y1: "112.552", x2: "126.804", y2: "112.552", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64", "stop-opacity": "0.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42", "stop-opacity": "0.62" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_780", x1: "-2.90258", y1: "112.552", x2: "126.804", y2: "112.552", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64", "stop-opacity": "0.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42", "stop-opacity": "0.62" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_780", x1: "159.995", y1: "80.2154", x2: "136.323", y2: "80.2154", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let numberCount = attributes.numberCount; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [commentCountEdited, setcommentCountEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(numberCount.options.start); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var commentCountSelector = blockClass + " .number-count"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const iconSelector = blockClass + " .number-count-icon"; var numberCounterIconPositionBasic = { none: { label: "Choose Position", value: "" }, beforePrefix: { label: "Before Prefix", value: "beforePrefix" }, afterPrefix: { label: "After Prefix", value: "afterPrefix", isPro: true }, beforePostfix: { label: "Before PostFix", value: "beforePostfix", isPro: true }, afterPostfix: { label: "After PostFix", value: "afterPostfix", isPro: true } }; let iconPositionArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("postGridNumberCounterIconPosition", numberCounterIconPositionBasic); function setIconPosition(option, index) { var options = { ...icon.options, position: option.value }; setAttributes({ icon: { ...icon, options: options } }); } const counterAnim = (qSelector, start = 0, end, duration = 1000) => { const target = document.querySelector(qSelector); let startTimestamp = null; const step = timestamp => { if (!startTimestamp) startTimestamp = timestamp; const progress = Math.min((timestamp - startTimestamp) / duration, 1); var numberX = progress * (end - start) + start; if (Number.isInteger(end)) { if (target != null) { target.innerText = Math.floor(numberX); } } else { target.innerText = Number(numberX).toFixed(2); } if (progress < 1) { window.requestAnimationFrame(step); } }; window.requestAnimationFrame(step); }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var start = parseInt(numberCount.options.start); var end = Number.isInteger(numberCount.options.end) ? parseInt(numberCount.options.end) : parseFloat(numberCount.options.end); var duration = parseInt(numberCount.options.duration); counterAnim(commentCountSelector, start, end, duration); }, [numberCount]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [numberCount]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[commentCountSelector] = numberCount; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var numberCountX = attributes.numberCount; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (numberCountX != undefined) { var numberCountY = { ...numberCountX, options: numberCount.options }; setAttributes({ numberCount: numberCountY }); blockCssObj[numberCountSelector] = numberCountY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryCommentCount(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; numberCount[sudoScource] = sudoScourceArgs; }); var commentCountX = Object.assign({}, numberCount); setAttributes({ numberCount: commentCountX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleCommentCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, numberCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ numberCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCommentCount(sudoScource, key) { var object = myStore.deletePropertyDeep(numberCount, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCommentCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, numberCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ numberCount: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddNumberCount(sudoScource, cssObj) { let obj = Object.assign({}, numberCount); obj[sudoScource] = cssObj; setAttributes({ numberCount: obj }); var selector = myStore.getElementSelector(sudoScource, numberCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${numberCount.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Number Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Start?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { type: "number", step: "0.01", className: "mr-2", value: numberCount.options.start, onChange: newVal => { var options = { ...numberCount.options, start: newVal }; setAttributes({ numberCount: { ...numberCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "End?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { type: "number", step: "0.01", className: "mr-2", value: numberCount.options.end, onChange: newVal => { var options = { ...numberCount.options, end: newVal }; setAttributes({ numberCount: { ...numberCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Duration?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { type: "number", className: "mr-2", value: numberCount.options.duration, onChange: newVal => { var options = { ...numberCount.options, duration: newVal }; setAttributes({ numberCount: { ...numberCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "onScroll?", help: numberCount.options.onScroll ? "Play on scroll" : "Play on page load", checked: numberCount.options.onScroll ? true : false, onChange: e => { var options = { ...numberCount.options, onScroll: numberCount.options.onScroll ? false : true }; setAttributes({ numberCount: { ...numberCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: numberCount, onChange: onChangeStyleCommentCount, onAdd: onAddStyleCommentCount, onBulkAdd: onBulkAddNumberCount, onRemove: onRemoveStyleCommentCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: numberCount, onChange: onPickCssLibraryCommentCount })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_13__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_23__["default"], { position: "bottom right", variant: "secondary", options: iconPositionArgs, buttonTitle: icon.options.position.length == 0 ? "Choose" : iconPositionArgs[icon.options.position].label, onChange: setIconPosition, values: [] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onBulkAdd: onBulkAddPrefix, onRemove: onRemoveStylePrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onBulkAdd: onBulkAddPostfix, onRemove: onRemoveStylePostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "number-counter", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "number-counter" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: numberCount.options.class }, commentCountEdited), icon.options.position == "afterCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/popup/index.js": /*!***********************************!*\ !*** ./src/blocks/popup/index.js ***! \***********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./variations */ "./src/blocks/popup/variations.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var animate_css__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../../node_modules/animate.css/animate.css */ "./node_modules/animate.css/animate.css"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./block.json */ "./src/blocks/popup/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_23__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "161", height: "160", viewBox: "0 0 161 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M140.818 145.024H3.46346C1.56434 145.024 -0.00244141 143.458 -0.00244141 141.558V36.252C-0.00244141 34.3529 1.56434 32.7861 3.46346 32.7861H140.818C142.717 32.7861 144.283 34.3529 144.283 36.252V141.558C144.283 143.458 142.717 145.024 140.818 145.024Z", fill: "url(#paint0_linear_61_152)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M142.532 50.0687C152.216 50.0687 160.066 42.2183 160.066 32.5343C160.066 22.8504 152.216 15 142.532 15C132.848 15 124.998 22.8504 124.998 32.5343C124.998 42.2183 132.848 50.0687 142.532 50.0687Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M143.612 32.534L150.205 25.9404C150.497 25.6486 150.497 25.1527 150.205 24.8609C149.913 24.5692 149.417 24.5692 149.126 24.8609L142.532 31.4545L135.938 24.8609C135.647 24.5692 135.151 24.5692 134.859 24.8609C134.567 25.1527 134.567 25.6486 134.859 25.9404L141.453 32.534L134.859 39.1276C134.567 39.4194 134.567 39.9153 134.859 40.2071C135.005 40.353 135.209 40.4405 135.384 40.4405C135.559 40.4405 135.763 40.353 135.909 40.2071L142.503 33.6135L149.096 40.2071C149.242 40.353 149.447 40.4405 149.622 40.4405C149.826 40.4405 150.001 40.353 150.147 40.2071C150.439 39.9153 150.439 39.4194 150.147 39.1276L143.612 32.534Z", fill: "white", stroke: "white", "stroke-width": "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M58.5562 66.9326H13.7328C12.7422 66.9326 11.7921 67.3262 11.0916 68.0267C10.3911 68.7272 9.99756 69.6772 9.99756 70.6679V108.021C9.99756 109.011 10.3911 109.961 11.0916 110.662C11.7921 111.362 12.7422 111.756 13.7328 111.756H58.5562C59.5469 111.756 60.497 111.362 61.1975 110.662C61.898 109.961 62.2915 109.011 62.2915 108.021V70.6679C62.2915 69.6772 61.898 68.7272 61.1975 68.0267C60.497 67.3262 59.5469 66.9326 58.5562 66.9326ZM54.8209 104.285H17.4681V74.4032H54.8209V104.285Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M136.998 78.1382H77.2334V85.6087H136.998V78.1382Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M122.057 93.0791H77.2334V100.55H122.057V93.0791Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_152", x1: "-0.00244141", y1: "88.9052", x2: "144.283", y2: "88.9052", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var closeWrap = attributes.closeWrap; var entranceWrap = attributes.entranceWrap; var inner = attributes.inner; var visible = attributes.visible; var editMode = attributes.editMode; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var closeWrapSelector = blockClass + " .close"; var innerSelector = blockClass + " .inner"; var closeAnimateArgs = { backOutDown: { label: "backOutDown", value: "backOutDown" }, backOutLeft: { label: "backOutLeft", value: "backOutLeft" }, backOutRight: { label: "backOutRight", value: "backOutRight", isPro: true }, backOutUp: { label: "backOutUp", value: "backOutUp", isPro: true }, bounceOut: { label: "bounceOut", value: "bounceOut" }, bounceOutDown: { label: "bounceOutDown", value: "bounceOutDown", isPro: true }, bounceOutLeft: { label: "bounceOutLeft", value: "bounceOutLeft", isPro: true }, bounceOutRight: { label: "bounceOutRight", value: "bounceOutRight", isPro: true }, bounceOutUp: { label: "bounceOutUp", value: "bounceOutUp", isPro: true }, fadeOut: { label: "fadeOut", value: "fadeOut" }, fadeOutDown: { label: "fadeOutDown", value: "fadeOutDown", isPro: true }, fadeOutDownBig: { label: "fadeOutDownBig", value: "fadeOutDownBig", isPro: true }, fadeOutLeft: { label: "fadeOutLeft", value: "fadeOutLeft", isPro: true }, fadeOutLeftBig: { label: "fadeOutLeftBig", value: "fadeOutLeftBig", isPro: true }, fadeOutRight: { label: "fadeOutRight", value: "fadeOutRight", isPro: true }, fadeOutRightBig: { label: "fadeOutRightBig", value: "fadeOutRightBig", isPro: true }, fadeOutUp: { label: "fadeOutUp", value: "fadeOutUp", isPro: true }, fadeOutUpBig: { label: "fadeOutUpBig", value: "fadeOutUpBig", isPro: true }, fadeOutTopLeft: { label: "fadeOutTopLeft", value: "fadeOutTopLeft", isPro: true }, fadeOutTopRight: { label: "fadeOutTopRight", value: "fadeOutTopRight", isPro: true }, fadeOutBottomRight: { label: "fadeOutBottomRight", value: "fadeOutBottomRight", isPro: true }, fadeOutBottomLeft: { label: "fadeOutBottomLeft", value: "fadeOutBottomLeft", isPro: true }, rotateOut: { label: "rotateOut", value: "rotateOut" }, rotateOutDownLeft: { label: "rotateOutDownLeft", value: "rotateOutDownLeft", isPro: true }, rotateOutDownRight: { label: "rotateOutDownRight", value: "rotateOutDownRight", isPro: true }, rotateOutUpLeft: { label: "rotateOutUpLeft", value: "rotateOutUpLeft", isPro: true }, rotateOutUpRight: { label: "rotateOutUpRight", value: "rotateOutUpRight", isPro: true }, zoomOut: { label: "zoomOut", value: "zoomOut", isPro: true }, zoomOutDown: { label: "zoomOutDown", value: "zoomOutDown", isPro: true }, zoomOutLeft: { label: "zoomOutLeft", value: "zoomOutLeft", isPro: true }, zoomOutRight: { label: "zoomOutRight", value: "zoomOutRight", isPro: true }, zoomOutUp: { label: "zoomOutUp", value: "zoomOutUp", isPro: true }, slideOutDown: { label: "slideOutDown", value: "slideOutDown", isPro: true }, slideOutLeft: { label: "slideOutLeft", value: "slideOutLeft", isPro: true }, slideOutRight: { label: "slideOutRight", value: "slideOutRight", isPro: true }, slideOutUp: { label: "slideOutUp", value: "slideOutUp", isPro: true } }; var entranceAnimateArgs = { backInDown: { label: "backInDown", value: "backInDown" }, backInLeft: { label: "backInLeft", value: "backInLeft" }, backInRight: { label: "backInRight", value: "backInRight", isPro: true }, backInUp: { label: "backInUp", value: "backInUp", isPro: true }, bounceIn: { label: "bounceIn", value: "bounceIn" }, bounceInDown: { label: "bounceInDown", value: "bounceInDown", isPro: true }, bounceInLeft: { label: "bounceInLeft", value: "bounceInLeft", isPro: true }, bounceInRight: { label: "bounceInRight", value: "bounceInRight", isPro: true }, bounceInUp: { label: "bounceInUp", value: "bounceInUp", isPro: true }, fadeIn: { label: "fadeIn", value: "fadeIn" }, fadeInDown: { label: "fadeInDown", value: "fadeInDown", isPro: true }, fadeInDownBig: { label: "fadeInDownBig", value: "fadeInDownBig", isPro: true }, fadeInLeft: { label: "fadeInLeft", value: "fadeInLeft", isPro: true }, fadeInLeftBig: { label: "fadeInLeftBig", value: "fadeInLeftBig", isPro: true }, fadeInRight: { label: "fadeInRight", value: "fadeInRight", isPro: true }, fadeInRightBig: { label: "fadeInRightBig", value: "fadeInRightBig", isPro: true }, fadeInUp: { label: "fadeInUp", value: "fadeInUp", isPro: true }, fadeInUpBig: { label: "fadeInUpBig", value: "fadeInUpBig", isPro: true }, fadeInTopLeft: { label: "fadeInTopLeft", value: "fadeInTopLeft", isPro: true }, fadeInTopRight: { label: "fadeInTopRight", value: "fadeInTopRight", isPro: true }, fadeInBottomRight: { label: "fadeInBottomRight", value: "fadeInBottomRight", isPro: true }, fadeInBottomLeft: { label: "fadeInBottomLeft", value: "fadeInBottomLeft", isPro: true }, rotateIn: { label: "rotateIn", value: "rotateIn" }, rotateInDownLeft: { label: "rotateInDownLeft", value: "rotateInDownLeft", isPro: true }, rotateInDownRight: { label: "rotateInDownRight", value: "rotateInDownRight", isPro: true }, rotateInUpLeft: { label: "rotateInUpLeft", value: "rotateInUpLeft", isPro: true }, rotateInUpRight: { label: "rotateInUpRight", value: "rotateInUpRight", isPro: true }, zoomIn: { label: "zoomIn", value: "zoomIn", isPro: true }, zoomInDown: { label: "zoomInDown", value: "zoomInDown", isPro: true }, zoomInLeft: { label: "zoomInLeft", value: "zoomInLeft", isPro: true }, zoomInRight: { label: "zoomInRight", value: "zoomInRight", isPro: true }, zoomInUp: { label: "zoomInUp", value: "zoomInUp", isPro: true }, slideInDown: { label: "slideInDown", value: "slideInDown", isPro: true }, slideInLeft: { label: "slideInLeft", value: "slideInLeft", isPro: true }, slideInRight: { label: "slideInRight", value: "slideInRight", isPro: true }, slideInUp: { label: "slideInUp", value: "slideInUp", isPro: true } }; var visibleArgsBasic = { initial: { label: "Initial", description: "Visble as soon as possible", args: { id: "initial", value: 5 } }, delay: { label: "Delay", description: "Delay certain amount of time after page load.", args: { id: "delay", value: 1000 } }, scrollParcent: { label: "Scroll Parcent", description: "After certain amount(parcent) of scroll", args: { id: "scrollParcent", min: "30", max: 50 }, isPro: true }, scrollFixed: { label: "Scroll Fixed", description: "After fixed amount of scroll", args: { id: "scrollFixed", min: "30", max: 50 }, isPro: true }, scrollEnd: { label: "Scroll End", description: "Scroll to end of page", args: { id: "scrollEnd", min: "30", max: 50 }, isPro: true }, scrollElement: { label: "Scroll Element", description: "Scroll to certain element by class or id", args: { id: "scrollElement", value: "" }, isPro: true }, clickFirst: { label: "Click First", description: "After first click on page", args: { id: "clickFirst", value: 1 }, isPro: true }, clickCount: { label: "Click Count", description: "After certain amount of click on page", args: { id: "clickCount", value: 5 }, isPro: true }, clickRight: { label: "Click Right", description: "on right click", args: { id: "clickRight", value: 0 }, isPro: true }, onExit: { label: "On Exit", description: "before close browser tab.", args: { id: "onExit", value: 1 }, isPro: true }, clickElement: { label: "Click Element", description: "After click an element by id or class", args: { id: "clickElement", value: "" }, isPro: true }, dateCountdownExpired: { label: "Date Countdown Expired", description: "After expired from date countdown block", args: { id: "dateCountdownExpired", value: "", once: false }, isPro: true }, // onHover: { label: 'On Hover', description: 'Display popup on hover an element', args: { id: 'onHover', value: '' }, isPro: true }, // isDevice: { label: 'Device', description: 'Display popup based on device', args: { id: 'isDevice', value: '' }, isPro: true }, // isDate: { label: 'Is Date', description: 'Display popup based on date', args: { id: 'isDate', value: '', start: '', end: '' }, isPro: true }, // visitCount: { label: 'Visit Count', description: 'Display popup based on date', args: { id: 'visitCount', value: '', compair: '' }, isPro: true }, // isCountries: { label: 'Is Country', description: 'Display popup based on countries', args: { id: 'isCountries', value: '' }, isPro: true }, // isBrowsers: { label: 'Is browsers', description: 'Display popup based on browsers', args: { id: 'isBrowsers', value: '' }, isPro: true }, cookieExist: { label: "Cookie Exist", description: "If certain cookie exist", args: { id: "cookieExist", value: "" }, isPro: true }, cookieNotExist: { label: "Cookie Not Exist", description: "If certain cookie not exist", args: { id: "cookieNotExist", value: "" }, isPro: true }, userLogged: { label: "User Logged", description: "Show when user logged-in(any user)", args: { id: "userLogged", value: "" }, isPro: true }, userIds: { label: "User Ids", description: "If user with certain id loggedin", args: { id: "userIds", value: "" }, isPro: true }, // userRoles: { label: 'User Roles', description: 'Show when user has specific roles.', args: { id: 'userRoles', value: '' } }, // userCapabilities: { label: 'User Capability', description: 'Show when user has specific capability.', args: { id: 'userCapabilities', Capabilities: [] } }, // weekDays: { label: 'is Date', description: 'Show when specific week days', args: { id: 'weekDays', days: [] } }, // isMonths: { label: 'is Months', description: 'Show when specific months', args: { id: 'isMonths', months: [] } }, // isHours: { label: 'is Hours', description: 'Show when specific isHours', args: { id: 'isHours', hours: [] } }, // postsIds: { label: 'Post Ids', description: 'Display popups on single post/page by ids', args: { id: 'postsIds', value: '' }, }, // termIds: { label: 'Term Ids', description: 'Display popups on terms page by ids', args: { id: 'postsIds', value: '' }, }, // authorIds: { label: 'Author Ids', description: 'Display popups on author page by ids', args: { id: 'postsIds', value: '' }, }, // homePage: { label: 'Is Home', description: 'Display popups on home page', args: { id: 'homePage', value: '' }, }, // frontPage: { label: 'Is Home', description: 'Display popups on home page', args: { id: 'frontPage', value: '' }, }, // postsPage: { label: 'Is Posts Page', description: 'Display popups on blog page', args: { id: 'postsPage', value: '' }, }, // isDate: { label: 'Is Date Page', description: 'Display popups on date archive page', args: { id: 'isDate', value: '' }, }, // isMonth: { label: 'Is Date Page', description: 'Display popups on month archive page', args: { id: 'isMonth', value: '' }, }, // isYear: { label: 'Is Date Page', description: 'Display popups on year archive page', args: { id: 'isYear', value: '' }, }, // is404: { label: 'Is Date Page', description: 'Display popups on 404 archive page', args: { id: 'is404', value: '' }, }, // wcAccount: { label: 'Is WooCommerce Account', description: 'Display popups on WooCommerce my account page', args: { id: 'wcAccount', value: '' }, }, // wcShop: { label: 'Is WooCommerce Shop', description: 'Display popups on WooCommerce shop page', args: { id: 'wcShop', value: '' }, }, // searchPage: { label: 'Is Search page', description: 'Display popups on search page', args: { id: 'searchPage', value: '' }, }, urlPrams: { label: "URL Prams", description: "If URL contain certain parameter(ex: domain.com/some-page?urlPram=pramVal)", args: { id: "urlPrams", value: "" }, isPro: true }, referrerExist: { label: "Referrer Exist", description: "if visitor come from external website.", args: { id: "referrerExist", value: "" }, isPro: true } }; let visibleArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("visibleArgs", visibleArgsBasic); const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.store).getBlocks(clientId).length > 0, [clientId]); const [closeIconHtml, setcloseIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = closeWrap.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setcloseIconHtml(iconHtml); }, [closeWrap.options]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); // blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'display': { "Desktop": "grid" } }; // blockCssY.items[wrapperSelector] = { ...blockCssY.items[wrapperSelector], 'gap': { "Desktop": "20px" } }; // setAttributes({ blockCssY: { items: blockCssY.items } }); //setAttributes({ wrapper: { ...wrapper, styles: { display: { Desktop: 'grid' }, gap: { Desktop: '20px' } } } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[closeWrapSelector] = closeWrap; blockCssObj[innerSelector] = inner; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var innerX = attributes.inner; var closeWrapX = attributes.closeWrap; var visibleX = attributes.visible; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (visibleX != undefined) { var visibleY = { ...visibleX, options: visible.options }; setAttributes({ visible: visibleY }); blockCssObj[visibleSelector] = visibleY; } if (closeWrapX != undefined) { var closeWrapY = { ...closeWrapX, options: closeWrap.options }; setAttributes({ closeWrap: closeWrapY }); blockCssObj[closeWrapSelector] = closeWrapY; } if (innerX != undefined) { var innerY = { ...innerX, options: inner.options }; setAttributes({ inner: innerY }); blockCssObj[innerSelector] = innerY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleInner(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, inner); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ inner: object }); var elementSelector = myStore.getElementSelector(sudoScource, innerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleInner(sudoScource, key) { var object = myStore.deletePropertyDeep(inner, [sudoScource, key, breakPointX]); setAttributes({ inner: object }); var elementSelector = myStore.getElementSelector(sudoScource, innerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleInner(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, inner); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ inner: object }); } function onBulkAddInner(sudoScource, cssObj) { let obj = Object.assign({}, inner); obj[sudoScource] = cssObj; setAttributes({ inner: obj }); var selector = myStore.getElementSelector(sudoScource, innerSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleCloseWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, closeWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ closeWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, closeWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCloseWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(closeWrap, [sudoScource, key, breakPointX]); setAttributes({ closeWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, closeWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCloseWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, closeWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ closeWrap: object }); } function onBulkAddCloseWrap(sudoScource, cssObj) { let obj = Object.assign({}, closeWrap); obj[sudoScource] = cssObj; setAttributes({ closeWrap: obj }); var selector = myStore.getElementSelector(sudoScource, closeWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetCloseWrap(sudoScources) { let obj = Object.assign({}, closeWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, closeWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ closeWrap: obj }); } function onResetInner(sudoScources) { let obj = Object.assign({}, inner); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, innerSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ inner: obj }); } var RemoveVisibleGroup = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var visibleX = { ...visible }; delete visibleX[index]; setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; var RemoveVisibleArg = function ({ title, index, groupId }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer inline-block hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var visibleX = { ...visible }; visibleX[groupId].args.splice(index, 1); setAttributes({ visible: visibleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, title)); }; const ALLOWED_BLOCKS = ["post-grid/text"]; const MY_TEMPLATE = [["post-grid/text", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, //orientation: 'horizontal', templateInsertUpdatesSelection: true, renderAppender: _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Edit Mode?", help: editMode ? "Edit Mode Enabled" : "Edit Mode Disabled.", checked: editMode ? true : false, onChange: e => { setAttributes({ editMode: editMode ? false : true }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Visibility", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className="bg-blue-500 p-2 px-4 text-white inline-block cursor-pointer rounded-sm" className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var visibleX = { ...visible }; var index = Object.entries(visibleX).length; visibleX[index] = { logic: "OR", title: "", args: [] }; setAttributes({ visible: visibleX }); } }, "Add Group"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, Object.entries(visible).map((group, groupIndex) => { var groupId = group[0]; var groupData = group[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleGroup, { title: groupIndex, index: groupId }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Add Condition", options: visibleArgs, onChange: (option, index) => { var visibleX = { ...visible }; visibleX[groupId]["args"].push(option.args); setAttributes({ visible: visibleX }); }, values: "" })), visible[groupId]["args"] != undefined && visible[groupId]["args"].map((item, index) => { var id = item.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, id == "initial" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "delay" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4 flex-col items-start gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Element ID/Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: ".element or #elementId", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "scrollParcent" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Scroll Minimum"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.min, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].min = newVal; setAttributes({ visible: visibleX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Scroll Max"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.max, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].max = newVal; setAttributes({ visible: visibleX }); } }))), id == "scrollFixed" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Scroll Minimum"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.min, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].min = newVal; setAttributes({ visible: visibleX }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Scroll Max"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.max, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].max = newVal; setAttributes({ visible: visibleX }); } }))), id == "scrollEnd" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "scrollElement" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Element Class/ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "clickFirst" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "clickCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Click Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "clickRight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Disabled right menu?", help: item.value ? "Right Menu Disabled " : "Right Menu Enabled.", checked: item.value ? true : false, onChange: e => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = item.value ? 0 : 1; setAttributes({ visible: visibleX }); } })), id == "onExit" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "clickElement" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4 flex-col items-start gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Element ID/Class", "post-grid")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: ".element or #elementId", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "dateCountdownExpired" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Is Once?", className: "my-4", help: item.once ? "IsOnce is Enable" : "IsOnce is disabled.", checked: item.once ? true : false, onChange: e => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].once = item.once ? 0 : 1; setAttributes({ visible: visibleX }); } })), id == "cookieExist" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Cookie Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "cookieNotExist" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Cookie Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "userLogged" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "No Option available for this condition.")), id == "userIds" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "User IDs"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: "1,2,3", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "urlPrams" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "URL Parameter"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } }))), id == "referrerExist" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveVisibleArg, { title: visibleArgs[id] == undefined ? id : visibleArgs[id].label, index: index, groupId: groupIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Referrer Domain"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", value: item.value, onChange: newVal => { var visibleX = { ...visible }; visibleX[groupId]["args"][index].value = newVal; setAttributes({ visible: visibleX }); } })))); })); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_24__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_25__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Inner", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: inner, onChange: onChangeStyleInner, onAdd: onAddStyleInner, onRemove: onRemoveStyleInner, onBulkAdd: onBulkAddInner, onReset: onResetInner })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "In/Out Animation", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Close Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { library: closeWrap.options.library, srcType: closeWrap.options.srcType, iconSrc: closeWrap.options.iconSrc, onChange: arg => { var options = { ...closeWrap.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ closeWrap: { ...closeWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "In animation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: entranceAnimateArgs[entranceWrap.options.animation] == undefined ? "Choose" : entranceAnimateArgs[entranceWrap.options.animation].label, options: entranceAnimateArgs, onChange: (option, index) => { var options = { ...entranceWrap.options, animation: option.value }; setAttributes({ entranceWrap: { ...entranceWrap, options: options } }); const element = document.querySelector(wrapperSelector + " .inner"); element.classList.add("animate__animated", "animate__" + option.value); setTimeout(() => { element.classList.remove("animate__animated", "animate__" + option.value); }, 2000); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Out animation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", buttonTitle: closeAnimateArgs[closeWrap.options.animation] == undefined ? "Choose" : closeAnimateArgs[closeWrap.options.animation].label, options: closeAnimateArgs, onChange: (option, index) => { var options = { ...closeWrap.options, animation: option.value }; setAttributes({ closeWrap: { ...closeWrap, options: options } }); const element = document.querySelector(wrapperSelector + " .inner"); element.classList.add("animate__animated", "animate__" + option.value); setTimeout(() => { element.classList.remove("animate__animated", "animate__" + option.value); }, 2000); }, values: "" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: closeWrap, onChange: onChangeStyleCloseWrap, onAdd: onAddStyleCloseWrap, onRemove: onRemoveStyleCloseWrap, onBulkAdd: onBulkAddCloseWrap, onReset: onResetCloseWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "popup", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_26__["default"], { slug: "popup" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/text", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_27__["default"], { blockName: "popup", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, !editMode && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center inline-block mx-auto", onClick: e => { setAttributes({ editMode: editMode ? false : true }); } }, "Enable Edit Mode"), editMode && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "inner" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "close" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icon", dangerouslySetInnerHTML: { __html: closeIconHtml } })), innerBlocksProps.children)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var wrapper = attributes.wrapper; var blockId = attributes.blockId; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useBlockProps.save({ className: ` ${blockId} pg-popup` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/popup/variations.js": /*!****************************************!*\ !*** ./src/blocks/popup/variations.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "preset-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { backgroundColor: { Desktop: "#9DD6DF" }, position: { Desktop: "fixed" }, top: { Desktop: "30px" }, left: { Desktop: "0px" }, width: { Desktop: "100% !important" }, height: { Desktop: "100% !important" }, maxWidth: { Desktop: "100% !important" }, zIndex: { Desktop: "99" }, borderRadius: {}, padding: { Desktop: "20px 20px 20px 20px" } } }, inner: { options: { tag: "div", class: "" }, styles: { width: { Desktop: "700px" }, height: { Desktop: "400px" }, top: { Desktop: "50%" }, left: { Desktop: "50%" }, position: { Desktop: "absolute" }, transform: { Desktop: "translateX(-50%) translateY(-50%) " }, backgroundColor: { Desktop: "#A084CF" }, padding: { Desktop: "15px 15px 15px 15px" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, overflow: {} } }, closeWrap: { options: { tag: "span", class: "", library: "fontAwesome", srcType: "class", iconSrc: "fas fa-times", animation: "zoomOutLeft" }, styles: { backgroundColor: { Desktop: "#ff6565" }, padding: { Desktop: "8px 15px 7px 15px" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, color: { Desktop: "#ffffff" }, right: { Desktop: "-21px" }, top: { Desktop: "-21px" }, position: { Desktop: "absolute" }, cursor: { Desktop: "pointer" } }, hover: { backgroundColor: { Desktop: "#a82b2b" } } }, entranceWrap: { options: { tag: "span", class: "", library: "fontAwesome", srcType: "class", iconSrc: "fas fa-times", animation: "fadeIn" }, styles: { backgroundColor: { Desktop: "#ff6565" }, padding: { Desktop: "8px 15px 7px 15px" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, color: { Desktop: "#ffffff" }, right: { Desktop: "-21px" }, top: { Desktop: "-21px" }, position: { Desktop: "absolute" }, cursor: { Desktop: "pointer" } }, hover: { backgroundColor: { Desktop: "#a82b2b" } } }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/text", {}]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "16.02", y: "29.98", width: "302.52", height: "201.47", rx: "0.73" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#939598", cx: "318.54", cy: "29.98", r: "25.44" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M320.11,30l9.54-9.54a1.12,1.12,0,0,0,0-1.57,1.1,1.1,0,0,0-1.56,0l-9.55,9.55L309,18.87a1.1,1.1,0,0,0-1.56,0,1.12,1.12,0,0,0,0,1.57L317,30l-9.55,9.55a1.12,1.12,0,0,0,0,1.57,1.13,1.13,0,0,0,.78.32,1.1,1.1,0,0,0,.78-.32l9.55-9.55,9.55,9.55a1.11,1.11,0,1,0,1.56-1.57Z" })) }, { name: "preset-2", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-2"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-2"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { backgroundColor: { Desktop: "#9DD6DF" }, position: { Desktop: "fixed" }, top: { Desktop: "30px" }, left: { Desktop: "0px" }, width: { Desktop: "100% !important" }, height: { Desktop: "100% !important" }, maxWidth: { Desktop: "100% !important" }, zIndex: { Desktop: "99" }, borderRadius: {}, padding: { Desktop: "20px 20px 20px 20px" } } }, inner: { options: { tag: "div", class: "" }, styles: { width: { Desktop: "700px" }, height: { Desktop: "400px" }, top: { Desktop: "50%" }, left: { Desktop: "50%" }, position: { Desktop: "absolute" }, transform: { Desktop: "translateX(-50%) translateY(-50%) " }, backgroundColor: { Desktop: "#A084CF" }, padding: { Desktop: "15px 15px 15px 15px" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, overflow: {} } }, closeWrap: { options: { tag: "span", class: "", library: "fontAwesome", srcType: "class", iconSrc: "fas fa-times", animation: "zoomOutLeft" }, styles: { backgroundColor: { Desktop: "#ff6565" }, padding: { Desktop: "8px 15px 7px 15px" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, color: { Desktop: "#ffffff" }, left: { Desktop: "-21px" }, top: { Desktop: "-21px" }, position: { Desktop: "absolute" }, cursor: { Desktop: "pointer" } }, hover: { backgroundColor: { Desktop: "#a82b2b" } } }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/text", {}]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "41.46", y: "29.98", width: "302.52", height: "201.47", rx: "0.73" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#939598", cx: "41.46", cy: "29.98", r: "25.44" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M43,30l9.55-9.54a1.12,1.12,0,0,0,0-1.57,1.1,1.1,0,0,0-1.56,0l-9.55,9.55-9.55-9.55a1.1,1.1,0,0,0-1.56,0,1.12,1.12,0,0,0,0,1.57L39.89,30l-9.54,9.55a1.11,1.11,0,0,0,1.56,1.57l9.55-9.55L51,41.1a1.1,1.1,0,0,0,.78.32,1.13,1.13,0,0,0,.78-.32,1.12,1.12,0,0,0,0-1.57Z" })) }, { name: "preset-3", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-3"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-3"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { backgroundColor: { Desktop: "#9DD6DF" }, position: { Desktop: "fixed" }, top: { Desktop: "30px" }, left: { Desktop: "0px" }, width: { Desktop: "100% !important" }, height: { Desktop: "100% !important" }, maxWidth: { Desktop: "100% !important" }, zIndex: { Desktop: "99" }, borderRadius: {}, padding: { Desktop: "20px 20px 20px 20px" } } }, inner: { options: { tag: "div", class: "" }, styles: { width: { Desktop: "700px" }, height: { Desktop: "400px" }, top: { Desktop: "50%" }, left: { Desktop: "50%" }, position: { Desktop: "absolute" }, transform: { Desktop: "translateX(-50%) translateY(-50%) " }, backgroundColor: { Desktop: "#A084CF" }, padding: { Desktop: "15px 15px 15px 15px" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, overflow: {} } }, closeWrap: { options: { tag: "span", class: "", library: "fontAwesome", srcType: "class", iconSrc: "fas fa-times", animation: "zoomOutLeft" }, styles: { backgroundColor: { Desktop: "#ff6565" }, padding: { Desktop: "8px 15px 7px 15px" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, color: { Desktop: "#ffffff" }, left: { Desktop: "-21px" }, bottom: { Desktop: "-21px" }, position: { Desktop: "absolute" }, cursor: { Desktop: "pointer" } }, hover: { backgroundColor: { Desktop: "#a82b2b" } } }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/text", {}]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "41.46", y: "4.54", width: "302.52", height: "201.47", rx: "0.73" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#939598", cx: "41.46", cy: "206.02", r: "25.44" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M43,206l9.55-9.55a1.12,1.12,0,0,0,0-1.57,1.1,1.1,0,0,0-1.56,0l-9.55,9.55-9.55-9.55a1.1,1.1,0,0,0-1.56,0,1.12,1.12,0,0,0,0,1.57L39.89,206l-9.54,9.54a1.11,1.11,0,0,0,1.56,1.57l9.55-9.55L51,217.13a1.1,1.1,0,0,0,.78.32,1.13,1.13,0,0,0,.78-.32,1.12,1.12,0,0,0,0-1.57Z" })) }, { name: "preset-4", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-4"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-4"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { backgroundColor: { Desktop: "#9DD6DF" }, position: { Desktop: "fixed" }, top: { Desktop: "30px" }, left: { Desktop: "0px" }, width: { Desktop: "100% !important" }, height: { Desktop: "100% !important" }, maxWidth: { Desktop: "100% !important" }, zIndex: { Desktop: "99" }, borderRadius: {}, padding: { Desktop: "20px 20px 20px 20px" } } }, inner: { options: { tag: "div", class: "" }, styles: { width: { Desktop: "700px" }, height: { Desktop: "400px" }, top: { Desktop: "50%" }, left: { Desktop: "50%" }, position: { Desktop: "absolute" }, transform: { Desktop: "translateX(-50%) translateY(-50%) " }, backgroundColor: { Desktop: "#A084CF" }, padding: { Desktop: "15px 15px 15px 15px" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, overflow: {} } }, closeWrap: { options: { tag: "span", class: "", library: "fontAwesome", srcType: "class", iconSrc: "fas fa-times", animation: "zoomOutLeft" }, styles: { backgroundColor: { Desktop: "#ff6565" }, padding: { Desktop: "8px 15px 7px 15px" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, color: { Desktop: "#ffffff" }, right: { Desktop: "-21px" }, bottom: { Desktop: "-21px" }, position: { Desktop: "absolute" }, cursor: { Desktop: "pointer" } }, hover: { backgroundColor: { Desktop: "#a82b2b" } } }, blockId: "", blockCssY: { items: {} } }, innerBlocks: [["post-grid/text", {}]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 360 236" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#bcbec0", x: "16.02", y: "4.54", width: "302.52", height: "201.47", rx: "0.73" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("circle", { fill: "#939598", cx: "318.54", cy: "206.02", r: "25.44" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M320.11,206l9.54-9.55a1.12,1.12,0,0,0,0-1.57,1.1,1.1,0,0,0-1.56,0l-9.55,9.55L309,194.9a1.1,1.1,0,0,0-1.56,0,1.12,1.12,0,0,0,0,1.57L317,206l-9.55,9.54a1.12,1.12,0,0,0,0,1.57,1.13,1.13,0,0,0,.78.32,1.1,1.1,0,0,0,.78-.32l9.55-9.55,9.55,9.55a1.11,1.11,0,1,0,1.56-1.57Z" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/post-author-fields/index.js": /*!************************************************!*\ !*** ./src/blocks/post-author-fields/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__); /* 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 _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-author-fields/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 26H0V35.4118H160V26Z", fill: "url(#paint0_linear_61_317)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M120 44.8237H0V54.2355H120V44.8237Z", fill: "url(#paint1_linear_61_317)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 93H77V102H160V93Z", fill: "url(#paint2_linear_61_317)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M127.907 112H77V121H127.907V112Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 112H132V121H160V112Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.0325 112.536H20.2042C20.7307 112.536 21.2086 112.744 21.5599 113.083C22.4373 113.787 23.353 114.349 24.2944 114.729C25.1647 115.081 26.065 115.274 26.9853 115.274C27.9055 115.274 28.8058 115.081 29.6761 114.729C30.6603 114.332 31.6163 113.736 32.5299 112.986L33.7663 114.49L32.5271 112.979C32.8908 112.681 33.33 112.536 33.7663 112.536H33.7709H35.9381C40.899 112.536 45.4077 114.564 48.675 117.832C51.9424 121.099 53.9704 125.608 53.9704 130.569V140.216C53.9704 141.295 53.0956 142.17 52.0166 142.17H1.95379C0.874785 142.17 0 141.295 0 140.216V130.569C0 125.608 2.02811 121.099 5.29552 117.832C8.56284 114.564 13.0716 112.536 18.0325 112.536ZM19.5397 116.444H18.0325C14.1502 116.444 10.6194 118.033 8.05834 120.594C5.49725 123.155 3.90759 126.686 3.90759 130.569V138.262H50.0629V130.569C50.0629 126.686 48.4732 123.155 45.9122 120.594C43.3512 118.033 39.8203 116.444 35.938 116.444H34.4308C33.3801 117.237 32.2755 117.883 31.1262 118.347C29.7921 118.885 28.407 119.181 26.9852 119.181C25.5634 119.181 24.1783 118.885 22.8442 118.347C21.6949 117.883 20.5902 117.237 19.5397 116.444Z", fill: "url(#paint3_linear_61_317)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M26.9866 71C32.2264 71 36.9938 72.2788 40.3886 74.9934C43.5569 77.527 45.4914 81.2236 45.4914 86.1887C45.4914 91.5205 43.1555 98.6459 39.4592 104.008C36.214 108.717 31.8729 112.155 26.9867 112.155C22.1005 112.155 17.7593 108.717 14.5142 104.008C10.8178 98.6459 8.48193 91.5206 8.48193 86.1887C8.48193 81.2236 10.4165 77.527 13.5848 74.9934C16.9796 72.2788 21.7469 71 26.9866 71ZM37.9615 78.0311C35.3063 75.9078 31.3919 74.9076 26.9866 74.9076C22.5814 74.9076 18.667 75.9078 16.0118 78.0311C13.7628 79.8295 12.3895 82.5172 12.3895 86.1887C12.3895 90.818 14.4536 97.0567 17.7196 101.795C20.2899 105.524 23.5525 108.247 26.9867 108.247C30.4209 108.247 33.6835 105.524 36.2538 101.795C39.5198 97.0567 41.5839 90.818 41.5839 86.1887C41.5839 82.5172 40.2106 79.8295 37.9616 78.0311H37.9615Z", fill: "url(#paint4_linear_61_317)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_317", x1: "0", y1: "30.7059", x2: "160", y2: "30.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_317", x1: "0", y1: "49.5296", x2: "120", y2: "49.5296", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_317", x1: "77", y1: "97.5", x2: "160", y2: "97.5", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_317", x1: "0", y1: "127.353", x2: "53.9704", y2: "127.353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_317", x1: "8.48193", y1: "91.5773", x2: "45.4914", y2: "91.5773", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/post-author-biography"], transform: attributes => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.createBlock)("post-grid/post-author-fields", { wrapper: { options: { class: "pg-author-fields", tag: "div" }, styles: { display: { Desktop: "block" } } }, field: { options: { linkTo: "authorLink", linkToMeta: "", linkTarget: "", avatarSize: "", dateFormat: "", customUrl: "", prefix: "", postfix: "", linkAttr: [] }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforePostDate", class: "icon" }, styles: { color: { Desktop: "#000000" }, margin: { Desktop: "0px 10px 0px 10px" }, fontSize: { Desktop: "18px" } } }, metaKey: "description", frontText: { options: { text: "Description: ", class: "inline-block" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, prefix: { options: { text: "", class: "prefix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 10px 0px 0px" } } }, postfix: { options: { text: "", class: "postfix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 0px 0px 10px" } } } }); } }, { type: "block", blocks: ["core/post-author-name"], transform: attributes => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.createBlock)("post-grid/post-author-fields", { wrapper: { options: { class: "pg-author-fields", tag: "div" }, styles: { display: { Desktop: "block" } } }, field: { options: { linkTo: attributes.isLink ? "authorLink" : "", linkToMeta: "", linkTarget: attributes.linkTarget, avatarSize: "", dateFormat: "", customUrl: "", prefix: "", postfix: "", linkAttr: [] }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforePostDate", class: "icon" }, styles: { color: { Desktop: "#000000" }, margin: { Desktop: "0px 10px 0px 10px" }, fontSize: { Desktop: "18px" } } }, metaKey: "display_name", frontText: { options: { text: "Author: ", class: "inline-block" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, prefix: { options: { text: "", class: "prefix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 10px 0px 0px" } } }, postfix: { options: { text: "", class: "postfix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 0px 0px 10px" } } } }); } }, { type: "block", blocks: ["core/avatar"], transform: attributes => { console.log(attributes); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.createBlock)("post-grid/post-author-fields", { wrapper: { options: { class: "pg-author-fields", tag: "div" }, styles: { display: { Desktop: "block" } } }, field: { options: { linkTo: attributes.isLink ? "authorLink" : "", linkToMeta: "", linkTarget: attributes.linkTarget, avatarSize: "", dateFormat: "", customUrl: "", prefix: "", postfix: "", linkAttr: [] }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforePostDate", class: "icon" }, styles: { color: { Desktop: "#000000" }, margin: { Desktop: "0px 10px 0px 10px" }, fontSize: { Desktop: "18px" } } }, metaKey: "avatar", frontText: { options: { text: "Avatar: ", class: "inline-block" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, prefix: { options: { text: "", class: "prefix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 10px 0px 0px" } } }, postfix: { options: { text: "", class: "postfix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 0px 0px 10px" } } } }); } }], to: [{ type: "block", blocks: ["core/post-author-biography"], transform: attributes => { var metaKey = attributes.metaKey; if (metaKey !== "description") { // alert("Please select the proper user field!"); return; } if (metaKey == "description") { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.createBlock)("core/post-author-biography", {}); } } }, { type: "block", blocks: ["core/post-author-name"], transform: attributes => { var metaKey = attributes.metaKey; var field = attributes.field.options; if (metaKey !== "display_name") { // alert("Please select the proper user field!"); return; } if (metaKey == "display_name") { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.createBlock)("core/post-author-name", { isLink: field.linkTo ? true : false, linkTarget: field.linkTarget }); } } }, { type: "block", blocks: ["core/avatar"], transform: attributes => { var metaKey = attributes.metaKey; var field = attributes.field.options; if (metaKey !== "avatar") { // alert("Please select the proper user field!"); return; } if (metaKey == "avatar") { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.createBlock)("core/avatar", { isLink: field.linkTo ? true : false, linkTarget: field.linkTarget }); } } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var frontText = attributes.frontText; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var metaKey = attributes.metaKey; var field = attributes.field; var icon = attributes.icon; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var userFields = [{ label: "ID", key: "id" }, // { label: "login", key: 'login' }, // { label: "Nick name", key: 'nickname' }, // { label: "Email", key: 'email' }, { label: "URL", key: "url" }, { label: "Registered", key: "registered" }, { label: "Display name", key: "display_name" }, { label: "First name", key: "first_name" }, { label: "Last name", key: "last_name" }, { label: "Description", key: "description" }, // { label: "Avatar URL", key: 'avatar_url' }, { label: "Avatar", key: "avatar" } // { label: "Profile Link", key: 'link' }, ]; var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.applyFilters)("linkToArgs", linkToArgsBasic); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const fieldSelector = blockClass + " .fieldVal"; const frontTextSelector = blockClass + " .frontText"; const iconSelector = blockClass + " .icon"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const CustomTagWrapper = `${wrapper.options.tag}`; const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"]); setpostfixText(text); }, [postfix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[fieldSelector] = field; blockCssObj[frontTextSelector] = frontText; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // var breakPointList = []; const [postAuthorData, setpostAuthorData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); // Using the hook. const [loading, setLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Using the hook. const [postAuthorX, setpostAuthorX] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__.useEntityProp)("postType", postType, "author", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (metaKey.length == 0) return; setpostAuthorData([]); setLoading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ path: "/post-grid/v2/get_user_data", method: "POST", data: { id: postAuthorX, fields: [] } }).then(res => { setpostAuthorData(res); setLoading(false); }); }, [metaKey]); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var fieldX = attributes.field; var iconX = attributes.icon; var metaKeyX = attributes.metaKey; var frontTextX = attributes.frontText; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (frontTextX != undefined) { var frontTextY = { ...frontTextX, options: frontText.options }; setAttributes({ frontText: frontTextY }); blockCssObj[frontTextSelector] = frontTextY; } if (metaKeyX != undefined) { var metaKeyY = { ...metaKeyX, options: metaKey.options }; setAttributes({ metaKey: metaKeyY }); blockCssObj[metaKeySelector] = metaKeyY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (fieldX != undefined) { var fieldY = { ...fieldX, options: field.options }; setAttributes({ field: fieldY }); blockCssObj[fieldSelector] = fieldY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryFrontText(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; frontText[sudoScource] = sudoScourceArgs; }); var frontTextX = Object.assign({}, frontText); setAttributes({ frontText: frontTextX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleField(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, field); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ field: object }); var elementSelector = myStore.getElementSelector(sudoScource, fieldSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleField(sudoScource, key) { var object = myStore.deletePropertyDeep(field, [sudoScource, key, breakPointX]); setAttributes({ field: object }); var elementSelector = myStore.getElementSelector(sudoScource, fieldSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleField(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, field); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ field: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleFrontText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFrontText(sudoScource, key) { var object = myStore.deletePropertyDeep(frontText, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFrontText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ frontText: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function setFieldLinkTo(option, index) { var options = { ...field.options, linkTo: option.value }; setAttributes({ field: { ...field, options: options } }); } function setUserField(option, index) { setAttributes({ metaKey: option.key }); } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddField(sudoScource, cssObj) { let obj = Object.assign({}, field); obj[sudoScource] = cssObj; setAttributes({ field: obj }); var selector = myStore.getElementSelector(sudoScource, fieldSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddFrontText(sudoScource, cssObj) { let obj = Object.assign({}, frontText); obj[sudoScource] = cssObj; setAttributes({ frontText: obj }); var selector = myStore.getElementSelector(sudoScource, frontTextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetField(sudoScources) { let obj = Object.assign({}, field); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, fieldSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ field: obj }); } function onResetFrontText(sudoScources) { let obj = Object.assign({}, frontText); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ frontText: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { linkAttrObj(); myStore.generateBlockCss(blockCssY.items, blockId); }, [field]); var linkAttrObj = () => { var sdsd = {}; field.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Select User Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { position: "bottom right", variant: "secondary", options: userFields, buttonTitle: "Choose", onChange: setUserField, values: metaKey })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: metaKey, onChange: newVal => { setAttributes({ metaKey: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Field Settings", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "style", title: "Style", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { position: "bottom right", btnClass: "flex w-full gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // variant="secondary" , options: linkToArgs // buttonTitle="Choose" , buttonTitle: linkToArgs[field.options.linkTo] != undefined ? linkToArgs[field.options.linkTo].label : "Choose", onChange: setFieldLinkTo, values: metaKey })), field.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, field.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: field.options.linkToMeta, onChange: newVal => { var options = { ...field.options, linkToMeta: newVal }; setAttributes({ field: { ...field, options: options } }); } })), field.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: field.options.linkToAuthorMeta, onChange: newVal => { var options = { ...field.options, linkToAuthorMeta: newVal }; setAttributes({ field: { ...field, options: options } }); } })), field.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), field.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { var options = { ...field.options, customUrl: "" }; setAttributes({ field: { ...field, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.__experimentalLinkControl, { settings: [], value: field.options.customUrl, onChange: newVal => { var options = { ...field.options, customUrl: newVal.url }; setAttributes({ field: { ...field, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", field.options.customUrl.length != 0 ? field.options.customUrl : "No link", " "))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: field.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...field.options, linkTarget: newVal }; setAttributes({ field: { ...field, options: options } }); } }))), field.options.linkTo == "custom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: field.options.customUrl, onChange: newVal => { var options = { ...field.options, customUrl: newVal }; setAttributes({ field: { ...field, options: options } }); } })), field.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = field.options.linkAttr.concat({ id: "", val: "" }); var options = { ...field.options, linkAttr: sdsd }; setAttributes({ field: { ...field, options: options } }); linkAttrObj(); } }, "Add")), field.options.linkAttr.length > 0 && field.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", value: field.options.linkAttr[i].id, onChange: newVal => { field.options.linkAttr[i].id = newVal; var ssdsd = field.options.linkAttr.concat([]); var options = { ...field.options, linkAttr: ssdsd }; setAttributes({ field: { ...field, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", value: x.val, onChange: newVal => { field.options.linkAttr[i].val = newVal; var ssdsd = field.options.linkAttr.concat([]); var options = { ...field.options, linkAttr: ssdsd }; setAttributes({ field: { ...field, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close", onClick: ev => { field.options.linkAttr.splice(i, 1); var ssdsd = field.options.linkAttr.concat([]); var options = { ...field.options, linkAttr: ssdsd }; setAttributes({ field: { ...field, options: options } }); } }))); })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "style" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: field, onChange: onChangeStyleField, onAdd: onAddStyleField, onBulkAdd: onBulkAddField, onRemove: onRemoveStyleField, onReset: onResetField })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_13__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Front text", value: "beforeFronttext" }, { label: "After Front text", value: "afterFronttext" }, { label: "Before Field", value: "beforeField" }, { label: "After Field", value: "afterField" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Front Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Front Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: frontText.options.text, onChange: newVal => { var options = { ...frontText.options, text: newVal }; setAttributes({ frontText: { ...frontText, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: frontText, onChange: onChangeStyleFrontText, onAdd: onAddStyleFrontText, onBulkAdd: onBulkAddFrontText, onRemove: onRemoveStyleFrontText, onReset: onResetFrontText })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: frontText, onChange: onPickCssLibraryFrontText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Class", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onBulkAdd: onBulkAddPrefix, onRemove: onRemoveStylePrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Class", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onBulkAdd: onBulkAddPostfix, onRemove: onRemoveStylePostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "post-author-fields", blockId: blockId, clientId: clientId // obj={postTitle} , onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_15__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_16__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "post-author-fields" })))), loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Spinner, null)), !loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, metaKey.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Select User Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { position: "bottom right", variant: "secondary", options: userFields, buttonTitle: "Choose", onChange: setUserField, values: metaKey })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: metaKey, onChange: newVal => { setAttributes({ metaKey: newVal }); } }))), metaKey.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagWrapper, blockProps, icon.options.position == "beforeFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), frontText.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "frontText" }, frontText.options.text), icon.options.position == "afterFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), field.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, prefix.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "prefix" }, prefixText), metaKey == "avatar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { className: "fieldVal", src: postAuthorData["avatar_url"], alt: postAuthorData["display_name"] }), metaKey != "avatar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "fieldVal" }, postAuthorData[metaKey]), postfix.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "postfix" }, postfixText)), field.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: "#", target: field.options.linkTarget }, prefix.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "prefix" }, prefixText), metaKey == "avatar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { className: "fieldVal", src: postAuthorData["avatar_url"], alt: postAuthorData["display_name"] }), metaKey != "avatar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "fieldVal" }, postAuthorData[metaKey]), postfix.options.text.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "postfix" }, postfixText)), icon.options.position == "afterField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-author/index.js": /*!*****************************************!*\ !*** ./src/blocks/post-author/index.js ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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 react_sortablejs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-author/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 26H0V35.4118H160V26Z", fill: "url(#paint0_linear_61_288)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M120 44.8237H0V54.2355H120V44.8237Z", fill: "url(#paint1_linear_61_288)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 93H77V102H160V93Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M127.907 112H77V121H127.907V112Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18.0325 112.536H20.2042C20.7307 112.536 21.2086 112.744 21.5599 113.083C22.4373 113.787 23.353 114.349 24.2944 114.729C25.1647 115.081 26.065 115.274 26.9853 115.274C27.9055 115.274 28.8058 115.081 29.6761 114.729C30.6603 114.332 31.6163 113.736 32.5299 112.986L33.7663 114.49L32.5271 112.979C32.8908 112.681 33.33 112.536 33.7663 112.536H33.7709H35.9381C40.899 112.536 45.4077 114.564 48.675 117.832C51.9424 121.099 53.9704 125.608 53.9704 130.569V140.216C53.9704 141.295 53.0956 142.17 52.0166 142.17H1.95379C0.874785 142.17 0 141.295 0 140.216V130.569C0 125.608 2.02811 121.099 5.29552 117.832C8.56284 114.564 13.0716 112.536 18.0325 112.536ZM19.5397 116.444H18.0325C14.1502 116.444 10.6194 118.033 8.05834 120.594C5.49725 123.155 3.90759 126.686 3.90759 130.569V138.262H50.0629V130.569C50.0629 126.686 48.4732 123.155 45.9122 120.594C43.3512 118.033 39.8203 116.444 35.938 116.444H34.4308C33.3801 117.237 32.2755 117.883 31.1262 118.347C29.7921 118.885 28.407 119.181 26.9852 119.181C25.5634 119.181 24.1783 118.885 22.8442 118.347C21.6949 117.883 20.5902 117.237 19.5397 116.444Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M26.9866 71C32.2264 71 36.9938 72.2788 40.3886 74.9934C43.5569 77.527 45.4914 81.2236 45.4914 86.1887C45.4914 91.5205 43.1555 98.6459 39.4592 104.008C36.214 108.717 31.8729 112.155 26.9867 112.155C22.1005 112.155 17.7593 108.717 14.5142 104.008C10.8178 98.6459 8.48193 91.5206 8.48193 86.1887C8.48193 81.2236 10.4165 77.527 13.5848 74.9934C16.9796 72.2788 21.7469 71 26.9866 71ZM37.9615 78.0311C35.3063 75.9078 31.3919 74.9076 26.9866 74.9076C22.5814 74.9076 18.667 75.9078 16.0118 78.0311C13.7628 79.8295 12.3895 82.5172 12.3895 86.1887C12.3895 90.818 14.4536 97.0567 17.7196 101.795C20.2899 105.524 23.5525 108.247 26.9867 108.247C30.4209 108.247 33.6835 105.524 36.2538 101.795C39.5198 97.0567 41.5839 90.818 41.5839 86.1887C41.5839 82.5172 40.2106 79.8295 37.9616 78.0311H37.9615Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_288", x1: "0", y1: "30.7059", x2: "160", y2: "30.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_288", x1: "0", y1: "49.5296", x2: "120", y2: "49.5296", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/post-author"], transform: (attributes, innerBlocks) => { var items = []; if (attributes.showAvatar) { items.push({ id: "avatar", label: "Avatar" }); } items.push({ id: "name", label: "Name" }); if (attributes.showBio) { items.push({ id: "description", label: "Description" }); } return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.createBlock)("post-grid/post-author", { wrapper: { options: { tag: "div", class: "pg-post-author" }, styles: { display: { Desktop: "block" } } }, elements: { items: items }, avatar: { options: { class: "avatar", size: attributes.avatarSize, default: "" }, styles: { display: { Desktop: "block" }, backgroundColor: { Desktop: "" }, overflow: { Desktop: "hidden" }, margin: { Desktop: "0px 20px 0px 0px" }, borderRadius: { Desktop: "100px 100px 100px 100px" }, float: { Desktop: "left" } } }, name: { options: { class: "name", prefix: "", postfix: "", linkTo: attributes.isLink ? "authorLink" : "", linkToMeta: "", customUrl: "" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, description: { options: { class: "description", prefix: "", postfix: "" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } } }); } }], to: [{ type: "block", blocks: ["core/post-author"], transform: attributes => { var elements = attributes.elements.items; var avatar = attributes.avatar.options; var name = attributes.name.options; function checkIDExists(idToCheck) { return elements.some(item => item.id === idToCheck); } const nameExists = checkIDExists("name"); const descriptionExists = checkIDExists("description"); const avatarExists = checkIDExists("avatar"); // var content = attributes.readMore; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.createBlock)("core/post-author", { avatarSize: avatar.size, isLink: name.linkTo.length > 0 ? true : false, linkTarget: "_blank", showAvatar: avatarExists ? true : false, showBio: descriptionExists ? true : false }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var elements = attributes.elements; var avatar = attributes.avatar; var description = attributes.description; var name = attributes.name; var linkAttr = attributes.linkAttr; var blockCss = attributes.blockCss; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var wrapperSelector = blockClass; // Wrapper CSS Class Selectors var nameSelector = blockClass + " .name"; var descriptionSelector = blockClass + " .description"; var avatarSelector = blockClass + " .avatar"; var avatarImgSelector = blockClass + " .avatar img"; const CustomTagWrapper = `${wrapper.options.tag}`; var [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.getBreakPoint()); var [postAuthor, setPostAuthor] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); var [html, setHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); var [loading, setLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [postAuthorId, setPostAuthorId] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__.useEntityProp)("postType", postType, "author", postId); var [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[nameSelector] = name; blockCssObj[descriptionSelector] = description; blockCssObj[avatarSelector] = avatar; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/wp/v2/users/" + postAuthorId, method: "GET" }).then(res => { setPostAuthor(res); }); }, [postAuthorId]); var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("linkToArgs", linkToArgsBasic); var userFields = [{ id: "avatar", label: "Avatar" }, { id: "name", label: "Name" }, { id: "description", label: "Description" }]; function setUserField(option, index) { //var isExist = elements.items.find(x => x.label === option.label); var elementsX = elements.items.push(option); setAttributes({ elements: { items: elements.items } }); } function generatehtml() { var nameHtml = postAuthor.name != undefined ? `<span className='prefix'>${name.options.prefix}</span>${postAuthor.name}<span className='postfix'>${name.options.postfix}</span>` : "Author Name 1"; if (name.options.linkTo == "postUrl") { nameHtml = `<span className='prefix'>${name.options.prefix}</span><a href="${currentPostUrl}">${postAuthor.name != undefined ? postAuthor.name : "Author Name"}</a><span className='postfix'>${name.options.postfix}</span>`; } if (name.options.linkTo == "authorUrl") { nameHtml = `<span className='prefix'>${name.options.prefix}</span><a href="${postAuthor.url}">${postAuthor.name != undefined ? postAuthor.name : "Author Name"}</a><span className='postfix'>${name.options.postfix}</span>`; } if (name.options.linkTo == "authorLink") { nameHtml = `<span className='prefix'>${name.options.prefix}</span><a href="${postAuthor.link}">${postAuthor.name != undefined ? postAuthor.name : "Author Name"}</a><span className='postfix'>${name.options.postfix}</span>`; } if (name.options.linkTo == "authorMeta") { nameHtml = `<span className='prefix'>${name.options.prefix}</span><a href="${postAuthor.link}">${postAuthor.name != undefined ? postAuthor.name : "Author Name"}</a><span className='postfix'>${name.options.postfix}</span>`; } if (name.options.linkTo == "customUrl") { nameHtml = `<span className='prefix'>${name.options.prefix}</span><a href="${name.options.customUrl}">${postAuthor.name != undefined ? postAuthor.name : "Author Name"}</a><span className='postfix'>${name.options.postfix}</span>`; } html.name = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RawHTML, { className: name.options.class }, nameHtml); html.description = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RawHTML, { className: description.options.class }, postAuthor.description != undefined ? postAuthor.description : "Author description"); if (postAuthor.avatar_urls != undefined) { var avatarHtml = `<img alt='' src=${postAuthor.avatar_urls != undefined ? postAuthor.avatar_urls[avatar.options.size] : ""} />`; html.avatar = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RawHTML, { className: avatar.options.class }, avatarHtml, " "); } setTimeout(x => { setHtml(html); }, 100); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setTimeout(() => { generatehtml(); }, 1000); }, [postAuthor]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { generatehtml(); }, [name]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { generatehtml(); }, [description]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { generatehtml(); }, [avatar]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var elementsX = attributes.elements; var avatarX = attributes.avatar; var nameX = attributes.name; var descriptionX = attributes.description; var linkAttrX = attributes.linkAttr; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (linkAttrX != undefined) { var linkAttrY = { ...linkAttrX, options: linkAttr.options }; setAttributes({ linkAttr: linkAttrY }); blockCssObj[linkAttrSelector] = linkAttrY; } if (descriptionX != undefined) { var descriptionY = { ...descriptionX, options: description.options }; setAttributes({ description: descriptionY }); blockCssObj[descriptionSelector] = descriptionY; } if (nameX != undefined) { var nameY = { ...nameX, options: name.options }; setAttributes({ name: nameY }); blockCssObj[nameSelector] = nameY; } if (avatarX != undefined) { var avatarY = { ...avatarX, options: avatar.options }; setAttributes({ avatar: avatarY }); blockCssObj[avatarSelector] = avatarY; } if (elementsX != undefined) { var elementsY = { ...elementsX, options: elements.options }; setAttributes({ elements: elementsY }); blockCssObj[elementsSelector] = elementsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleAvatar(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, avatar); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ avatar: object }); var elementSelector = myStore.getElementSelector(sudoScource, avatarSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleAvatar(sudoScource, key) { var object = myStore.deletePropertyDeep(avatar, [sudoScource, key, breakPointX]); setAttributes({ avatar: object }); var elementSelector = myStore.getElementSelector(sudoScource, avatarSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleAvatar(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, avatar); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ avatar: object }); } function onChangeStyleName(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, name); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ name: object }); var elementSelector = myStore.getElementSelector(sudoScource, nameSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleName(sudoScource, key) { var object = myStore.deletePropertyDeep(name, [sudoScource, key, breakPointX]); setAttributes({ name: object }); var elementSelector = myStore.getElementSelector(sudoScource, nameSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleName(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, name); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ name: object }); } function onChangeStyleDescription(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, description); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ description: object }); var elementSelector = myStore.getElementSelector(sudoScource, descriptionSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleDescription(sudoScource, key) { var object = myStore.deletePropertyDeep(description, [sudoScource, key, breakPointX]); setAttributes({ description: object }); var elementSelector = myStore.getElementSelector(sudoScource, descriptionSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleDescription(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, description); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ description: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddAvatar(sudoScource, cssObj) { let obj = Object.assign({}, avatar); obj[sudoScource] = cssObj; setAttributes({ avatar: obj }); var selector = myStore.getElementSelector(sudoScource, avatarSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddName(sudoScource, cssObj) { let obj = Object.assign({}, name); obj[sudoScource] = cssObj; setAttributes({ name: obj }); var selector = myStore.getElementSelector(sudoScource, nameSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddDescription(sudoScource, cssObj) { let obj = Object.assign({}, description); obj[sudoScource] = cssObj; setAttributes({ description: obj }); var selector = myStore.getElementSelector(sudoScource, descriptionSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetAvatar(sudoScources) { let obj = Object.assign({}, avatar); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, avatarSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ avatar: obj }); } function onResetDescription(sudoScources) { let obj = Object.assign({}, description); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, descriptionSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ description: obj }); } function onResetName(sudoScources) { let obj = Object.assign({}, name); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, nameSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ name: obj }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { linkAttrObj(); }, [linkAttr]); var linkAttrObj = () => { var sdsd = {}; linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); //return sdsd; }; const CustomTag = `${wrapper.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper, onReset: onResetWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Elements", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add User Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: userFields, buttonTitle: "Choose", onChange: setUserField, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__.ReactSortable, { list: elements.items, handle: ".handle", setList: item => { setAttributes({ elements: { items: item } }); } }, elements.items.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { key: item.id, className: "flex gap-3 items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var elementsX = elements.items.splice(index, 1); setAttributes({ elements: { ...elements, items: elements.items } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "" }, item.label))))), elements.items.find(x => x.label === "Avatar") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Avatar", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Avatar Size"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: avatar.options.size, options: [{ label: "Select..", value: "" }, { label: "24", value: "24" }, { label: "48", value: "48" }, { label: "96", value: "96" }], onChange: newVal => { var options = { ...avatar.options, size: newVal }; setAttributes({ avatar: { ...avatar, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Avatar Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: avatar.options.class, onChange: newVal => { var options = { ...avatar.options, class: newVal }; setAttributes({ avatar: { ...avatar, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: avatar, onChange: onChangeStyleAvatar, onAdd: onAddStyleAvatar, onBulkAdd: onBulkAddAvatar, onRemove: onRemoveStyleAvatar, onReset: onResetAvatar })))), elements.items.find(x => x.label === "Name") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Name", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Name Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: name.options.class, onChange: newVal => { var options = { ...name.options, class: newVal }; setAttributes({ name: { ...name, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", buttonTitle: name.options.linkTo.length == 0 ? "Choose" : linkToArgs[name.options.linkTo].label, options: linkToArgs, onChange: (option, index) => { var options = { ...name.options, linkTo: option.value }; setAttributes({ name: { ...name, options: options } }); }, values: "" })), (name.options.linkTo == "authorMeta" || name.options.linkTo == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, name.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Author Meta Key"), name.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Post Meta Key")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: name.options.linkToMeta, onChange: newVal => { var options = { ...name.options, linkToMeta: newVal }; setAttributes({ name: { ...name, options: options } }); } })), name.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), name.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...name.options, customUrl: "" }; setAttributes({ name: { ...name, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.__experimentalLinkControl, { settings: [], value: name.options.customUrl, onChange: newVal => { var options = { ...name.options, customUrl: newVal.url }; setAttributes({ name: { ...name, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", name.options.customUrl.length != 0 ? name.options.customUrl : "No link", " "))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: name.options.prefix, onChange: newVal => { var options = { ...name.options, prefix: newVal }; setAttributes({ name: { ...name, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: name.options.postfix, onChange: newVal => { var options = { ...name.options, postfix: newVal }; setAttributes({ name: { ...name, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: name, onChange: onChangeStyleName, onAdd: onAddStyleName, onBulkAdd: onBulkAddName, onRemove: onRemoveStyleName, onReset: onResetName })))), elements.items.find(x => x.label === "Description") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Description", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Description Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: description.options.class, onChange: newVal => { var options = { ...description.options, class: newVal }; setAttributes({ description: { ...description, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: description, onChange: onChangeStyleDescription, onAdd: onAddStyleDescription, onBulkAdd: onBulkAddDescription, onRemove: onRemoveStyleDescription, onReset: onResetDescription })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "post-author", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockPostExcerpt", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "post-author" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagWrapper, blockProps, elements.items.map(x => { return html[x.id]; }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-categories/index.js": /*!*********************************************!*\ !*** ./src/blocks/post-categories/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-categories/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "url(#paint0_linear_61_343)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint1_linear_61_343)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 56.9998H84.7061V66.4115H160V56.9998Z", fill: "url(#paint2_linear_61_343)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 94.8818H85V103.882H131V94.8818Z", fill: "url(#paint3_linear_61_343)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M106.561 76H85V85.41H106.561V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M133.281 76H111.72V85.41H133.281V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 76H138.439V85.41H160V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_343", x1: "13", y1: "82", x2: "53", y2: "82", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_343", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_343", x1: "84.7061", y1: "61.7056", x2: "160", y2: "61.7056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_343", x1: "85", y1: "99.3818", x2: "131", y2: "99.3818", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var items = attributes.items; var separator = attributes.separator; var frontText = attributes.frontText; var icon = attributes.icon; var termTitle = attributes.termTitle; var postCount = attributes.postCount; var blockCssY = attributes.blockCssY; var utmTracking = attributes.utmTracking; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); const CustomTagWrapper = `${wrapper.options.tag}`; // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const itemSelector = blockClass + " .item"; const termTitleSelector = blockClass + " .termTitle"; const separatorSelector = blockClass + " .separator"; const frontTextSelector = blockClass + " .frontText"; const postCountSelector = blockClass + " .postCount"; const iconSelector = blockClass + " .icon"; const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ postTitle: postTitle }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = items; blockCssObj[termTitleSelector] = termTitle; blockCssObj[separatorSelector] = separator; blockCssObj[frontTextSelector] = frontText; blockCssObj[postCountSelector] = postCount; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var itemX = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: itemX } }); }, [blockId]); // var breakPointList = []; var dummyCats = [{ id: 1, count: 1, description: "", link: "#", name: "Category 1", slug: "category-1", taxonomy: "category_tax" }, { id: 2, count: 1, description: "", link: "#", name: "Category 2", slug: "category-2", taxonomy: "category_tax" }, { id: 3, count: 1, description: "", link: "#", name: "Category 3", slug: "category-3", taxonomy: "category_tax" }, { id: 4, count: 1, description: "", link: "#", name: "Category 4", slug: "category-4", taxonomy: "category_tax" }, { id: 5, count: 1, description: "", link: "#", name: "Category 5", slug: "category-5", taxonomy: "category_tax" }, { id: 6, count: 1, description: "", link: "#", name: "Category 6", slug: "category-6", taxonomy: "category_tax" }]; const [categoryCount, setcategoryCount] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); // Using the hook. const [postCategoriesData, setPostCategoriesData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [categories, setCategories] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [postCategoriesX, setPostCategoriesX] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "categories", postId); // console.log(postCategoriesX); var iconPositionArgsBasic = { none: { label: "Choose Position", value: "" }, beforeFronttext: { label: "Before Front text", value: "beforeFronttext" }, afterFronttext: { label: "After Front text", value: "afterFronttext", isPro: true }, beforeItems: { label: "Before Items", value: "beforeItems", isPro: true }, afterItems: { label: "After Items", value: "afterItems", isPro: true }, beforeItem: { label: "Before Each Items", value: "beforeItem", isPro: true }, afterItem: { label: "After Each Items", value: "afterItem", isPro: true } }; let iconPositionArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("iconPositionArgs", iconPositionArgsBasic); var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, termUrl: { label: "Term URL", value: "termUrl" }, postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; // let linkToArgs = applyFilters("linkToArgs", linkToArgsBasic); let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("linkToArgTerms", linkToArgsBasic); function setFieldLinkTo(option, index) { var options = { ...items.options, linkTo: option.value }; setAttributes({ items: { ...items, options: options } }); } function setIconPosition(option, index) { var options = { ...icon.options, position: option.value }; setAttributes({ icon: { ...icon, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setPostCategoriesData([]); setCategories([]); setcategoryCount(categories.length - 1); if (postCategoriesX != undefined) { for (var x in postCategoriesX) { var catId = postCategoriesX[x]; var assd = x; if (x) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/wp/v2/categories/" + catId, method: "GET" }).then(res => { setPostCategoriesData(current => [...current, res]); setCategories(current => [...current, res]); }); } } } else { setPostCategoriesData(dummyCats); setCategories(dummyCats); } }, [postCategoriesX]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var asdasd = postCategoriesData.slice(0, items.options.maxCount); setCategories(asdasd); }, [postCategoriesData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (postCategoriesX != undefined && postCategoriesX.length > 0) { var maxCount = items.options.maxCount.length > 0 ? items.options.maxCount : 99; setcategoryCount(categories.length - 1); var asdasd = postCategoriesData.slice(0, maxCount); setCategories(asdasd); } else { var asdasd = dummyCats.slice(0, maxCount); setCategories(asdasd); } }, [items]); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc} ${icon.options.class}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var itemsX = attributes.items; var iconX = attributes.icon; var termTitleX = attributes.termTitle; var separatorX = attributes.separator; var postCountX = attributes.postCount; var frontTextX = attributes.frontText; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (frontTextX != undefined) { var frontTextY = { ...frontTextX, options: frontText.options }; setAttributes({ frontText: frontTextY }); blockCssObj[frontTextSelector] = frontTextY; } if (postCountX != undefined) { var postCountY = { ...postCountX, options: postCount.options }; setAttributes({ postCount: postCountY }); blockCssObj[postCountSelector] = postCountY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (termTitleX != undefined) { var termTitleY = { ...termTitleX, options: termTitle.options }; setAttributes({ termTitle: termTitleY }); blockCssObj[termTitleSelector] = termTitleY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemSelector] = itemsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var cssStyle = blockCssRules; setAttributes({ blockCssY: { items: cssStyle } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryItems(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; items[sudoScource] = sudoScourceArgs; }); var itemsX = Object.assign({}, items); setAttributes({ items: itemsX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySeparator(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; separator[sudoScource] = sudoScourceArgs; }); var separatorX = Object.assign({}, separator); setAttributes({ separator: separatorX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryFrontText(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; frontText[sudoScource] = sudoScourceArgs; }); var frontTextX = Object.assign({}, frontText); setAttributes({ frontText: frontTextX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItems(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, items); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItems(sudoScource, key) { var object = myStore.deletePropertyDeep(items, [sudoScource, key, breakPointX]); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItems(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, items); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ items: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleFrontText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFrontText(sudoScource, key) { var object = myStore.deletePropertyDeep(frontText, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFrontText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ frontText: object }); } function onChangeStyleSeparator(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSeparator(sudoScource, key) { var object = myStore.deletePropertyDeep(separator, [sudoScource, key, breakPointX]); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSeparator(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ separator: object }); } // function onChangeStyleTermTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleTermTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(termTitle, [sudoScource, key, breakPointX]); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleTermTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ termTitle: object }); } function onChangeStylePostCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostCount(sudoScource, key) { var object = myStore.deletePropertyDeep(postCount, [sudoScource, key, breakPointX]); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postCount: object }); } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); myStore.generateBlockCss(blockCssY.items, blockId); }, [items]); var linkAttrObj = () => { var sdsd = {}; items.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddFrontText(sudoScource, cssObj) { let obj = Object.assign({}, frontText); obj[sudoScource] = cssObj; setAttributes({ frontText: obj }); var selector = myStore.getElementSelector(sudoScource, frontTextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSeparator(sudoScource, cssObj) { let obj = Object.assign({}, separator); obj[sudoScource] = cssObj; setAttributes({ separator: obj }); var selector = myStore.getElementSelector(sudoScource, separatorSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddTermTitle(sudoScource, cssObj) { let obj = Object.assign({}, termTitle); obj[sudoScource] = cssObj; setAttributes({ termTitle: obj }); var selector = myStore.getElementSelector(sudoScource, termTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostCount(sudoScource, cssObj) { let obj = Object.assign({}, postCount); obj[sudoScource] = cssObj; setAttributes({ postCount: obj }); var selector = myStore.getElementSelector(sudoScource, postCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetItems(sudoScources) { let obj = Object.assign({}, items); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ items: obj }); } function onResetSeparator(sudoScources) { let obj = Object.assign({}, separator); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ separator: obj }); } function onResetFrontText(sudoScources) { let obj = Object.assign({}, frontText); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ frontText: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } function onResetTermTitle(sudoScources) { let obj = Object.assign({}, termTitle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ termTitle: obj }); } function onResetPostCount(sudoScources) { let obj = Object.assign({}, postCount); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postCount: obj }); } const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.class, onChange: newVal => { var options = { ...items.options, class: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Max Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.maxCount, onChange: newVal => { var options = { ...items.options, maxCount: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: items.options.linkTo == undefined || items.options.linkTo.length == 0 ? "Choose" : linkToArgs[items.options.linkTo] == undefined ? "Choose" : linkToArgs[items.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), items.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...items.options, customUrl: "" }; setAttributes({ items: { ...items, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.__experimentalLinkControl, { settings: [], value: items.options.customUrl, onChange: newVal => { var options = { ...items.options, customUrl: newVal.url }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", items.options.customUrl.length != 0 ? items.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: items.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...items.options, linkTarget: newVal }; setAttributes({ items: { ...items, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.prefix, onChange: newVal => { var options = { ...items.options, prefix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.postfix, onChange: newVal => { var options = { ...items.options, postfix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = items.options.linkAttr.concat({ id: "", val: "" }); var options = { ...items.options, linkAttr: sdsd }; setAttributes({ items: { ...items, options: options } }); linkAttrObj(); } }, "Add")), items.options.linkAttr.length > 0 && items.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: items.options.linkAttr[i].id, onChange: newVal => { items.options.linkAttr[i].id = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { items.options.linkAttr[i].val = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { items.options.linkAttr.splice(i, 1); var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: items, onChange: onChangeStyleItems, onAdd: onAddStyleItems, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleItems, onReset: onResetItems })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: items, onChange: onPickCssLibraryItems })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ` ${isVisible ? "pb-6" : ""} transition-all duration-200 w-full flex justify-between items-center relative` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: iconPositionArgs, buttonTitle: icon.options.position.length == 0 ? "Choose" : iconPositionArgs[icon.options.position].label, onChange: setIconPosition, values: [] })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Front Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Front Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: frontText.options.text, onChange: newVal => { var options = { ...frontText.options, text: newVal }; setAttributes({ frontText: { ...frontText, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: frontText, onChange: onChangeStyleFrontText, onAdd: onAddStyleFrontText, onBulkAdd: onBulkAddFrontText, onRemove: onRemoveStyleFrontText, onReset: onResetFrontText })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: frontText, onChange: onPickCssLibraryFrontText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Separator", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: separator.options.text, onChange: newVal => { var options = { ...separator.options, text: newVal }; setAttributes({ separator: { ...separator, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: separator, onChange: onChangeStyleSeparator, onAdd: onAddStyleSeparator, onBulkAdd: onBulkAddSeparator, onRemove: onRemoveStyleSeparator, onReset: onResetSeparator })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: separator, onChange: onPickCssLibrarySeparator })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Term Title", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: termTitle, onChange: onChangeStyleTermTitle, onAdd: onAddStyleTermTitle, onBulkAdd: onBulkAddTermTitle, onRemove: onRemoveStyleTermTitle, onReset: onResetTermTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Post Count" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Post Count"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postCount, onChange: onChangeStylePostCount, onAdd: onAddStylePostCount, onBulkAdd: onBulkAddPostCount, onRemove: onRemoveStylePostCount, onReset: onResetPostCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "Display Post Count", help: items.options.postCount ? "Post Count Enabled" : "Post Count Disabled", checked: items.options.postCount ? true : false, onChange: e => { var options = { ...items.options, postCount: items.options.postCount ? false : true }; setAttributes({ items: { ...items, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__["default"], { blockName: "post-categories", blockId: blockId, clientId: clientId // obj={postTitle} , onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-category" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, categories.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, "No Categories Found"), categories.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagWrapper, blockProps, icon.options.position == "beforeFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "frontText " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, frontText.options.text)), icon.options.position == "afterFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), categories.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo != undefined && items.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ title: x.name }, linkAttrItems, { className: items.options.class }), icon.options.position == "beforeItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, "(", x.count, ")"), icon.options.position == "afterItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: ev => ev.preventDefault(), target: items.options.linkTarget, title: x.name }, linkAttrItems, { className: items.options.class, href: x.link }), icon.options.position == "beforeItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, x.count), icon.options.position == "afterItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } })), categories.length > index + 1 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "separator", dangerouslySetInnerHTML: { __html: separator.options.text } })); }), icon.options.position == "afterItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-comment-count/index.js": /*!************************************************!*\ !*** ./src/blocks/post-comment-count/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-comment-count/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M17.8279 113H17.2131C15.3688 112.385 14.7541 111.771 14.7541 109.927C14.7541 105.624 14.7541 101.321 14.7541 96.4037V95.789H14.1393C10.4508 95.789 6.76229 95.789 3.07377 95.789C1.22951 95.789 0 95.1743 0 92.7156C0 77.9633 0 63.8257 0 49.0734C0 47.2294 1.22951 46 3.07377 46C25.8197 46 49.1803 46 71.9262 46C73.7705 46 74.3852 46.6147 75 47.8441C75 63.211 75 78.578 75 93.945C74.3852 95.1743 73.1557 95.789 71.9262 95.789C60.8607 95.789 50.4098 95.789 39.3443 95.789C38.7295 95.789 38.1148 95.789 38.1148 96.4037C31.9672 101.936 25.8197 106.853 20.2869 112.385C19.0574 112.385 19.0574 113 17.8279 113ZM70.082 50.9174C48.5656 50.9174 27.0492 50.9174 5.5328 50.9174C5.5328 64.4404 5.5328 77.3486 5.5328 90.8716C6.14755 90.8716 6.14754 90.8716 6.14754 90.8716C9.83607 90.8716 13.5246 90.8716 17.2131 90.8716C19.0574 90.8716 20.2869 92.1009 20.2869 93.945C20.2869 97.633 20.2869 100.706 20.2869 104.394V105.009C25.2049 100.706 30.123 96.4037 35.041 92.1009C35.6557 91.4862 36.8852 90.8716 37.5 90.8716C47.9508 90.8716 58.4016 90.8716 68.2377 90.8716H68.8525C70.082 77.3486 70.082 63.8257 70.082 50.9174Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159 48H83.7061V57.4118H159V48Z", fill: "url(#paint0_linear_61_425)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159 66.8823H84V75.8823H159V66.8823Z", fill: "url(#paint1_linear_61_425)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M130 85.8823H84V94.8823H130V85.8823Z", fill: "url(#paint2_linear_61_425)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_425", x1: "83.7061", y1: "52.7059", x2: "159", y2: "52.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_425", x1: "84", y1: "71.3823", x2: "159", y2: "71.3823", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_425", x1: "84", y1: "90.3823", x2: "130", y2: "90.3823", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let commentCount = attributes.commentCount; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var [currentCommentCount, setcurrentCommentCount] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ approved: 0, moderated: 0, spam: 0, total_comments: 0, trash: 0, "post-trashed": 0, all: 0 }); var [commentCountEdited, setcommentCountEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(commentCount.options.customLabel); var iconPositionArgsBasic = { none: { label: "Choose Position", value: "" }, beforeCommentCount: { label: "Before Comment Count", value: "beforeCommentCount" }, afterCommentCount: { label: "After Comment Count", value: "afterCommentCount", isPro: true }, beforePrefix: { label: "Before Prefix", value: "beforePrefix", isPro: true }, afterPrefix: { label: "After Prefix", value: "afterPrefix", isPro: true }, beforePostfix: { label: "Before PostFix", value: "beforePostfix", isPro: true }, afterPostfix: { label: "After PostFix", value: "afterPostfix", isPro: true } }; let iconPositionArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("iconPositionArgs", iconPositionArgsBasic); function setIconPosition(option, index) { var options = { ...icon.options, position: option.value }; setAttributes({ icon: { ...icon, options: options } }); } var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("linkToArgs", linkToArgsBasic); function setFieldLinkTo(option, index) { var options = { ...commentCount.options, linkTo: option.value }; setAttributes({ commentCount: { ...commentCount, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: "/post-grid/v2/get_comment_count", method: "POST", data: { id: postId } }).then(res => { setcurrentCommentCount(res); setcommentCountEdited(commentCount.options.customLabel.replace("%s", res[commentCount.options.status])); }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setcommentCountEdited(commentCount.options.customLabel.replace("%s", currentCommentCount[commentCount.options.status])); }, [commentCount]); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var commentCountSelector = blockClass + " .commentCount"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const iconSelector = blockClass + " .commentCount-icon"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[commentCountSelector] = commentCount; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var commentCountX = attributes.commentCount; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (commentCountX != undefined) { var commentCountY = { ...commentCountX, options: commentCount.options }; setAttributes({ commentCount: commentCountY }); blockCssObj[commentCountSelector] = commentCountY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryCommentCount(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; commentCount[sudoScource] = sudoScourceArgs; }); var commentCountX = Object.assign({}, commentCount); setAttributes({ commentCount: commentCountX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, wrapper); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ wrapper: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); // sudoScourceX[attr][breakPointX] = newVal; // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...wrapper[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // wrapper[sudoScource] = sudoScourceX; // setAttributes({ wrapper: { ...wrapper } }); // if (blockCssY.items[wrapperSelector] == undefined) { // blockCssY.items[wrapperSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[wrapperSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[wrapperSelector][key] != undefined) { // delete blockCssY.items[wrapperSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStyleWrapper(sudoScource, key) { // var sudoScourceX = { ...wrapper[sudoScource] } // sudoScourceX[key] = {}; // wrapper[sudoScource] = sudoScourceX; // setAttributes({ wrapper: { ...wrapper } }); var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleCommentCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, commentCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ commentCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, commentCount); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ commentCount: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); // sudoScourceX[attr][breakPointX] = newVal; // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onRemoveStyleCommentCount(sudoScource, key) { var object = myStore.deletePropertyDeep(commentCount, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, commentCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...commentCount[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // commentCount[sudoScource] = sudoScourceX; // setAttributes({ commentCount: { ...commentCount } }); // if (blockCssY.items[commentCountSelector] == undefined) { // blockCssY.items[commentCountSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[commentCountSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[commentCountSelector][key] != undefined) { // delete blockCssY.items[wrapperSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStyleCommentCount(sudoScource, key) { // var sudoScourceX = { ...commentCount[sudoScource] } // sudoScourceX[key] = {}; // commentCount[sudoScource] = sudoScourceX; // setAttributes({ commentCount: { ...commentCount } }); var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, commentCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ commentCount: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, icon); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ icon: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = iconSelector; // var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); // sudoScourceX[attr][breakPointX] = newVal; // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...icon[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // icon[sudoScource] = sudoScourceX; // setAttributes({ icon: { ...icon } }); // if (blockCssY.items[iconSelector] == undefined) { // blockCssY.items[iconSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[iconSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[iconSelector][key] != undefined) { // delete blockCssY.items[iconSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCommentCount(sudoScource, cssObj) { let obj = Object.assign({}, commentCount); obj[sudoScource] = cssObj; setAttributes({ commentCount: obj }); var selector = myStore.getElementSelector(sudoScource, commentCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, prefix); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ prefix: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = prefixSelector; // var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); // sudoScourceX[attr][breakPointX] = newVal; // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...prefix[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // prefix[sudoScource] = sudoScourceX; // //sudoScourceX[attr][breakPointX] = newVal; // setAttributes({ prefix: { ...prefix } }); // if (blockCssY.items[prefixSelector] == undefined) { // blockCssY.items[prefixSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[prefixSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[prefixSelector][key] != undefined) { // delete blockCssY.items[prefixSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...postfix[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // postfix[sudoScource] = sudoScourceX; // //sudoScourceX[attr][breakPointX] = newVal; // setAttributes({ postfix: { ...postfix } }); // if (blockCssY.items[postfixSelector] == undefined) { // blockCssY.items[postfixSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[postfixSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[postfixSelector][key] != undefined) { // delete blockCssY.items[postfixSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ commentCount: commentCount }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [commentCount]); var linkAttrObj = () => { var sdsd = {}; commentCount.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = commentCount.options.customUrl != undefined && commentCount.options.customUrl.length > 0 ? commentCount.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${commentCount.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Comment Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Comment Status"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: commentCount.options.status, options: [{ label: "Approved", value: "approved" }, { label: "Moderated", value: "moderated" }, { label: "Spam", value: "spam" }, { label: "Trash", value: "trash" }, { label: "Post trashed", value: "post-trashed" }, { label: "Total Comments", value: "total_comments" }, { label: "All", value: "all" }], onChange: newVal => { var options = { ...commentCount.options, status: newVal }; setAttributes({ commentCount: { ...commentCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", value: commentCount.options.customLabel, onChange: newVal => { var options = { ...commentCount.options, customLabel: newVal }; setAttributes({ commentCount: { ...commentCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: commentCount.options.linkTo.length == 0 ? "Choose" : linkToArgs[commentCount.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), commentCount.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", value: commentCount.options.linkToMetaKey, onChange: newVal => { var options = { ...commentCount.options, linkToMetaKey: newVal }; setAttributes({ commentCount: { ...commentCount, options: options } }); } })), commentCount.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), commentCount.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...commentCount.options, customUrl: "" }; setAttributes({ commentCount: { ...commentCount, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.__experimentalLinkControl, { settings: [], value: commentCount.options.customUrl, onChange: newVal => { var options = { ...commentCount.options, customUrl: newVal.url }; setAttributes({ commentCount: { ...commentCount, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", commentCount.options.customUrl.length != 0 ? commentCount.options.customUrl : "No link", " ")))), commentCount.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: commentCount.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...commentCount.options, linkTarget: newVal }; setAttributes({ commentCount: { ...commentCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = commentCount.options.linkAttr.concat({ id: "", val: "" }); var options = { ...commentCount.options, linkAttr: sdsd }; setAttributes({ commentCount: { ...commentCount, options: options } }); linkAttrObj(); } }, "Add")), commentCount.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: commentCount.options.linkAttr[i].id, onChange: newVal => { commentCount.options.linkAttr[i].id = newVal; var ssdsd = commentCount.options.linkAttr.concat([]); var options = { ...commentCount.options, linkAttr: ssdsd }; setAttributes({ commentCount: { ...commentCount, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { commentCount.options.linkAttr[i].val = newVal; var ssdsd = commentCount.options.linkAttr.concat([]); var options = { ...commentCount.options, linkAttr: ssdsd }; setAttributes({ commentCount: { ...commentCount, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { commentCount.options.linkAttr.splice(i, 1); var ssdsd = commentCount.options.linkAttr.concat([]); var options = { ...commentCount.options, linkAttr: ssdsd }; setAttributes({ commentCount: { ...commentCount, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: commentCount, onChange: onChangeStyleCommentCount, onAdd: onAddStyleCommentCount, onBulkAdd: onBulkAddCommentCount, onRemove: onRemoveStyleCommentCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: commentCount, onChange: onPickCssLibraryCommentCount })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_15__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: iconPositionArgs, buttonTitle: icon.options.position.length == 0 ? "Choose" : iconPositionArgs[icon.options.position].label, onChange: setIconPosition, values: [] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onBulkAdd: onBulkAddPrefix, onRemove: onRemoveStylePrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onBulkAdd: onBulkAddPostfix, onRemove: onRemoveStylePostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "post-comment-count", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-comment-count" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), commentCount.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "commentCount", onClick: handleLinkClick }, linkAttrItems, { target: commentCount.options.linkTarget, href: postUrl }), icon.options.position == "beforeCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: commentCount.options.class }, commentCountEdited), icon.options.position == "afterCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), commentCount.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: commentCount.options.class }, commentCountEdited), icon.options.position == "afterCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), commentCount.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "commentCount", onClick: handleLinkClick }, linkAttrItems, { target: commentCount.options.linkTarget, href: postUrl }), "A", icon.options.position == "beforeCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: commentCount.options.class }, commentCountEdited), icon.options.position == "afterCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), commentCount.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforeCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: commentCount.options.class }, commentCountEdited), icon.options.position == "afterCommentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-date/index.js": /*!***************************************!*\ !*** ./src/blocks/post-date/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-date/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "79", viewBox: "0 0 160 79", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 16H84.7061V25.4118H160V16Z", fill: "url(#paint0_linear_61_971)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 34.8823H85V43.8823H160V34.8823Z", fill: "url(#paint1_linear_61_971)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 53.8823H85V62.8823H131V53.8823Z", fill: "url(#paint2_linear_61_971)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M62.3449 79H7.76512C3.48877 79 0 75.461 0 71.1228V15.7544C0 11.4162 3.48877 7.87719 7.76512 7.87719H15.53V0H23.2951V7.87719H46.7023V0H54.4674V7.87719H62.2322C66.5086 7.87719 69.9974 11.4162 69.9974 15.7544V71.1228C70.1099 75.461 66.6212 79 62.3449 79ZM7.76512 31.5086V71.0087H62.3449V31.5086H7.76512ZM7.76512 15.7544V23.6316H62.3449V15.7544H7.76512ZM54.5798 63.1315H46.8149V55.2543H54.5798V63.1315ZM38.9374 63.1315H31.1726V55.2543H38.9374V63.1315ZM23.4075 63.1315H15.6426V55.2543H23.4075V63.1315ZM54.5798 47.3771H46.8149V39.4999H54.5798V47.3771ZM38.9374 47.3771H31.1726V39.4999H38.9374V47.3771ZM23.4075 47.3771H15.6426V39.4999H23.4075V47.3771Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_971", x1: "84.7061", y1: "20.7059", x2: "160", y2: "20.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_971", x1: "85", y1: "39.3823", x2: "160", y2: "39.3823", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_971", x1: "85", y1: "58.3823", x2: "131", y2: "58.3823", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let postDate = attributes.postDate; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [dateObj, setdateObj] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [formatedPostDate, setformatedPostDate] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); var iconPositionArgsBasic = { none: { label: "Choose Position", value: "" }, beforePostDate: { label: "Before Post Date", value: "beforePostDate" }, afterPostDate: { label: "After Post Date", value: "afterPostDate", isPro: true }, beforePrefix: { label: "Before Prefix", value: "beforePrefix", isPro: true }, afterPrefix: { label: "After Prefix", value: "afterPrefix", isPro: true }, beforePostfix: { label: "Before PostFix", value: "beforePostfix", isPro: true }, afterPostfix: { label: "After PostFix", value: "afterPostfix", isPro: true } }; let iconPositionArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("iconPositionArgs", iconPositionArgsBasic); function setIconPosition(option, index) { var options = { ...icon.options, position: option.value }; setAttributes({ icon: { ...icon, options: options } }); } var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, archiveDate: { label: "Date Archive", value: "archiveDate" }, archiveYear: { label: "Year Archive", value: "archiveYear" }, archiveMonth: { label: "Month Archive", value: "archiveMonth" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("linkToArgs", linkToArgsBasic); var dateFormats = { "Y-M-d": { label: "2022-Feb-25", value: "Y-M-d" }, "Y-m-d": { label: "2022-05-25", value: "Y-m-d" }, "d-m-y": { label: "25-05-2022", value: "d-m-y" }, "d/m/y": { label: "25/05/2022", value: "d/m/y" }, "y-m-d": { label: "2022-05-25", value: "y-m-d" }, "y/m/d": { label: "2022/05/25", value: "y/m/d" }, "D M y": { label: "Sun Feb 2022", value: "D M y" }, "D M d, y": { label: "Sun Feb 11, 2022", value: "D M d, y" }, "M D d, y": { label: "Feb Sun 11, 2022", value: "M D d, y" }, "M d, y": { label: "Feb 11, 2022", value: "M d, y" }, "F d, y": { label: "February 11, 2022", value: "F d, y" }, "d M y": { label: "25 Feb 2022", value: "d M y" } }; var dateNames = ["Satureday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"]; var dateNamesShort = ["Sat", "Sun", "Mon", "Tue", "Wed", "Thu", "Fri"]; var MonthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"]; var MonthNamesShort = ["Jan", "Feb", "Mar", "Apr", "May", "June", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; const [currentPostDate, setcurrentPostDate] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "date", postId); const [postDateEdited, setpostDateEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(currentPostDate); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var dateFormat = postDate.options.dateFormat; var dateFormat = dateFormat.replace("d", "{d}"); var dateFormat = dateFormat.replace("D", "{D}"); var dateFormat = dateFormat.replace("M", "{M}"); var dateFormat = dateFormat.replace("F", "{F}"); var dateFormat = dateFormat.replace("m", "{m}"); var dateFormat = dateFormat.replace("y", "{y}"); var dateFormat = dateFormat.replace("Y", "{Y}"); var dateFormat = dateFormat.replace("h", "{h}"); var dateFormat = dateFormat.replace("H", "{H}"); var dateFormat = dateFormat.replace("i", "{i}"); var dateFormat = dateFormat.replace("s", "{s}"); var dateFormat = dateFormat.replace("A", "{A}"); var dateFormat = dateFormat.replace("a", "{a}"); const date = new Date(currentPostDate); var amOrPm = date.getHours() < 12 ? "AM" : "PM"; dateObj["{d}"] = date.getDate(); dateObj["{D}"] = dateNamesShort[date.getDay()]; dateObj["{M}"] = MonthNamesShort[date.getMonth()]; dateObj["{F}"] = MonthNames[date.getMonth()]; dateObj["{m}"] = date.getMonth() + 1; dateObj["{y}"] = date.getFullYear(); dateObj["{Y}"] = date.getFullYear(); dateObj["{h}"] = date.getHours(); dateObj["{H}"] = date.getHours(); dateObj["{i}"] = date.getMinutes(); dateObj["{s}"] = date.getSeconds(); dateObj["{A}"] = amOrPm; dateObj["{a}"] = amOrPm.toLowerCase(); setpostDateEdited(dateFormat.strtr(dateObj)); }, [currentPostDate, postDate.options.dateFormat]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var postDateX = attributes.postDate; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (postDateX != undefined) { var postDateY = { ...postDateX, options: postDate.options }; setAttributes({ postDate: postDateY }); blockCssObj[postDateSelector] = postDateY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function setFieldLinkTo(option, index) { var options = { ...postDate.options, linkTo: option.value }; setAttributes({ postDate: { ...postDate, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostDate(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postDate[sudoScource] = sudoScourceArgs; }); var postDateX = Object.assign({}, postDate); setAttributes({ postDate: postDateX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postDateSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStylePostDate(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postDate); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postDate: object }); var elementSelector = myStore.getElementSelector(sudoScource, postDateSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostDate(sudoScource, key) { var object = myStore.deletePropertyDeep(postDate, [sudoScource, key, breakPointX]); setAttributes({ postDate: object }); var elementSelector = myStore.getElementSelector(sudoScource, postDateSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostDate(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postDate); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postDate: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostDate(sudoScource, cssObj) { let obj = Object.assign({}, postDate); obj[sudoScource] = cssObj; setAttributes({ postDate: obj }); var selector = myStore.getElementSelector(sudoScource, postDateSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ postDate: postDate }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var postDateSelector = blockClass + " .postdate-text"; const iconSelector = blockClass + " .postdate-icon"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[postDateSelector] = postDate; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [postDate]); var linkAttrObj = () => { var sdsd = {}; postDate.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = postDate.options.customUrl != undefined && postDate.options.customUrl.length > 0 ? postDate.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${postDate.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Post Date", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Date Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: dateFormats // buttonTitle="Choose" , buttonTitle: dateFormats[postDate.options.dateFormat] != undefined ? dateFormats[postDate.options.dateFormat].label : "Choose", onChange: (option, index) => { var options = { ...postDate.options, dateFormat: option.value }; setAttributes({ postDate: { ...postDate, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Format"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", value: postDate.options.dateFormat, onChange: newVal => { var options = { ...postDate.options, dateFormat: newVal }; setAttributes({ postDate: { ...postDate, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: postDate.options.linkTo.length == 0 ? "Choose" : linkToArgs[postDate.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), (postDate.options.linkTo == "authorMeta" || postDate.options.linkTo == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, postDate.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Author Meta Key"), postDate.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Custom Field Key")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", value: postDate.options.linkToMetaKey, onChange: newVal => { var options = { ...postDate.options, linkToMetaKey: newVal }; setAttributes({ postDate: { ...postDate, options: options } }); } })), postDate.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), postDate.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { var options = { ...postDate.options, customUrl: "" }; setAttributes({ postDate: { ...postDate, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.__experimentalLinkControl, { settings: [], value: postDate.options.customUrl, onChange: newVal => { var options = { ...postDate.options, customUrl: newVal.url }; setAttributes({ postDate: { ...postDate, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", postDate.options.customUrl.length != 0 ? postDate.options.customUrl : "No link", " ")))), postDate.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: postDate.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...postDate.options, tag: newVal }; setAttributes({ postDate: { ...postDate, options: options } }); } })), postDate.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: postDate.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...postDate.options, linkTarget: newVal }; setAttributes({ postDate: { ...postDate, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = postDate.options.linkAttr.concat({ id: "", val: "" }); var options = { ...postDate.options, linkAttr: sdsd }; setAttributes({ postDate: { ...postDate, options: options } }); linkAttrObj(); } }, "Add")), postDate.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: postDate.options.linkAttr[i].id, onChange: newVal => { postDate.options.linkAttr[i].id = newVal; var ssdsd = postDate.options.linkAttr.concat([]); var options = { ...postDate.options, linkAttr: ssdsd }; setAttributes({ postDate: { ...postDate, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { postDate.options.linkAttr[i].val = newVal; var ssdsd = postDate.options.linkAttr.concat([]); var options = { ...postDate.options, linkAttr: ssdsd }; setAttributes({ postDate: { ...postDate, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { postDate.options.linkAttr.splice(i, 1); var ssdsd = postDate.options.linkAttr.concat([]); var options = { ...postDate.options, linkAttr: ssdsd }; setAttributes({ postDate: { ...postDate, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postDate, onChange: onChangeStylePostDate, onAdd: onAddStylePostDate, onBulkAdd: onBulkAddPostDate, onRemove: onRemoveStylePostDate })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postDate, onChange: onPickCssLibraryPostDate })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: iconPositionArgs, buttonTitle: icon.options.position.length == 0 ? "Choose" : iconPositionArgs[icon.options.position].label, onChange: setIconPosition, values: [] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onBulkAdd: onBulkAddPrefix, onRemove: onRemoveStylePrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onBulkAdd: onBulkAddPostfix, onRemove: onRemoveStylePostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "post-date", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "post-date" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postDate.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "postDate", onClick: handleLinkClick }, linkAttrItems, { target: postDate.options.linkTarget, href: postUrl }), icon.options.position == "beforePostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postdate-text" }, postDateEdited), icon.options.position == "afterPostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), postDate.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforePostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postdate-text" }, postDateEdited), icon.options.position == "afterPostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postDate.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { onClick: handleLinkClick }, linkAttrItems, { target: postDate.options.linkTarget, href: postUrl }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforePostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postdate-text" }, postDateEdited), icon.options.position == "afterPostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), postDate.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforePostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postdate-text" }, postDateEdited), icon.options.position == "afterPostDate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-excerpt/index.js": /*!******************************************!*\ !*** ./src/blocks/post-excerpt/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-excerpt/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_194)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 57H84.7061V66.4118H160V57Z", fill: "url(#paint1_linear_61_194)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 75.8823H85V84.8823H160V75.8823Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 94.8823H85V103.882H131V94.8823Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "url(#paint2_linear_61_194)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_194", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_194", x1: "84.7061", y1: "61.7059", x2: "160", y2: "61.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_194", x1: "13", y1: "82", x2: "53", y2: "82", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/post-excerpt"], transform: attributes => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/post-excerpt", { wrapper: { options: { tag: "div", class: "pg-post-excerpt" }, styles: { display: { Desktop: "block" } } }, postExcerpt: { options: { tag: "p", text: "", limitBy: "word", limitCount: attributes.excerptLength, excerptSource: "auto", excerptSourceMeta: "", removeBlocks: true, removeShortcodes: true, keepHtml: false, removeEmbeds: true, autoP: false, isLink: false, linkTarget: "_blank", customUrl: "", linkAttr: [], class: "excerpt-text" }, styles: { color: { Desktop: "#000000 !important" }, display: { Desktop: attributes.showMoreOnNewLine ? "block" : "inline" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" } } }, readMore: { options: { enable: attributes.moreText ? true : false, text: attributes.moreText, isLink: true, linkTarget: "_blank", customUrl: "", linkAttr: [], class: "readmore" }, styles: { display: { Desktop: "inline-block" }, color: { Desktop: "#1F2E45" }, margin: { Desktop: "0px 0px 0px 6px" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "600" } } }, prefix: { options: { text: "", class: "prefix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 10px 0px 0px" } } }, postfix: { options: { text: "", class: "postfix" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 0px 0px 10px" } } } }); } }], to: [{ type: "block", blocks: ["core/post-excerpt"], transform: attributes => { var content = attributes.postExcerpt; var readMore = attributes.readMore.options; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/post-excerpt", { excerptLength: content.options.limitCount, moreText: readMore.enable ? readMore.text : null, showMoreOnNewLine: content.styles?.display?.Desktop == "block" || content.styles?.display?.Desktop == "inline-block" ? true : false }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var postExcerpt = attributes.postExcerpt; var wrapper = attributes.wrapper; var readMore = attributes.readMore; var linkAttr = attributes.linkAttr; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("isProFeature", true); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [currentPostExcerpt, setCurrentpostExcerpt] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "excerpt", postId); const [currentPostContent, setCurrentpostContent] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "content", postId); const [customFields, setCustomFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("linkToArgs", linkToArgsBasic); var limitByArgsBasic = { none: { label: "Choose..", value: "none" }, word: { label: "Word", value: "word" }, character: { label: "Character", value: "character", isPro: true } }; let limitByArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("limitByArgs", limitByArgsBasic); var excerptSourceArgsBasic = { auto: { label: "Auto", value: "auto" }, excerpt: { label: "Excerpt", value: "excerpt" }, content: { label: "Content", value: "content" }, meta: { label: "Custom Fields", value: "meta", isPro: true } }; let excerptSourceArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("excerptSourceArgs", excerptSourceArgsBasic); function setFieldLinkTo(option, index) { var options = { ...postExcerpt.options, linkTo: option.value }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } function setLimitBy(option, index) { var options = { ...postExcerpt.options, limitBy: option.value }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var excerptSelector = ""; const readmoreSelector = blockClass + " .readmore"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; if (wrapper.options.tag.length != 0) { if (postExcerpt.options.isLink) { excerptSelector = blockClass + " .excerpt-text"; } else { if (postExcerpt.options.tag.length > 0) { excerptSelector = blockClass + " .excerpt-text"; } else { excerptSelector = blockClass; } } } else { excerptSelector = blockClass; } function getMetaField(metaKey) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default()({ path: "/post-grid/v2/get_post_meta", method: "POST", data: { postId: postId, meta_key: metaKey } }).then(res => { if (res["meta_value"] != undefined && res["meta_value"].length > 0) { customFields[metaKey] = res["meta_value"]; setCustomFields({}); setCustomFields(customFields); } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var excerptSource = postExcerpt.options.excerptSource; var excerptSourceMeta = postExcerpt.options.excerptSourceMeta; if (excerptSource == "meta" && excerptSourceMeta.length > 0) { var response = getMetaField(excerptSourceMeta); } }, [postExcerpt]); const [postExcerptEdited, setPostExcerptEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(currentPostExcerpt); //const [postContentEdited, setPostContentEdited] = useState(currentPostContent); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { //setisLoading(true); var excerptSource = postExcerpt.options.excerptSource; var excerptText = ""; if (excerptSource == "auto") { excerptText = currentPostExcerpt != undefined && currentPostExcerpt.length > 0 ? currentPostExcerpt : ""; } else if (excerptSource == "excerpt") { excerptText = currentPostExcerpt; } else if (excerptSource == "content") { excerptText = ""; } else if (excerptSource == "meta") { var excerptSourceMeta = postExcerpt.options.excerptSourceMeta; setTimeout(() => { excerptText = customFields[excerptSourceMeta] ? customFields[excerptSourceMeta] : ""; }, 100); } excerptText = excerptText.length > 0 ? excerptText : "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book"; if (!postExcerpt.options.keepHtml) { excerptText = excerptText.replace(/<[^>]*>?/gm, ""); } setTimeout(() => { var count = postExcerpt.options.limitCount > 0 ? postExcerpt.options.limitCount : 999; if (postExcerpt.options.limitBy == "character") { setPostExcerptEdited(excerptText.substring(0, count)); } else if (postExcerpt.options.limitBy == "word") { setPostExcerptEdited(excerptText.split(" ").splice(0, count).join(" ")); } else { setPostExcerptEdited(excerptText); } //setisLoading(false); }, 100); }, [postExcerpt, currentPostExcerpt]); const [linkPickerExcerpt, setLinkPickerExcerpt] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerReadmore, setLinkPickerReadmore] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // useEffect(() => { // setAttributes({ blockId: blockIdX }); // myStore.generateBlockCss(blockCssY.items, blockId); // }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[excerptSelector] = postExcerpt; blockCssObj[readmoreSelector] = readMore; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // for (var x in breakPoints) { // var item = breakPoints[x]; // breakPointList.push({ label: item.name, icon: item.icon, value: item.id }) // } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var postExcerptX = attributes.postExcerpt; var readMoreX = attributes.readMore; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (readMoreX != undefined) { var readMoreY = { ...readMoreX, options: readMore.options }; setAttributes({ readMore: readMoreY }); blockCssObj[readmoreSelector] = readMoreY; } if (postExcerptX != undefined) { var postExcerptY = { ...postExcerptX, options: postExcerpt.options }; setAttributes({ postExcerpt: postExcerptY }); blockCssObj[excerptSelector] = postExcerptY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostExcerpt(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postExcerpt[sudoScource] = sudoScourceArgs; }); var postExcerptX = Object.assign({}, postExcerpt); setAttributes({ postExcerpt: postExcerptX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, excerptSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryReadmore(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; readMore[sudoScource] = sudoScourceArgs; }); var readMoreX = Object.assign({}, readMore); setAttributes({ readMore: readMoreX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, readmoreSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStylePostExcerpt(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postExcerpt); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postExcerpt: object }); var elementSelector = myStore.getElementSelector(sudoScource, excerptSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostExcerpt(sudoScource, key) { var object = myStore.deletePropertyDeep(postExcerpt, [sudoScource, key, breakPointX]); setAttributes({ postExcerpt: object }); var elementSelector = myStore.getElementSelector(sudoScource, excerptSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); var sudoScourceX = { ...postExcerpt[sudoScource] }; if (sudoScourceX[key] != undefined) { delete sudoScourceX[key]; } postExcerpt[sudoScource] = sudoScourceX; setAttributes({ postExcerpt: { ...postExcerpt } }); if (blockCssY.items[excerptSelector] == undefined) { blockCssY.items[excerptSelector] = {}; } Object.entries(sudoScourceX).map(args => { var argAttr = myStore.cssAttrParse(args[0]); var argAttrVal = args[1]; blockCssY.items[excerptSelector][argAttr] = argAttrVal; }); if (blockCssY.items[excerptSelector][key] != undefined) { delete blockCssY.items[excerptSelector][key]; } setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStylePostExcerpt(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postExcerpt); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postExcerpt: object }); } function onChangeStyleReadmore(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, readMore); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ readMore: object }); var elementSelector = myStore.getElementSelector(sudoScource, readmoreSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleReadmore(sudoScource, key) { var object = myStore.deletePropertyDeep(readMore, [sudoScource, key, breakPointX]); setAttributes({ readMore: object }); var elementSelector = myStore.getElementSelector(sudoScource, readmoreSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleReadmore(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, readMore); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ readMore: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostExcerpt(sudoScource, cssObj) { let obj = Object.assign({}, postExcerpt); obj[sudoScource] = cssObj; setAttributes({ postExcerpt: obj }); var selector = myStore.getElementSelector(sudoScource, excerptSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddReadmore(sudoScource, cssObj) { let obj = Object.assign({}, readMore); obj[sudoScource] = cssObj; setAttributes({ readMore: obj }); var selector = myStore.getElementSelector(sudoScource, readmoreSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetPostExcerpt(sudoScources) { let obj = Object.assign({}, postExcerpt); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, excerptSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postExcerpt: obj }); } function onResetReadMore(sudoScources) { let obj = Object.assign({}, readMore); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, readmoreSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ readMore: obj }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. var [linkAttrItemsReadmore, setlinkAttrItemsReadmore] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; postExcerpt.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }, [postExcerpt]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; readMore.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItemsReadmore(sdsd); }, [readMore]); var postUrl = postExcerpt.options.customUrl != undefined && postExcerpt.options.customUrl.length > 0 ? postExcerpt.options.customUrl : currentPostUrl; const CustomTagX = `${wrapper.options.tag}`; const CustomTagExcerpt = `${postExcerpt.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Post Excerpt", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Linked with post?", help: postExcerpt.options.isLink ? "Linked with post URL" : "Not linked to post URL.", checked: postExcerpt.options.isLink ? true : false, onChange: e => { var options = { ...postExcerpt.options, isLink: postExcerpt.options.isLink ? false : true }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), !postExcerpt.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: postExcerpt.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...postExcerpt.options, tag: newVal }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } })), postExcerpt.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: postExcerpt.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...postExcerpt.options, linkTarget: newVal }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerExcerpt ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { setLinkPickerExcerpt(prev => !prev); } }), postExcerpt.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { var options = { ...postExcerpt.options, customUrl: "" }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), linkPickerExcerpt && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.__experimentalLinkControl, { settings: [], value: postExcerpt.options.customUrl, onChange: newVal => { var options = { ...postExcerpt.options, customUrl: newVal.url }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); //setLinkPickerpostExcerpt(false) } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", postExcerpt.options.customUrl.length != 0 ? postExcerpt.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = postExcerpt.options.linkAttr != undefined ? postExcerpt.options.linkAttr.concat({ id: "", val: "" }) : []; var options = { ...postExcerpt.options, linkAttr: sdsd }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }, "Add")), postExcerpt.options.linkAttr != undefined && postExcerpt.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: postExcerpt.options.linkAttr[i].id, onChange: newVal => { postExcerpt.options.linkAttr[i].id = newVal; var ssdsd = postExcerpt.options.linkAttr.concat([]); var options = { ...postExcerpt.options, linkAttr: ssdsd }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { postExcerpt.options.linkAttr[i].val = newVal; var ssdsd = postExcerpt.options.linkAttr.concat([]); var options = { ...postExcerpt.options, linkAttr: ssdsd }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { postExcerpt.options.linkAttr.splice(i, 1); var ssdsd = postExcerpt.options.linkAttr.concat([]); var options = { ...postExcerpt.options, linkAttr: ssdsd }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Limit By"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", btnClass: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // variant="secondary" , options: limitByArgs // buttonTitle="Choose" , buttonTitle: postExcerpt.options.limitBy == undefined ? "Choose" : limitByArgs[postExcerpt.options.limitBy] == undefined ? "Choose" : limitByArgs[postExcerpt.options.limitBy].label, onChange: setLimitBy, values: [] })), (postExcerpt.options.limitBy == "word" || postExcerpt.options.limitBy == "character") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Limit Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: postExcerpt.options.limitCount, onChange: newVal => { var options = { ...postExcerpt.options, limitCount: newVal }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Excerpt Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: postExcerpt.options.excerptSource.length == 0 ? "Choose" : postExcerpt.options.excerptSource, options: excerptSourceArgs, onChange: (option, index) => { var options = { ...postExcerpt.options, excerptSource: option.value }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); }, values: "" })), postExcerpt.options.excerptSource == "excerpt" && currentPostExcerpt.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-red-500" }, "Post Excerpt is empty."), postExcerpt.options.excerptSource == "meta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Meta Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: postExcerpt.options.excerptSourceMeta, options: [{ label: "Custom", value: "" }, { label: "Yoast meta", value: "_yoast_wpseo_metadesc" }, { label: "Rank Math meta", value: "rank_math_description" }, { label: "AIO SEO meta", value: "_aioseo_og_description" }, { label: "SEOPress meta", value: "_seopress_titles_desc" }, { label: "WP Meta SEO meta", value: "_metaseo_metadesc" }, { label: "The SEO Framework meta", value: "_genesis_description" }, { label: "SEO SIMPLE PACK meta", value: "ssp_meta_description" }], onChange: newVal => { var options = { ...postExcerpt.options, excerptSourceMeta: newVal }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: postExcerpt.options.excerptSourceMeta, onChange: newVal => { var options = { ...postExcerpt.options, excerptSourceMeta: newVal }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-4", label: "Remove Blocks?", help: postExcerpt.options.removeBlocks ? "Blocks will be removed" : "Blocks may output with excerpt.", checked: postExcerpt.options.removeBlocks ? true : false, onChange: e => { var options = { ...postExcerpt.options, removeBlocks: postExcerpt.options.removeBlocks ? false : true }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-4", label: "Remove Shortcodes?", help: postExcerpt.options.removeShortcodes ? "Shortcodes will be removed" : "Shortcodes may output with excerpt.", checked: postExcerpt.options.removeShortcodes ? true : false, onChange: e => { var options = { ...postExcerpt.options, removeShortcodes: postExcerpt.options.removeShortcodes ? false : true }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-4", label: "Keep HTML?", help: postExcerpt.options.keepHtml ? "HTML may output with excerpt." : "HTML will be removed", checked: postExcerpt.options.keepHtml ? true : false, onChange: e => { var options = { ...postExcerpt.options, keepHtml: postExcerpt.options.keepHtml ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=search", className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { className: "my-4", label: "Enable wpautop()?", help: postExcerpt.options.autoP ? "wpautop function will be applied" : "wpautop function will not be applied.", checked: postExcerpt.options.autoP ? true : false, onChange: e => { var options = { ...postExcerpt.options, autoP: postExcerpt.options.autoP ? false : true }; setAttributes({ postExcerpt: { ...postExcerpt, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: postExcerpt.options.class, onChange: newVal => { var options = { ...postExcerpt.options, class: newVal }; setAttributes({ postExcerpt: { styles: postExcerpt.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postExcerpt, onChange: onChangeStylePostExcerpt, onAdd: onAddStylePostExcerpt, onRemove: onRemoveStylePostExcerpt, onBulkAdd: onBulkAddPostExcerpt, onReset: onResetPostExcerpt })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postExcerpt, onChange: onPickCssLibraryPostExcerpt })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Read More", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Enable Read more?", help: readMore.options.enable ? "Read more enabled" : "Read more disabled.", checked: readMore.options.enable ? true : false, onChange: e => { var options = { ...readMore.options, enable: readMore.options.enable ? false : true }; setAttributes({ readMore: { ...readMore, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Read More Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: readMore.options.text, onChange: newVal => { var options = { ...readMore.options, text: newVal }; setAttributes({ readMore: { ...readMore, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Linked with post?", help: readMore.options.isLink ? "Linked with post URL" : "Not linked to post URL.", checked: readMore.options.isLink ? true : false, onChange: e => { var options = { ...readMore.options, isLink: readMore.options.isLink ? false : true }; setAttributes({ readMore: { ...readMore, options: options } }); } })), readMore.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: readMore.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...readMore.options, linkTarget: newVal }; setAttributes({ readMore: { ...readMore, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerReadmore ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], onClick: ev => { setLinkPickerReadmore(prev => !prev); } }), readMore.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { var options = { ...readMore.options, customUrl: "" }; setAttributes({ readMore: { ...readMore, options: options } }); } }), linkPickerReadmore && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.__experimentalLinkControl, { settings: [], value: readMore.options.customUrl, onChange: newVal => { var options = { ...readMore.options, customUrl: newVal.url }; setAttributes({ readMore: { ...readMore, options: options } }); //setLinkPickerReadmore(false) } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", readMore.options.customUrl.length != 0 ? readMore.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = readMore.options.linkAttr.concat({ id: "", val: "" }); var options = { ...readMore.options, linkAttr: sdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }, "Add")), readMore.options.linkAttr != undefined && readMore.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: readMore.options.linkAttr[i].id, onChange: newVal => { readMore.options.linkAttr[i].id = newVal; var ssdsd = readMore.options.linkAttr.concat([]); var options = { ...readMore.options, linkAttr: ssdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { readMore.options.linkAttr[i].val = newVal; var ssdsd = readMore.options.linkAttr.concat([]); var options = { ...readMore.options, linkAttr: ssdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { readMore.options.linkAttr.splice(i, 1); var ssdsd = readMore.options.linkAttr.concat([]); var options = { ...readMore.options, linkAttr: ssdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: readMore.options.class, onChange: newVal => { var options = { ...readMore.options, class: newVal }; setAttributes({ readMore: { styles: readMore.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: readMore, onChange: onChangeStyleReadmore, onAdd: onAddStyleReadmore, onRemove: onRemoveStyleReadmore, onBulkAdd: onBulkAddReadmore, onReset: onResetReadMore })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: readMore, onChange: onPickCssLibraryReadmore })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Class", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Class", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "post-excerpt", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostExcerpt", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "post-excerpt" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Spinner, null), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagX, blockProps, postExcerpt.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: postExcerpt.options.class, onClick: handleLinkClick }, linkAttrItems, { href: postUrl }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, postExcerptEdited), !postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerptEdited), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text)), !postExcerpt.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerpt.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagExcerpt, { className: postExcerpt.options.class }, prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, postExcerptEdited), !postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerptEdited), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text)), postExcerpt.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, postExcerptEdited), !postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerptEdited), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text))), readMore.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, readMore.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: readMore.options.class, onClick: handleLinkClick }, linkAttrItemsReadmore, { target: readMore.options.linkTarget, href: postUrl }), " ", readMore.options.text), !readMore.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "readmore" }, " ", readMore.options.text))), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerpt.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { onClick: handleLinkClick }, linkAttrItems, { href: postUrl, target: postExcerpt.options.linkTarget }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "prefix" }, prefix.options.text), postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, postExcerptEdited), !postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerptEdited), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postfix" }, postfix.options.text)), readMore.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "readmore", onClick: handleLinkClick }, linkAttrItemsReadmore, { target: readMore.options.linkTarget, href: postUrl }), " ", readMore.options.text))), wrapper.options.tag.length == 0 && !postExcerpt.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "prefix" }, prefix.options.text), postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, postExcerptEdited), !postExcerpt.options.keepHtml && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postExcerptEdited), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postfix" }, postfix.options.text), readMore.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "readmore", onClick: handleLinkClick }, linkAttrItemsReadmore, { target: postExcerpt.options.linkTarget, href: postUrl }), " ", readMore.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-featured-image/index.js": /*!*************************************************!*\ !*** ./src/blocks/post-featured-image/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./placeholder.jpg */ "./src/blocks/post-featured-image/placeholder.jpg"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-featured-image/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_208)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 66.1177H84.7061V75.5294H160V66.1177Z", fill: "url(#paint1_linear_61_208)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141.177 84.9412H84.7061V94.3529H141.177V84.9412Z", fill: "url(#paint2_linear_61_208)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_208", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_208", x1: "84.7061", y1: "70.8236", x2: "160", y2: "70.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_208", x1: "84.7061", y1: "89.647", x2: "141.177", y2: "89.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/post-featured-image"], transform: attributes => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/post-featured-image", { wrapper: { options: { tag: "div", class: "pg-post-featured-image", useAsBackground: "no" }, styles: { width: { Desktop: "100%" }, overflow: { Desktop: "hidden" } } }, featuredImage: { options: { tag: "", linkTo: attributes.isLink ? "postUrl" : "", customUrl: "", linkToMetaKey: "", altTextSrc: "imgAltText", altTextCustom: "", altTextMetaKey: "", titleTextSrc: "imgTitle", titleTextCustom: "", titleTextMetaKey: "", linkTarget: attributes.linkTarget, linkAttr: attributes.rel ? [{ id: "rel", val: attributes.rel }] : [], class: "", size: { Desktop: "full", Tablet: "full", Mobile: "full" } }, styles: { display: { Desktop: "block" }, maxWidth: { Desktop: "100%" }, height: { Desktop: "auto" } } } }); } }, { type: "block", blocks: ["core/site-logo"], transform: attributes => { console.log(attributes); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/post-featured-image", { wrapper: { options: { tag: "div", class: "pg-post-featured-image", useAsBackground: "no" }, styles: { width: { Desktop: "100%" }, overflow: { Desktop: "hidden" } } }, featuredImage: { options: { tag: "", linkTo: attributes.isLink ? "postUrl" : "", customUrl: "", linkToMetaKey: "", altTextSrc: "imgAltText", altTextCustom: "", altTextMetaKey: "", titleTextSrc: "imgTitle", titleTextCustom: "", titleTextMetaKey: "", linkTarget: attributes.linkTarget, linkAttr: [], class: "", size: { Desktop: "full", Tablet: "full", Mobile: "full" } }, styles: { display: { Desktop: "block" }, maxWidth: { Desktop: "100%" }, height: { Desktop: "auto" } } } }); } }], to: [{ type: "block", blocks: ["core/post-featured-image"], transform: attributes => { var content = attributes.featuredImage.options; function checkIDExists(idToCheck) { return content.linkAttr.some(item => item.id === idToCheck); } const relExists = checkIDExists("rel"); var value = ""; if (relExists) { value = content.linkAttr.find(obj => obj.id === "rel"); } return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/post-featured-image", { isLink: content.linkTo ? true : false, linkTarget: content.linkTarget, rel: relExists ? value.val : null }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let featuredImage = attributes.featuredImage; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var utmTracking = attributes.utmTracking; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("isProFeature", true); var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var blockCssY = attributes.blockCssY; var demoImg = "src/blocks/post-featured-image/placeholder.jpg"; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [postImage, setPostImage] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [imageSizes, setImageSizes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [filterArgs, setfilterArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([{ label: "Blur", isPro: false, value: "blur", val: "", unit: "px" }, { label: "Brightness", isPro: false, value: "brightness", val: "10", unit: "%" }, { label: "Contrast", isPro: true, value: "contrast", val: "10", unit: "%" }, { label: "Grayscale", isPro: true, value: "grayscale", val: "10", unit: "%" }, { label: "Hue-rotate", isPro: true, value: "hue-rotate", val: "10", unit: "deg" }, { label: "Invert", isPro: true, value: "invert", val: "10", unit: "%" }, { label: "Opacity", isPro: true, value: "opacity", val: "10", unit: "%" }, { label: "Saturate", isPro: true, value: "saturate", val: "10", unit: "%" }, { label: "Sepia", value: "sepia", val: "10", unit: "%" }]); var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("linkToArgs", linkToArgsBasic); var altTextSrcArgsBasic = { none: { label: "No Alt Text", value: "" }, imgAltText: { label: "Image Alt Text", value: "imgAltText" }, imgTitle: { label: "Image Title", value: "imgTitle" }, imgCaption: { label: "Image Caption", value: "imgCaption" }, imgDescription: { label: "Image Description", value: "imgDescription" }, imgSlug: { label: "Image Slug", value: "imgSlug" }, postTitle: { label: "Post Title", value: "postTitle" }, postSlug: { label: "Post Slug", value: "postSlug" }, excerpt: { label: "Post Excerpt", value: "excerpt", isPro: true }, customField: { label: "Post Custom Field", value: "customField", isPro: true }, custom: { label: "Custom", value: "custom", isPro: true } }; let altTextSrcArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("altTextSrcArgs", altTextSrcArgsBasic); var customTagArgsBasic = { "": { label: "Choose", value: "" }, h1: { label: "H1", value: "h1" }, h2: { label: "H2", value: "h2" }, h3: { label: "H3", value: "h3" }, h4: { label: "H4", value: "h4" }, h5: { label: "H5", value: "h5" }, h6: { label: "H6", value: "h6" }, span: { label: "SPAN", value: "span" }, div: { label: "DIV", value: "div" }, p: { label: "P", value: "p" } }; let customTagArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("customTagArgs", customTagArgsBasic); const ALLOWED_MEDIA_TYPES = ["image"]; const [currentPostImageId, setCurrentPostImageId] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "featured_media", postId); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (!currentPostImageId) return; _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_11___default()({ path: "/wp/v2/media/" + currentPostImageId, method: "POST", data: { id: currentPostImageId } }).then(res => { setPostImage(res); var imgSizes = {}; Object.keys(res.media_details.sizes).map(x => { var height = res.media_details.sizes[x].height; var width = res.media_details.sizes[x].width; //var crop = res[x].crop var label = x.replaceAll("_", " "); imgSizes[x] = { label: label + "(" + width + "*" + height + ")", value: x, height: height, width: width }; }); setImageSizes(imgSizes); }); // apiFetch({ // path: '/post-grid/v2/get_image_sizes', // method: 'POST', // data: {}, // }).then((res) => { // var imgSizes = []; // Object.keys(res).map(x => { // var height = res[x].height // var width = res[x].width // var crop = res[x].crop // imgSizes.push({ label: x + "(" + width + "*" + height + ")", value: x, height: height, width: width, crop: crop }); // }) // imgSizes.push({ label: "Full(**)", value: 'full', height: '', width: '', crop: true }); // setImageSizes(imgSizes) // }); }, [currentPostImageId]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var featuredImageX = attributes.featuredImage; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (featuredImageX != undefined) { var featuredImageY = { ...featuredImageX, options: featuredImage.options }; setAttributes({ featuredImage: featuredImageY }); blockCssObj[imgSelector] = featuredImageY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function addfilterArgs(option, index) { var filterObj = {}; if (featuredImage.styles.filter[breakPointX] != undefined) { featuredImage.styles.filter[breakPointX].push(option); } else { featuredImage.styles.filter[breakPointX] = []; featuredImage.styles.filter[breakPointX].push(option); } var styles = { ...featuredImage.styles, filter: featuredImage.styles.filter }; setAttributes({ featuredImage: { ...featuredImage, styles: styles } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {}, [featuredImage]); function setFeaturedImageSize(option, index) { var newValuesObj = {}; if (Object.keys(featuredImage.options.size).length == 0) { newValuesObj[breakPointX] = option.value; } else { newValuesObj = featuredImage.options.size; newValuesObj[breakPointX] = option.value; } var options = { ...featuredImage.options, size: newValuesObj }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var linkSelector = ""; if (wrapper.options.tag.length != 0) { if (featuredImage.options.linkTo.length > 0) { linkSelector = blockClass + " a"; } else { linkSelector = blockClass; } } else { linkSelector = blockClass; } var imgSelector = blockClass + " img"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ featuredImage: featuredImage }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); //blockCssY.items[imgSelector] = { ...blockCssY.items[imgSelector], 'width': { "Desktop": "100%" } }; //blockCssY.items[imgSelector] = { ...blockCssY.items[imgSelector], 'height': { "Desktop": "auto" } }; //setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[imgSelector] = featuredImage; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); var BefroeTitle = function ({ title, args }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { featuredImage.styles.filter[breakPointX].splice(args.index, 1); var styles = featuredImage.styles; setAttributes({ featuredImage: { ...featuredImage, styles: styles } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-2" }, title)); }; function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryImage(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; featuredImage[sudoScource] = sudoScourceArgs; }); var featuredImageX = Object.assign({}, featuredImage); setAttributes({ featuredImage: featuredImageX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleImage(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, featuredImage); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ featuredImage: object }); var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleImage(sudoScource, key) { var object = myStore.deletePropertyDeep(featuredImage, [sudoScource, key, breakPointX]); setAttributes({ featuredImage: object }); var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleImage(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, featuredImage); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ featuredImage: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddFeaturedImage(sudoScource, cssObj) { let obj = Object.assign({}, featuredImage); obj[sudoScource] = cssObj; setAttributes({ featuredImage: obj }); var selector = myStore.getElementSelector(sudoScource, imgSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetFeaturedImage(sudoScources) { let obj = Object.assign({}, featuredImage); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, imgSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ featuredImage: obj }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [featuredImage]); var linkAttrObj = () => { var sdsd = {}; featuredImage.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = featuredImage.options.customUrl != undefined && featuredImage.options.customUrl.length > 0 ? featuredImage.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "span", value: "span" }, { label: "div", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } })), wrapper.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Image as Background"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: wrapper.options.useAsBackground, options: [{ label: "No", value: "no" }, { label: "Yes", value: "yes" }], onChange: newVal => { var options = { ...wrapper.options, useAsBackground: newVal }; var styles = { ...wrapper.styles, backgroundImage: {} }; if (newVal == "no") { setAttributes({ wrapper: { ...wrapper, options: options, styles: styles } }); var itemsX = { ...blockCssY.items }; itemsX[wrapperSelector] = { ...blockCssY.items[wrapperSelector], "background-image": {} }; setAttributes({ blockCssY: { items: itemsX } }); } if (newVal == "yes") { var newValuesObj = {}; if (wrapper.styles.backgroundImage == undefined || Object.keys(wrapper.styles.backgroundImage).length == 0) { newValuesObj[breakPointX] = 'url("' + (postImage == null) ? _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ : 0; } else { newValuesObj = wrapper.styles.backgroundImage; newValuesObj[breakPointX] = 'url("' + (postImage == null) ? _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ : 0; } var styles = { ...wrapper.styles, backgroundImage: newValuesObj }; setAttributes({ wrapper: { ...wrapper, styles: styles, options: options } }); var itemsX = { ...blockCssY.items }; itemsX[wrapperSelector] = { ...blockCssY.items[wrapperSelector], "background-image": newValuesObj }; //setAttributes({ blockCssY: { items: itemsX } }); } } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Featured Image", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 block pb-2 " }, "Thumbnail Size"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right" // btnClass="w-full block text-center " , btnClass: "flex w-full gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // variant="secondary" , options: imageSizes // buttonTitle="Choose" , buttonTitle: featuredImage.options.size == undefined ? "Choose" : imageSizes[featuredImage.options.size[breakPointX]] == undefined ? "Choose" : imageSizes[featuredImage.options.size[breakPointX]].label, onChange: setFeaturedImageSize, values: featuredImage.options.size[breakPointX] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: featuredImage.options.linkTo.length == 0 ? "Choose" : linkToArgs[featuredImage.options.linkTo].label, options: linkToArgs, onChange: (option, index) => { var options = { ...featuredImage.options, linkTo: option.value }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); }, values: "" })), featuredImage.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: featuredImage.options.linkToMetaKey, onChange: newVal => { var options = { ...featuredImage.options, linkToMetaKey: newVal }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } })), featuredImage.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), featuredImage.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], onClick: ev => { var options = { ...featuredImage.options, customUrl: "" }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: featuredImage.options.customUrl, onChange: newVal => { var options = { ...featuredImage.options, customUrl: newVal.url }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", featuredImage.options.customUrl.length != 0 ? featuredImage.options.customUrl : "No link", " ")))), featuredImage.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: featuredImage.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...featuredImage.options, linkTarget: newVal }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = featuredImage.options.linkAttr.concat({ id: "", val: "" }); var options = { ...featuredImage.options, linkAttr: sdsd }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); linkAttrObj(); } }, "Add")), featuredImage.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: featuredImage.options.linkAttr[i].id, onChange: newVal => { featuredImage.options.linkAttr[i].id = newVal; var ssdsd = featuredImage.options.linkAttr.concat([]); var options = { ...featuredImage.options, linkAttr: ssdsd }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { featuredImage.options.linkAttr[i].val = newVal; var ssdsd = featuredImage.options.linkAttr.concat([]); var options = { ...featuredImage.options, linkAttr: ssdsd }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { featuredImage.options.linkAttr.splice(i, 1); var ssdsd = featuredImage.options.linkAttr.concat([]); var options = { ...featuredImage.options, linkAttr: ssdsd }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"] })))); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Alt Text Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: featuredImage.options.altTextSrc.length == 0 ? "Choose" : altTextSrcArgs[featuredImage.options.altTextSrc].label, options: altTextSrcArgs, onChange: (option, index) => { var options = { ...featuredImage.options, altTextSrc: option.value }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); }, values: "" })), featuredImage.options.altTextSrc == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Custom Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: [{ label: "Custom", value: "" }, { label: "Yoast meta", value: "_yoast_wpseo_metadesc" }, { label: "Rank Math meta", value: "rank_math_description" }, { label: "AIO SEO meta", value: "_aioseo_og_description" }, { label: "SEOPress meta", value: "_seopress_titles_desc" }, { label: "WP Meta SEO meta", value: "_metaseo_metadesc" }, { label: "The SEO Framework meta", value: "_genesis_description" }, { label: "SEO SIMPLE PACK meta", value: "ssp_meta_description" }], onChange: (option, index) => { var options = { ...featuredImage.options, altTextMetaKey: option.value }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: featuredImage.options.altTextMetaKey, onChange: newVal => { var options = { ...featuredImage.options, altTextMetaKey: newVal }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }))), featuredImage.options.altTextSrc == "custom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Alt Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: featuredImage.options.altTextCustom, onChange: newVal => { var options = { ...featuredImage.options, altTextCustom: newVal }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Title Text Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: featuredImage.options.titleTextSrc == undefined || featuredImage.options.titleTextSrc.length == 0 ? "Choose" : altTextSrcArgs[featuredImage.options.titleTextSrc].label, options: altTextSrcArgs, onChange: (option, index) => { var options = { ...featuredImage.options, titleTextSrc: option.value }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); }, values: "" })), featuredImage.options.titleTextSrc == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Custom Field"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", buttonTitle: "Choose", options: [{ label: "Custom", value: "" }, { label: "Yoast meta", value: "_yoast_wpseo_metadesc" }, { label: "Rank Math meta", value: "rank_math_description" }, { label: "AIO SEO meta", value: "_aioseo_og_description" }, { label: "SEOPress meta", value: "_seopress_titles_desc" }, { label: "WP Meta SEO meta", value: "_metaseo_metadesc" }, { label: "The SEO Framework meta", value: "_genesis_description" }, { label: "SEO SIMPLE PACK meta", value: "ssp_meta_description" }], onChange: (option, index) => { var options = { ...featuredImage.options, titleTextMetaKey: option.value }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: featuredImage.options.titleTextMetaKey, onChange: newVal => { var options = { ...featuredImage.options, titleTextMetaKey: newVal }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }))), featuredImage.options.titleTextSrc == "custom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Title Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { className: "mr-2", value: featuredImage.options.titleTextCustom, onChange: newVal => { var options = { ...featuredImage.options, titleTextCustom: newVal }; setAttributes({ featuredImage: { ...featuredImage, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: featuredImage, onChange: onChangeStyleImage, onAdd: onAddStyleImage, onBulkAdd: onBulkAddFeaturedImage, onRemove: onRemoveStyleImage, onReset: onResetFeaturedImage })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: featuredImage, onChange: onPickCssLibraryImage })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "post-featured-image", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-featured-image" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postImage == null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.useAsBackground == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, linkAttrItems, { style: { backgroundImage: "url(" + _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ + ")" } })), wrapper.options.useAsBackground == "no" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, featuredImage.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { onClick: handleLinkClick, href: postUrl, target: featuredImage.options.linkTarget }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ }, linkAttrItems, { alt: "Default Featured Image" }))), featuredImage.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ }, linkAttrItems, { alt: "Default Featured Image" })))), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, featuredImage.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { onClick: handleLinkClick, href: postUrl, target: featuredImage.options.linkTarget }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__ }, linkAttrItems, { alt: "Default Featured Image" }))), featuredImage.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, linkAttrItems, { src: _placeholder_jpg__WEBPACK_IMPORTED_MODULE_16__, alt: "Default Featured Image" })))), postImage != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.useAsBackground == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, featuredImage.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: handleLinkClick, href: postUrl }, blockProps, { target: featuredImage.options.linkTarget, style: { backgroundImage: "url(" + (postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[featuredImage.options.size[breakPointX]].source_url : "") + ")" } })), featuredImage.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { style: { backgroundImage: "url(" + (postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[featuredImage.options.size[breakPointX]].source_url : "") + ")" } }))), wrapper.options.useAsBackground == "no" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, featuredImage.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { onClick: handleLinkClick, href: postUrl, target: featuredImage.options.linkTarget }, featuredImage.options.size[breakPointX] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[featuredImage.options.size[breakPointX]].source_url : "", alt: postImage.alt_text })), postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: postImage != null && postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text })), featuredImage.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, featuredImage.options.size[breakPointX] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[featuredImage.options.size[breakPointX]].source_url : "", alt: postImage.alt_text })), postImage.media_details.sizes[featuredImage.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage != null && postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text }))))), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, featuredImage.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { onClick: handleLinkClick, href: postUrl, target: featuredImage.options.linkTarget }), featuredImage.options.size[breakPointX] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, linkAttrItems, { src: postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[featuredImage.options.size[breakPointX]].source_url : "", alt: postImage.alt_text })), postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: postImage != null && postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text })), featuredImage.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, featuredImage.options.size[breakPointX] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, linkAttrItems, { src: postImage != null && postImage.media_details.sizes[featuredImage.options.size[breakPointX]] != undefined ? postImage.media_details.sizes[featuredImage.options.size[breakPointX]].source_url : "", alt: postImage.alt_text })), postImage.media_details.sizes[featuredImage.options.size[breakPointX]] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { src: postImage != null && postImage.guid.rendered != undefined ? postImage.guid.rendered : "", alt: postImage.alt_text }))))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-grid-filterable-nav/index.js": /*!******************************************************!*\ !*** ./src/blocks/post-grid-filterable-nav/index.js ***! \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/pencil.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/cloud.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-grid-filterable-nav/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { parse } = wp.blockSerializationDefaultParser; const { RawHTML } = wp.element; // var select = wp.data.select('core/block-editor'); const ALLOWED_MEDIA_TYPES = ["image"]; // var queryPramsX = queryPrams.map((x, i) => { // return { value: i, label: x.label, description: x.description, isPro: x.isPro, } // }) var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { background: "#fff", foreground: "#fff", src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "161", viewBox: "0 0 160 161", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M61.1765 30H4.70588C3.4578 30 2.26085 30.4958 1.37832 31.3783C0.495798 32.2608 0 33.4578 0 34.7059V81.7647C0 83.0128 0.495798 84.2097 1.37832 85.0923C2.26085 85.9748 3.4578 86.4706 4.70588 86.4706H61.1765C62.4246 86.4706 63.6215 85.9748 64.504 85.0923C65.3866 84.2097 65.8824 83.0128 65.8824 81.7647V34.7059C65.8824 33.4578 65.3866 32.2608 64.504 31.3783C63.6215 30.4958 62.4246 30 61.1765 30ZM56.4706 77.0588H9.41177V39.4118H56.4706V77.0588Z", fill: "url(#paint0_linear_68_1139)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 44.1177H84.7061V53.5294H160V44.1177Z", fill: "url(#paint1_linear_68_1139)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.177 62.9414H84.7061V72.3532H141.177V62.9414Z", fill: "url(#paint2_linear_68_1139)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M61.1765 104H4.70588C3.4578 104 2.26085 104.496 1.37832 105.378C0.495798 106.261 0 107.458 0 108.706V155.765C0 157.013 0.495798 158.21 1.37832 159.092C2.26085 159.975 3.4578 160.471 4.70588 160.471H61.1765C62.4246 160.471 63.6215 159.975 64.504 159.092C65.3866 158.21 65.8824 157.013 65.8824 155.765V108.706C65.8824 107.458 65.3866 106.261 64.504 105.378C63.6215 104.496 62.4246 104 61.1765 104ZM56.4706 151.059H9.41177V113.412H56.4706V151.059Z", fill: "url(#paint3_linear_68_1139)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 118.118H84.7061V127.529H160V118.118Z", fill: "url(#paint4_linear_68_1139)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.177 136.941H84.7061V146.353H141.177V136.941Z", fill: "url(#paint5_linear_68_1139)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M43.9972 0H2C0.895431 0 0 0.89543 0 2V12C0 13.1046 0.895431 14 2 14H43.9972C45.1018 14 45.9972 13.1046 45.9972 12V2C45.9972 0.895431 45.1018 0 43.9972 0Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M100.999 0H59.002C57.8974 0 57.002 0.89543 57.002 2V12C57.002 13.1046 57.8974 14 59.002 14H100.999C102.103 14 102.999 13.1046 102.999 12V2C102.999 0.895431 102.103 0 100.999 0Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M158 0H116.003C114.899 0 114.003 0.89543 114.003 2V12C114.003 13.1046 114.899 14 116.003 14H158C159.105 14 160 13.1046 160 12V2C160 0.895431 159.105 0 158 0Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_68_1139", x1: "0", y1: "58.2353", x2: "65.8824", y2: "58.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_68_1139", x1: "84.7061", y1: "48.8236", x2: "160", y2: "48.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_68_1139", x1: "84.7061", y1: "67.6473", x2: "141.177", y2: "67.6473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_68_1139", x1: "0", y1: "132.235", x2: "65.8824", y2: "132.235", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_68_1139", x1: "84.7061", y1: "122.824", x2: "160", y2: "122.824", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_68_1139", x1: "84.7061", y1: "141.647", x2: "141.177", y2: "141.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var clientId = props.clientId; var context = props.context; var setAttributes = props.setAttributes; // var lazyLoad = attributes.lazyLoad; // var container = attributes.container; // var itemsWrap = attributes.itemsWrap; // var itemWrap = attributes.itemWrap; // var noPostsWrap = attributes.noPostsWrap; // var spinnerWrap = attributes.spinnerWrap; var filterable = attributes.filterable; var activeFilter = attributes.activeFilter; var filterGroupWrap = attributes.filterGroupWrap; var filterGroup = attributes.filterGroup; var queryArgs = attributes.queryArgs; var grid = attributes.grid; var blockCssY = attributes.blockCssY; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var parentFilterable = context["post-grid/filterable"] == undefined ? null : context["post-grid/filterable"]; var parentActiveFilter = context["post-grid/activeFilter"] == undefined ? null : context["post-grid/activeFilter"]; var parentFilterGroupWrap = context["post-grid/filterGroupWrap"] == undefined ? null : context["post-grid/filterGroupWrap"]; var parentFilterGroup = context["post-grid/filterGroup"] == undefined ? null : context["post-grid/filterGroup"]; var [isBusy, setIsBusy] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Using the hook. var [importLayoutOpen, setimportLayoutOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ id: 0, isOpen: false }); // Using the hook. const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__.useBlockProps)({ className: ` ${blockId} pg-post-grid` }); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__.store).getBlocks(clientId).length > 0, [clientId]); var containerSelector = blockClass; const itemsWrapSelector = blockClass + " .items-loop"; const itemWrapSelector = blockClass + " .item"; const noPostsSelector = blockClass + " .no-posts"; const lazyloadWrapSelector = blockClass + " .lazyLoad"; const spinnerSelector = blockClass + " .spinner"; const filterGroupWrapSelector = blockClass + " .filterable-group-wrap"; const filterGroupSelector = blockClass + " .filterable-group"; const filterGroupTitleSelector = blockClass + " .filterable-group-title"; const filterableSelector = blockClass + " .pg-filter"; const activeFilterSelector = blockClass + " .pg-filter.mixitup-control-active"; var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. const [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore != null ? myStore.getBreakPoint() : "Desktop"); const [postGridData, setPostGridData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(window.PostGridPluginData); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__.applyFilters)("isProFeature", true); const [clientData, setClientData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__.store); const [filterableTerms, setFilterableTerms] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const [spinner, setSpinner] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var clientDataX = myStore != null ? myStore.getclientdata() : ""; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (filterable.options.filters.length == 0) { setAttributes({ filterable: parentFilterable }); setAttributes({ activeFilter: parentActiveFilter }); setAttributes({ filterGroupWrap: parentFilterGroupWrap }); setAttributes({ filterGroup: parentFilterGroup }); } }, [parentFilterable]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setPostGridData(window.PostGridPluginData); }, [window.PostGridPluginData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setClientData(myStore != null ? myStore.getclientdata() : ""); }, [clientDataX]); // const ALLOWED_BLOCKS = ["post-grid/post-query"]; // const MY_TEMPLATE = [ // ["post-grid/post-query", {}], // ["post-grid/post-query-pagination", {}], // ]; const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__.useInnerBlocksProps)(blockProps, { // allowedBlocks: ALLOWED_BLOCKS, // template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); function fetchPostTypeTerms(keyword) { var postTypes = []; var terms = []; setIsBusy(true); setFilterableTerms([]); queryArgs.items.map(x => { if (x.id == "postType") { postTypes.push(x.val); } }); var sss = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default()({ path: "/post-grid/v2/post_type_objects", method: "POST", data: { postTypes: postTypes[0], search: keyword } }).then(result => { //setFilterablTerms(result); result.length > 0 && result.map(x => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_4___default()({ path: "/post-grid/v2/get_tax_terms", method: "POST", data: { taxonomy: x.id, search: keyword } }).then(res => { //setFilterablTerms(res); res.length > 0 && res.map(y => { terms.push(y); }); setFilterableTerms(terms); setIsBusy(false); }); }); //return result; }); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var filterableX = attributes.filterable; var activeFilterX = attributes.activeFilter; var filterGroupWrapX = attributes.filterGroupWrap; var filterGroupX = attributes.filterGroup; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (filterableX != undefined) { var filterableY = { ...filterableX, options: filterable.options }; setAttributes({ filterable: filterableY }); blockCssObj[filterableSelector] = filterableY; } if (activeFilterX != undefined) { var activeFilterY = { ...activeFilterX, options: activeFilter.options }; setAttributes({ activeFilter: activeFilterY }); blockCssObj[activeFilterSelector] = activeFilterY; } if (filterGroupWrapX != undefined) { var filterGroupWrapY = { ...filterGroupWrapX, options: filterGroupWrap.options }; setAttributes({ filterGroupWrap: filterGroupWrapY }); blockCssObj[filterGroupWrapSelector] = filterGroupWrapY; } if (filterGroupX != undefined) { var filterGroupY = { ...filterGroupX, options: filterGroup.options }; setAttributes({ filterGroup: filterGroupY }); blockCssObj[filterGroupSelector] = filterGroupY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryFilterable(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; filterable[sudoScource] = sudoScourceArgs; }); var paginationX = Object.assign({}, filterable); setAttributes({ filterable: paginationX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, filterableSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleFilterable(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, filterable); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ filterable: object }); var elementSelector = myStore.getElementSelector(sudoScource, filterableSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFilterable(sudoScource, key) { var object = myStore.deletePropertyDeep(filterable, [sudoScource, key, breakPointX]); setAttributes({ filterable: object }); var elementSelector = myStore.getElementSelector(sudoScource, filterableSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFilterable(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, filterable); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ filterable: object }); } function onPickCssLibraryActiveFilter(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; activeFilter[sudoScource] = sudoScourceArgs; }); var paginationX = Object.assign({}, activeFilter); setAttributes({ activeFilter: paginationX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, activeFilterSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleActiveFilter(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, activeFilter); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ activeFilter: object }); var elementSelector = myStore.getElementSelector(sudoScource, activeFilterSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleActiveFilter(sudoScource, key) { var object = myStore.deletePropertyDeep(activeFilter, [sudoScource, key, breakPointX]); setAttributes({ activeFilter: object }); var elementSelector = myStore.getElementSelector(sudoScource, activeFilterSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleActiveFilter(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, activeFilter); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ activeFilter: object }); } function onPickCssLibraryFilterGroup(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; filterGroup[sudoScource] = sudoScourceArgs; }); var paginationX = Object.assign({}, filterGroup); setAttributes({ filterGroup: paginationX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, filterGroupSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleFilterGroup(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, filterGroup); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ filterGroup: object }); var elementSelector = myStore.getElementSelector(sudoScource, filterGroupSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFilterGroup(sudoScource, key) { var object = myStore.deletePropertyDeep(filterGroup, [sudoScource, key, breakPointX]); setAttributes({ filterGroup: object }); var elementSelector = myStore.getElementSelector(sudoScource, filterGroupSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFilterGroup(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, filterGroup); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ filterGroup: object }); } function onPickCssLibraryFilterGroupWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; filterGroupWrap[sudoScource] = sudoScourceArgs; }); var paginationX = Object.assign({}, filterGroupWrap); setAttributes({ filterGroupWrap: paginationX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, filterGroupWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleFilterGroupWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, filterGroupWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ filterGroupWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, filterGroupWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFilterGroupWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(filterGroupWrap, [sudoScource, key, breakPointX]); setAttributes({ filterGroupWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, filterGroupWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFilterGroupWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, filterGroupWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ filterGroupWrap: object }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[filterGroupWrapSelector] = filterGroupWrap; blockCssObj[filterGroupSelector] = filterGroup; blockCssObj[filterableSelector] = filterable; blockCssObj[activeFilterSelector] = activeFilter; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { blockCssY.items[itemsWrapSelector] = blockCssY.items[itemsWrapSelector] != undefined ? blockCssY.items[itemsWrapSelector] : {}; var nthItemsResponsive = []; var itemX = { ...blockCssY.items }; for (var i = 0; i < 10; i++) { var selector = `${blockClass} .item:nth-child(${i})`; if (blockCssY.items[selector] != undefined) { delete blockCssY.items[selector]; } } var imtasdas = {}; nthItemsResponsive.length > 0 && nthItemsResponsive.map((nth, i) => { var selector = `${blockClass} .item:nth-child(${i + 1})`; Object.entries(nth).map(attr => { var attrId = attr[0]; var attrVal = attr[1]; if (imtasdas[selector] != undefined) {} else { imtasdas[selector] = {}; } if (imtasdas[selector][attrId] != undefined) {} else { imtasdas[selector][attrId] = {}; } imtasdas[selector][attrId] = attrVal; }); }); var asdsd = { ...blockCssY.items, ...imtasdas }; setAttributes({ blockCssY: { items: asdsd } }); }, [grid]); var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_15__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_15__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } var postTypes = []; const postTypesData = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_8__.store).getPostTypes({ per_page: -1 }), []); postTypesData !== null && postTypesData.map(x => { postTypes.push({ value: x.slug, label: x.name }); }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Filterable", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { variant: "secondary", className: "mb-2", onClick: ev => { var filters = filterable.options.filters.concat({ groupTitle: "", type: "", logic: "", showPostCount: "", items: [] }); var options = { ...filterable.options, filters: filters }; setAttributes({ filterable: { ...filterable, options: options } }); } }, "Add Filter Group"), filterable.options.filters.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: x.groupTitle ? x.groupTitle : "Filter Group " + i, initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { onClick: ev => { filterable.options.filters.splice(i, 1); var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); }, className: "cursor-pointer px-3 py-1 inline-block text-white bg-red-600 text-sm mb-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicon dashicons dashicons-no-alt" }), " ", "Delete Group"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Group Title"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: x.groupTitle, onChange: newVal => { filterable.options.filters[i].groupTitle = newVal; var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Group Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { value: x.type, options: [{ value: "inline", label: "Inline" }, { value: "dropdown", label: "Dropdown" }, { value: "radio", label: "Radio" }, { value: "checkbox", label: "Checkbox" }], onChange: newVal => { filterable.options.filters[i].type = newVal; var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Data Logic"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { value: x.logic, options: [{ value: "or", label: "OR" }, { value: "and", label: "AND" }], onChange: newVal => { filterable.options.filters[i].logic = newVal; var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Show Post Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { value: x.showPostCount, options: [{ value: "no", label: "No" }, { value: "yes", label: "Yes" }], onChange: newVal => { filterable.options.filters[i].showPostCount = newVal; var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-3 font-bold" }, "Search Terms"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "To add custom filter please use following format and hit Enter"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "Filter Name|filter-slug|15"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { autoComplete: "off", className: "my-3", placeholder: "Search Categories or terms", value: "", onKeyPress: ev => { if (ev.key === "Enter") { var filterParts = ev.target.value.split("|"); var ss = filterable.options.filters[i].items.concat({ id: 0, slug: filterParts[1], title: filterParts[0], count: filterParts[2] }); filterable.options.filters[i].items = ss; var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); } }, onChange: newVal => { clearTimeout(debounce); debounce = setTimeout(() => { if (newVal.length > 0) { fetchPostTypeTerms(newVal); } }, 2000); } }), x.items.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-1" }, "No terms added."), x.items.map((y, j) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "py-2 my-1 border-b border-gray-400 flex justify-between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, y.title), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { onClick: ev => { var options = { ...activeFilter.options, slug: activeFilter.options.slug == y.slug ? "" : y.slug }; setAttributes({ activeFilter: { ...activeFilter, options: options } }); }, className: [activeFilter.options.slug == y.slug ? "bg-blue-600 cursor-pointer p-1 text-white text-sm" : "bg-gray-400 cursor-pointer p-1 text-white text-sm"] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-yes-alt" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { onClick: ev => { filterable.options.filters[i].items.splice(j, 1); var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); }, className: "cursor-pointer p-1 text-white bg-red-600 text-sm" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicon dashicons dashicons-no-alt" })))); }), isBusy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "border-b border-gray-400 my-2 pb-1 bg-gray-200 p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Spinner, null)), filterableTerms.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-gray-200 p-2 mt-2" }, filterableTerms.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { title: "Click Add terms", className: "border-b border-gray-400 my-2 pb-1 cursor-pointer", onClick: ev => { if (x.slug) { var ss = filterable.options.filters[i].items.concat({ id: x.term_id, slug: x.slug, title: x.name, count: x.count }); filterable.options.filters[i].items = ss; var options = { ...filterable.options, filters: filterable.options.filters }; setAttributes({ filterable: { ...filterable, options: options } }); } } }, x.name, " (", x.count, ")"); }))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Enable Multifilter", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.multifilter, options: [{ label: "True", value: true }, { label: "False", value: false }], onChange: newVal => { var options = { ...filterable.options, multifilter: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Enable Filter Toggle", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.filterToggle, options: [{ label: "Yes", value: "yes" }, { label: "no", value: "no" }], onChange: newVal => { var options = { ...filterable.options, filterToggle: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), filterable.options.multifilter && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Logic Within Group", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.logicWithinGroup, options: [{ label: "OR", value: "or" }, { label: "AND", value: "and" }], onChange: newVal => { var options = { ...filterable.options, logicWithinGroup: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Logic Between Groups", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.logicBetweenGroups, options: [{ label: "OR", value: "or" }, { label: "AND", value: "and" }], onChange: newVal => { var options = { ...filterable.options, logicBetweenGroups: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Show Sort Filter", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.showSort, options: [{ label: "No", value: "no" }, { label: "Yes", value: "yes" }], onChange: newVal => { var options = { ...filterable.options, showSort: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Show Random Filter", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.showRandom, options: [{ label: "No", value: "no" }, { label: "Yes", value: "yes" }], onChange: newVal => { var options = { ...filterable.options, showRandom: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Show Clear Filter", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.showClear, options: [{ label: "No", value: "no" }, { label: "Yes", value: "yes" }], onChange: newVal => { var options = { ...filterable.options, showClear: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Show All Filter", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: filterable.options.showAll, options: [{ label: "No", value: "no" }, { label: "Yes", value: "yes" }], onChange: newVal => { var options = { ...filterable.options, showAll: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Items Per Page"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { type: "number", value: filterable.options.perPage != undefined ? filterable.options.perPage : 6, onChange: newVal => { var options = { ...filterable.options, perPage: newVal }; setAttributes({ filterable: { ...filterable, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Filter", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: filterable, onChange: onChangeStyleFilterable, onAdd: onAddStyleFilterable, onRemove: onRemoveStyleFilterable })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: filterable, onChange: onPickCssLibraryFilterable })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Active Filter", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: activeFilter, onChange: onChangeStyleActiveFilter, onAdd: onAddStyleActiveFilter, onRemove: onRemoveStyleActiveFilter })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: activeFilter, onChange: onPickCssLibraryActiveFilter })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Filter Group", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: filterGroup, onChange: onChangeStyleFilterGroup, onAdd: onAddStyleFilterGroup, onRemove: onRemoveStyleFilterGroup })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: filterGroup, onChange: onPickCssLibraryFilterGroup })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Filter Group Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_12__["default"], { obj: filterGroupWrap, onChange: onChangeStyleFilterGroupWrap, onAdd: onAddStyleFilterGroupWrap, onRemove: onRemoveStyleFilterGroupWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: filterGroup, onChange: onPickCssLibraryFilterGroupWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "post-grid-filterable-nav", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockPostGrid", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "", title: "Tutorials", initialOpen: false }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_13__["default"], { slug: "post-grid-filterable-nav" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "filterable-group-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "filterable-group" }, filterable.options.showAll == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-filter mixitup-control-active cusror-pointer filter-34534", "data-filter": "all" }, "All"))), filterable.options.filters.length > 0 && filterable.options.filters.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "filterable-group ", "data-logic": x.logic }, x.groupTitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "filterable-group-title " }, x.groupTitle), x.items.map(y => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: [activeFilter.options.slug == y.slug ? "mixitup-control-active pg-filter cursor-pointer" : "pg-filter cursor-pointer"], "terms-id": y.id, "data-filter": "." + y.slug }, y.title, " ", x.showPostCount == "yes" ? "(" + y.count + ")" : ""); })); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "filterable-group" }, filterable.options.showSort == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-filter mixitup-control-active cusror-pointer filter-34534", "data-filter": "" }, "ASC"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-filter cusror-pointer filter-34534", "data-filter": "" }, "DESC")), filterable.options.showRandom == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-filter cusror-pointer filter-34534", "data-filter": "" }, "Random")), filterable.options.showClear == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-filter cusror-pointer filter-34534", "data-filter": "" }, "Clear"), " "))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; // var wrapper = attributes.wrapper; // var blockId = attributes.blockId; // const blockProps = useBlockProps.save({ // className: ` ${blockId} `, // }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_5__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/post-grid-filterable/index.js": /*!**************************************************!*\ !*** ./src/blocks/post-grid-filterable/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); /* 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 _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_10__); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./variations */ "./src/blocks/post-grid-filterable/variations.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-grid-filterable/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { parse } = wp.blockSerializationDefaultParser; const { RawHTML } = wp.element; // var select = wp.data.select('core/block-editor'); const ALLOWED_MEDIA_TYPES = ["image"]; // var queryPramsX = queryPrams.map((x, i) => { // return { value: i, label: x.label, description: x.description, isPro: x.isPro, } // }) var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { background: "#fff", foreground: "#fff", src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "161", viewBox: "0 0 160 161", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.175 30H4.70442C3.45634 30 2.25938 30.4958 1.37686 31.3783C0.494333 32.2608 -0.00146484 33.4578 -0.00146484 34.7059V81.7647C-0.00146484 83.0128 0.494333 84.2097 1.37686 85.0923C2.25938 85.9748 3.45634 86.4706 4.70442 86.4706H61.175C62.4231 86.4706 63.62 85.9748 64.5026 85.0923C65.3851 84.2097 65.8809 83.0128 65.8809 81.7647V34.7059C65.8809 33.4578 65.3851 32.2608 64.5026 31.3783C63.62 30.4958 62.4231 30 61.175 30ZM56.4691 77.0588H9.4103V39.4118H56.4691V77.0588Z", fill: "url(#paint0_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.999 44.1177H84.7046V53.5294H159.999V44.1177Z", fill: "url(#paint1_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141.175 62.9414H84.7046V72.3532H141.175V62.9414Z", fill: "url(#paint2_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.175 104H4.70442C3.45634 104 2.25938 104.496 1.37686 105.378C0.494333 106.261 -0.00146484 107.458 -0.00146484 108.706V155.765C-0.00146484 157.013 0.494333 158.21 1.37686 159.092C2.25938 159.975 3.45634 160.471 4.70442 160.471H61.175C62.4231 160.471 63.62 159.975 64.5026 159.092C65.3851 158.21 65.8809 157.013 65.8809 155.765V108.706C65.8809 107.458 65.3851 106.261 64.5026 105.378C63.62 104.496 62.4231 104 61.175 104ZM56.4691 151.059H9.4103V113.412H56.4691V151.059Z", fill: "url(#paint3_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.999 118.118H84.7046V127.529H159.999V118.118Z", fill: "url(#paint4_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141.175 136.941H84.7046V146.353H141.175V136.941Z", fill: "url(#paint5_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M43.9957 0H1.99854C0.893966 0 -0.00146484 0.89543 -0.00146484 2V12C-0.00146484 13.1046 0.893966 14 1.99854 14H43.9957C45.1003 14 45.9957 13.1046 45.9957 12V2C45.9957 0.895431 45.1003 0 43.9957 0Z", fill: "url(#paint6_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M100.997 0H59.0005C57.8959 0 57.0005 0.89543 57.0005 2V12C57.0005 13.1046 57.8959 14 59.0005 14H100.997C102.102 14 102.997 13.1046 102.997 12V2C102.997 0.895431 102.102 0 100.997 0Z", fill: "url(#paint7_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M157.999 0H116.002C114.897 0 114.002 0.89543 114.002 2V12C114.002 13.1046 114.897 14 116.002 14H157.999C159.103 14 159.999 13.1046 159.999 12V2C159.999 0.895431 159.103 0 157.999 0Z", fill: "url(#paint8_linear_61_82)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_82", x1: "-0.00146484", y1: "58.2353", x2: "65.8809", y2: "58.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_82", x1: "84.7046", y1: "48.8236", x2: "159.999", y2: "48.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_82", x1: "84.7046", y1: "67.6473", x2: "141.175", y2: "67.6473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_82", x1: "-0.00146484", y1: "132.235", x2: "65.8809", y2: "132.235", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_82", x1: "84.7046", y1: "122.824", x2: "159.999", y2: "122.824", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_82", x1: "84.7046", y1: "141.647", x2: "141.175", y2: "141.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint6_linear_61_82", x1: "-0.00146484", y1: "7", x2: "45.9957", y2: "7", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint7_linear_61_82", x1: "57.0005", y1: "7", x2: "102.997", y2: "7", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint8_linear_61_82", x1: "114.002", y1: "7", x2: "159.999", y2: "7", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var clientId = props.clientId; var setAttributes = props.setAttributes; var lazyLoad = attributes.lazyLoad; var container = attributes.container; var itemsWrap = attributes.itemsWrap; var itemWrap = attributes.itemWrap; var noPostsWrap = attributes.noPostsWrap; var spinnerWrap = attributes.spinnerWrap; var filterable = attributes.filterable; var activeFilter = attributes.activeFilter; var filterGroupWrap = attributes.filterGroupWrap; var filterGroup = attributes.filterGroup; var queryArgs = attributes.queryArgs; var pagination = attributes.pagination; var paginationItem = attributes.paginationItem; var paginationItemActive = attributes.paginationItemActive; var layout = attributes.layout; var grid = attributes.grid; var nthItemStyle = attributes.nthItemStyle; var blockCssY = attributes.blockCssY; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var [isBusy, setIsBusy] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Using the hook. var [importLayoutOpen, setimportLayoutOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ id: 0, isOpen: false }); // Using the hook. const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} pg-post-grid` }); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_8__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store).getBlocks(clientId).length > 0, [clientId]); var containerSelector = blockClass; const itemsWrapSelector = blockClass + " .items-loop"; const itemWrapSelector = blockClass + " .item"; const noPostsSelector = blockClass + " .no-posts"; const lazyloadWrapSelector = blockClass + " .lazyLoad"; const spinnerSelector = blockClass + " .spinner"; const filterGroupWrapSelector = blockClass + " .filterable-group-wrap"; const filterGroupSelector = blockClass + " .filterable-group"; const filterGroupTitleSelector = blockClass + " .filterable-group-title"; const filterableSelector = blockClass + " .pg-filter"; const activeFilterSelector = blockClass + " .pg-filter.mixitup-control-active"; var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Using the hook. const [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore != null ? myStore.getBreakPoint() : "Desktop"); const [postGridData, setPostGridData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(window.PostGridPluginData); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.applyFilters)("isProFeature", true); const [clientData, setClientData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_8__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store); const [filterableTerms, setFilterableTerms] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [spinner, setSpinner] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var clientDataX = myStore != null ? myStore.getclientdata() : ""; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setPostGridData(window.PostGridPluginData); }, [window.PostGridPluginData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setClientData(myStore != null ? myStore.getclientdata() : ""); }, [clientDataX]); const ALLOWED_BLOCKS = ["post-grid/post-grid-filterable-nav", "post-grid/post-query", "post/grid/post-query-pagination"]; const MY_TEMPLATE = [["post-grid/post-grid-filterable-nav", {}], ["post-grid/post-query", {}], ["post-grid/post-query-pagination", {}]]; const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useInnerBlocksProps)(blockProps, { // allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); function fetchPostTypeTerms(keyword) { var postTypes = []; var terms = []; setIsBusy(true); setFilterableTerms([]); queryArgs.items.map(x => { if (x.id == "postType") { postTypes.push(x.val); } }); var sss = _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5___default()({ path: "/post-grid/v2/post_type_objects", method: "POST", data: { postTypes: postTypes[0], search: keyword } }).then(result => { //setFilterablTerms(result); result.length > 0 && result.map(x => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5___default()({ path: "/post-grid/v2/get_tax_terms", method: "POST", data: { taxonomy: x.id, search: keyword } }).then(res => { //setFilterablTerms(res); res.length > 0 && res.map(y => { terms.push(y); }); setFilterableTerms(terms); setIsBusy(false); }); }); //return result; }); } function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var lazyLoadX = attributes.lazyLoad; var containerX = attributes.container; var itemsWrapX = attributes.itemsWrap; var itemWrapX = attributes.itemWrap; var noPostsWrapX = attributes.noPostsWrap; var spinnerWrapX = attributes.spinnerWrap; var gridX = attributes.grid; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (gridX != undefined) { var gridY = { ...gridX, options: grid.options }; setAttributes({ grid: gridY }); blockCssObj[gridSelector] = gridY; } if (spinnerWrapX != undefined) { var spinnerWrapY = { ...spinnerWrapX, options: spinnerWrap.options }; setAttributes({ spinnerWrap: spinnerWrapY }); blockCssObj[spinnerWrapSelector] = spinnerWrapY; } if (noPostsWrapX != undefined) { var noPostsWrapY = { ...noPostsWrapX, options: noPostsWrap.options }; setAttributes({ noPostsWrap: noPostsWrapY }); blockCssObj[noPostsWrapSelector] = noPostsWrapY; } if (itemWrapX != undefined) { var itemWrapY = { ...itemWrapX, options: itemWrap.options }; setAttributes({ itemWrap: itemWrapY }); blockCssObj[itemWrapSelector] = itemWrapY; } if (itemsWrapX != undefined) { var itemsWrapY = { ...itemsWrapX, options: itemsWrap.options }; setAttributes({ itemsWrap: itemsWrapY }); blockCssObj[itemsWrapSelector] = itemsWrapY; } if (containerX != undefined) { var containerY = { ...containerX, options: container.options }; setAttributes({ container: containerY }); blockCssObj[containerSelector] = containerY; } if (lazyLoadX != undefined) { var lazyLoadY = { ...lazyLoadX, options: lazyLoad.options }; setAttributes({ lazyLoad: lazyLoadY }); blockCssObj[lazyLoadSelector] = lazyLoadY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeStyleContainer(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, container); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ container: object }); var elementSelector = myStore.getElementSelector(sudoScource, containerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleContainer(sudoScource, key) { var object = myStore.deletePropertyDeep(container, [sudoScource, key, breakPointX]); setAttributes({ container: object }); var elementSelector = myStore.getElementSelector(sudoScource, containerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleContainer(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, container); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ container: object }); } function onPickCssLibraryItemsWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; itemsWrap[sudoScource] = sudoScourceArgs; }); var itemsWrapX = Object.assign({}, itemsWrap); setAttributes({ itemsWrap: itemsWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemsWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleItemsWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, itemsWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ itemsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemsWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItemsWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(itemsWrap, [sudoScource, key, breakPointX]); setAttributes({ itemsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemsWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItemsWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, itemsWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ itemsWrap: object }); } function onPickCssLibraryItemWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; itemWrap[sudoScource] = sudoScourceArgs; }); var itemWrapX = Object.assign({}, itemWrap); setAttributes({ itemWrap: itemWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleItemWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, itemWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ itemWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItemWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(itemWrap, [sudoScource, key, breakPointX]); setAttributes({ itemWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItemWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, itemWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ itemWrap: object }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[containerSelector] = container; blockCssObj[itemsWrapSelector] = itemsWrap; blockCssObj[itemWrapSelector] = itemWrap; blockCssObj[noPostsSelector] = noPostsWrap; blockCssObj[lazyloadWrapSelector] = lazyLoad; blockCssObj[spinnerSelector] = spinnerWrap; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // useEffect(() => { // blockCssY.items[itemsWrapSelector] = // blockCssY.items[itemsWrapSelector] != undefined // ? blockCssY.items[itemsWrapSelector] // : {}; // var nthItemsResponsive = []; // var itemX = { ...blockCssY.items }; // Object.entries(grid.options.itemCss).map((args) => { // /****breakPoint****/ // var breakPoint = args[0]; // var nthItems = args[1]; // nthItems.length > 0 && // nthItems.map((x, i) => { // /****nthItems****/ // Object.entries(x).map((attr) => { // var attrId = attr[0]; // var attrVal = attr[1]; // if (nthItemsResponsive[i] != undefined) { // //nthItemsResponsive[i] = []; // } else { // nthItemsResponsive[i] = []; // } // if (nthItemsResponsive[i][attrId] != undefined) { // //nthItemsResponsive[i][attrId] = []; // } else { // nthItemsResponsive[i][attrId] = []; // } // if (nthItemsResponsive[i][attrId][breakPoint] != undefined) { // nthItemsResponsive[i][attrId][breakPoint] = attrVal; // } else { // nthItemsResponsive[i][attrId][breakPoint] = attrVal; // } // }); // }); // }); // for (var i = 0; i < 10; i++) { // var selector = `${blockClass} .item:nth-child(${i})`; // if (blockCssY.items[selector] != undefined) { // delete blockCssY.items[selector]; // } // } // var imtasdas = {}; // nthItemsResponsive.length > 0 && // nthItemsResponsive.map((nth, i) => { // var selector = `${blockClass} .item:nth-child(${i + 1})`; // Object.entries(nth).map((attr) => { // var attrId = attr[0]; // var attrVal = attr[1]; // if (imtasdas[selector] != undefined) { // } else { // imtasdas[selector] = {}; // } // if (imtasdas[selector][attrId] != undefined) { // } else { // imtasdas[selector][attrId] = {}; // } // imtasdas[selector][attrId] = attrVal; // }); // }); // var asdsd = { ...blockCssY.items, ...imtasdas }; // setAttributes({ blockCssY: { items: asdsd } }); // }, [grid]); function addMedia(option, index) { //var isExist = items.elements.find(x => x.label === option.label); var nthItemStyleX = [...nthItemStyle]; nthItemStyleX.push({}); setAttributes({ nthItemStyle: nthItemStyleX }); } function generateNthItemStyle() { blockCssY.items[itemsWrapSelector] = blockCssY.items[itemsWrapSelector] != undefined ? blockCssY.items[itemsWrapSelector] : {}; var nthItemsResponsive = []; var itemX = { ...blockCssY.items }; Object.entries(nthItemStyle).map(args => { /****breakPoint****/ var breakPoint = args[0]; var nthItems = args[1]; nthItems.length > 0 && nthItems.map((x, i) => { /****nthItems****/ Object.entries(x).map(attr => { var attrId = attr[0]; var attrVal = attr[1]; if (nthItemsResponsive[i] != undefined) { //nthItemsResponsive[i] = []; } else { nthItemsResponsive[i] = []; } if (nthItemsResponsive[i][attrId] != undefined) { //nthItemsResponsive[i][attrId] = []; } else { nthItemsResponsive[i][attrId] = []; } if (nthItemsResponsive[i][attrId][breakPoint] != undefined) { nthItemsResponsive[i][attrId][breakPoint] = attrVal; } else { nthItemsResponsive[i][attrId][breakPoint] = attrVal; } }); }); }); for (var i = 0; i < 10; i++) { var selector = `${blockClass} .item:nth-child(${i})`; if (blockCssY.items[selector] != undefined) { delete blockCssY.items[selector]; } } var imtasdas = {}; nthItemsResponsive.length > 0 && nthItemsResponsive.map((nth, i) => { var selector = `${blockClass} .item:nth-child(${i + 1})`; Object.entries(nth).map(attr => { var attrId = attr[0]; var attrVal = attr[1]; if (imtasdas[selector] != undefined) {} else { imtasdas[selector] = {}; } if (imtasdas[selector][attrId] != undefined) {} else { imtasdas[selector][attrId] = {}; } imtasdas[selector][attrId] = attrVal; }); }); var asdsd = { ...blockCssY.items, ...imtasdas }; setAttributes({ blockCssY: { items: asdsd } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { generateNthItemStyle(); }, [nthItemStyle]); var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_17__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_17__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } var postTypes = []; const postTypesData = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_8__.useSelect)(select => select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_9__.store).getPostTypes({ per_page: -1 }), []); postTypesData !== null && postTypesData.map(x => { postTypes.push({ value: x.slug, label: x.name }); }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var index = extra.index; var path = [sudoScource, attr, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.updatePropertyDeep(objX, path, newVal); var nthItemStyleX = [...nthItemStyle]; // var itemsX = { ...nthItemStyle }; nthItemStyleX[index] = object; setAttributes({ nthItemStyle: nthItemStyleX }); var selector = `${blockClass} .item:nth-child(${index + 1})`; //setAttributes({ obj: object }); var elementSelector = myStore.getElementSelector(sudoScource, selector); var cssPropty = myStore.cssAttrParse(attr); let itemsCssX = Object.assign({}, blockCssY.items); if (itemsCssX[elementSelector] == undefined) { itemsCssX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsCssX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var object = myStore.deletePropertyDeep(obj, [sudoScource, key, breakPointX]); var nthItemStyleX = [...nthItemStyle]; // var itemsX = { ...nthItemStyle }; nthItemStyleX[index] = object; setAttributes({ nthItemStyle: nthItemStyleX }); //setAttributes({ items: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(key); // var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); // setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var path = [sudoScource, key, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.addPropertyDeep(objX, path, ""); var nthItemStyleX = [...nthItemStyle]; nthItemStyleX[index] = object; //setAttributes({ nthItemStyle: object }); setAttributes({ nthItemStyle: nthItemStyleX }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, nthItemStyle); obj[sudoScource] = cssObj; setAttributes({ nthItemStyle: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Container", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "CSS Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], placeholder: "Add Class", value: container.options.class, onChange: newVal => { var options = { ...container.options, class: newVal }; setAttributes({ container: { styles: container.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: container, onChange: onChangeStyleContainer, onAdd: onAddStyleContainer, onRemove: onRemoveStyleContainer })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Grid Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: itemsWrap, onChange: onChangeStyleItemsWrap, onAdd: onAddStyleItemsWrap, onRemove: onRemoveStyleItemsWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Grid Item Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: itemWrap, onChange: onChangeStyleItemWrap, onAdd: onAddStyleItemWrap, onRemove: onRemoveStyleItemWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody // title="N'th Item CSS" , { opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "N'th Item CSS"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add N'th Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("button", { onClick: ev => addMedia() }, "Add")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_10__.ReactSortable, { list: nthItemStyle, handle: ".handle", setList: item => { // var nthItemStyleX = [...nthItemStyle]; // setAttributes({ nthItemStyle: { ...nthItemStyle, nthItemStyle: item } }); } }, nthItemStyle.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var nthItemStyleX = [...nthItemStyle]; nthItemStyleX.splice(index, 1); setAttributes({ nthItemStyle: nthItemStyleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-2" }, index + 1)), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: item, extra: { index: index }, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Lazy load", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Enable Lazy Load"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: lazyLoad.options.enable, options: [{ label: "Yes", value: "yes" }, { label: "No", value: "no" }], onChange: newVal => { var options = { ...lazyLoad.options, enable: newVal }; setAttributes({ lazyLoad: { ...lazyLoad, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Lazy load Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_11__["default"], { library: lazyLoad.options.icon != undefined ? lazyLoad.options.icon.library : "fontAwesome", srcType: lazyLoad.options.icon != undefined ? lazyLoad.options.icon.srcType : "class", iconSrc: lazyLoad.options.icon != undefined ? lazyLoad.options.icon.iconSrc : "", onChange: arg => { var options = { ...lazyLoad.options, icon: { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc } }; setAttributes({ lazyLoad: { ...lazyLoad, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Lazy Load Image"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.MediaUpload, { onSelect: media => { // media.id var options = { ...lazyLoad.options, srcUrl: media.url, srcId: media.id }; setAttributes({ lazyLoad: { ...lazyLoad, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: lazyLoad.options.srcId, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "border", onClick: open }, "Open Media Library") }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { className: "my-5", src: lazyLoad.options.srcUrl, alt: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "post-grid-filterable", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostGrid", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "", title: "Tutorials", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_15__["default"], { slug: "post-grid-filterable" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/post-grid-filterable-nav", { filterable: filterable, activeFilter: activeFilter, filterGroupWrap: filterGroupWrap, filterGroup: filterGroup }], ["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: queryArgs, itemsWrap: { options: { excludedWrapper: "" }, styles: [] }, itemWrap: { options: { tag: "div", class: "item", counterClass: true, termsClass: true, oddEvenClass: true }, styles: [] } }], ["post-grid/post-query-pagination", { pagination: pagination, paginationItem: paginationItem, paginationItemActive: paginationItemActive, next: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-right", position: "beforeText", class: "next" }, styles: [] }, previous: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-left", position: "beforeText", class: "previous" }, styles: [] }, start: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "start" }, styles: [] }, end: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "end" }, styles: [] } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_25__["default"], { blockName: "post-grid-filterable", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, innerBlocksProps.children)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, lazyLoad.options.enable == "yes" && isBusy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: lazyLoad.options.class }), isBusy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Spinner, null)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; // var wrapper = attributes.wrapper; // var blockId = attributes.blockId; // const blockProps = useBlockProps.save({ // className: ` ${blockId} `, // }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/post-grid-filterable/variations.js": /*!*******************************************************!*\ !*** ./src/blocks/post-grid-filterable/variations.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "3-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 Col"), isDefault: true, isPro: false, atts: { lazyLoad: { options: { class: "lazyLoad", enable: "no", srcUrl: "", srcId: "", icon: { library: "", srcType: "class", iconSrc: "" } }, styles: [] }, container: { options: { class: "" }, styles: [] }, itemsWrap: { options: { class: "items-loop" }, styles: { display: { Desktop: "grid" }, gridTemplateColumns: { Desktop: "1fr 1fr 1fr" }, gap: { Desktop: "2em" } } }, itemWrap: { options: { class: "item" }, styles: [] }, grid: { options: { itemCss: [] }, styles: { gridTemplateColumns: [], gridTemplateRows: [], colGap: [], rowGap: [], color: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] } }, innerBlocks: [["post-grid/post-grid-filterable-nav", { filterable: { options: { filters: [{ groupTitle: "", type: "", logic: "", showPostCount: "", items: [{ id: 33, slug: "dolorem", title: "dolorem", count: 6 }, { id: 34, slug: "ducimus", title: "ducimus", count: 5 }, { id: 36, slug: "sed", title: "sed", count: 7 }, { id: 1, slug: "uncategorized", title: "Uncategorized", count: 14 }] }], allText: "All", logicWithinGroup: "", logicBetweenGroups: "", multifilter: false, showSort: "", filterToggle: "no", showRandom: "", showAll: "yes", showClear: "", activeFilter: "", parPage: 6 }, styles: { color: { Desktop: "#000000" }, wordBreak: {}, padding: { Desktop: "8px 16px 8px 16px" }, margin: {}, display: { Desktop: "inline-block" }, cursor: { Desktop: "pointer" }, backgroundColor: { Desktop: "#9DD6DF" }, borderRadius: { Desktop: "6px 6px 6px 6px" }, fontSize: { Desktop: "16px" }, fontWeight: { Desktop: "600" } } }, activeFilter: { options: { slug: "all" }, styles: { color: { Desktop: "" }, wordBreak: {}, padding: { Desktop: "" }, margin: { Desktop: "" } } }, filterGroupWrap: { options: {}, styles: { color: {}, backgroundColor: {}, wordBreak: {}, padding: {}, margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "center" }, gap: { Desktop: "12px" } } }, filterGroup: { options: {}, styles: { color: {}, backgroundColor: {}, wordBreak: {}, padding: {}, margin: {}, display: { Desktop: "flex" }, gap: { Desktop: "12px" } } } }], ["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], multiple: false, id: "postType", label: "Post Types", description: "Select Post Types to Query" }, { val: ["publish"], multiple: false, id: "postStatus", label: "Post status", description: "Query post by post status" }, { val: "DESC", multiple: false, id: "order", label: "Order", description: "Post query order" }, { val: ["date"], multiple: false, id: "orderby", label: "Orderby", description: "Post query orderby" }, { val: "-1", multiple: false, id: "postsPerPage", label: "Posts Per Page", description: "Number of post to show per page" }, { val: "1", multiple: false, id: "paged", label: "Paged", description: "Pagination start with" }] }, itemsWrap: { options: { excludedWrapper: "" }, styles: [] }, itemWrap: { options: { tag: "div", class: "item", counterClass: true, termsClass: true, oddEvenClass: true }, styles: [] } }], ["post-grid/post-query-pagination", { pagination: { options: { class: "pagination pg-post-query-pagination", type: "normal", maxPageNum: "5", prevText: "", nextText: "", loadMoreText: "Load More", noMorePosts: "No More Posts", loadingText: "Loading...", loadingIcon: { loadingPosition: "beforeText", library: "fontAwesome", srcType: "class", iconSrc: "", class: "load-more" }, loadMoreIcon: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "load-more" } }, styles: { margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "center" }, alignItems: { Desktop: "center" }, gap: { Desktop: "1em" }, backgroundColor: { Desktop: "#ffffff" }, padding: { Desktop: "10px 10px 10px 10px" }, width: { Desktop: "max-content", Tablet: "auto" }, marginRight: { Desktop: "auto" }, marginLeft: { Desktop: "auto" }, borderRadius: { Desktop: "10px 10px 10px 10px" }, boxShadow: { Desktop: "0px 0px 0px 1px #50547d4f" }, border: { Desktop: "1px solid #5198dd" }, flexWrap: { Tablet: "wrap !important" } } }, paginationItem: { options: { class: "page-numbers " }, styles: { color: { Desktop: "#656565" }, fontSize: { Desktop: "16px" }, padding: [], backgroundColor: [], borderRadius: { Desktop: "50px 50px 50px 50px" }, boxShadow: [], border: [], fontWeight: { Desktop: "700" }, display: { Desktop: "inline-block" }, height: { Desktop: "50px" }, lineHeight: { Desktop: "50px" }, width: { Desktop: "50px" }, textAlign: { Desktop: "center" } } }, paginationItemActive: { options: { class: "page-numbers " }, styles: { backgroundColor: { Desktop: "#2c79d3" }, padding: [], borderRadius: [], color: { Desktop: "#ffffff" }, border: [], boxShadow: [], fontWeight: [] } }, next: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-right", position: "beforeText", class: "next" }, styles: [] }, previous: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-left", position: "beforeText", class: "previous" }, styles: [] }, start: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "start" }, styles: [] }, end: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "end" }, styles: [] } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }, { name: "1-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("1 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("1 Col"), isDefault: true, isPro: false, atts: { lazyLoad: { options: { class: "lazyLoad", enable: "no", srcUrl: "", srcId: "", icon: { library: "", srcType: "class", iconSrc: "" } }, styles: [] }, container: { options: { class: "" }, styles: [] }, itemsWrap: { options: { class: "items-loop" }, styles: { gridTemplateColumns: { Desktop: "1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, itemWrap: { options: { class: "item" }, styles: { padding: { Desktop: "0px 0px 40px 0px", Tablet: "0px 0px 0px 0px" }, position: { Desktop: "relative" } }, after: { position: { Desktop: "absolute !important" }, gridTemplateColumns: [], gap: [], content: { Desktop: '" "' }, height: { Desktop: "1px", Tablet: "0px" }, width: { Desktop: "100%", Tablet: "0px" }, top: { Desktop: "200px" }, left: { Desktop: "0px" }, backgroundColor: { Desktop: "#b98341" } } }, grid: { options: { itemCss: [] }, styles: { gridTemplateColumns: [], gridTemplateRows: [], colGap: [], rowGap: [], color: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] } }, innerBlocks: [["post-grid/post-grid-filterable-nav", { filterable: { options: { filters: [{ groupTitle: "", type: "", logic: "", showPostCount: "", items: [{ id: 33, slug: "dolorem", title: "dolorem", count: 6 }, { id: 34, slug: "ducimus", title: "ducimus", count: 5 }, { id: 36, slug: "sed", title: "sed", count: 7 }, { id: 1, slug: "uncategorized", title: "Uncategorized", count: 14 }] }], allText: "All", logicWithinGroup: "", logicBetweenGroups: "", multifilter: false, showSort: "", filterToggle: "no", showRandom: "", showAll: "yes", showClear: "", activeFilter: "", parPage: 6 }, styles: { color: { Desktop: "#000000" }, wordBreak: {}, padding: { Desktop: "8px 16px 8px 16px" }, margin: {}, display: { Desktop: "inline-block" }, cursor: { Desktop: "pointer" }, backgroundColor: { Desktop: "#9DD6DF" }, borderRadius: { Desktop: "6px 6px 6px 6px" }, fontSize: { Desktop: "16px" }, fontWeight: { Desktop: "600" } } }, activeFilter: { options: { slug: "all" }, styles: { color: { Desktop: "" }, wordBreak: {}, padding: { Desktop: "" }, margin: { Desktop: "" } } }, filterGroupWrap: { options: {}, styles: { color: {}, backgroundColor: {}, wordBreak: {}, padding: {}, margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "start" }, gap: { Desktop: "12px" } } }, filterGroup: { options: {}, styles: { color: {}, backgroundColor: {}, wordBreak: {}, padding: {}, margin: {}, display: { Desktop: "flex" }, gap: { Desktop: "12px" } } } }], ["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], id: "postType" }, { val: ["publish"], id: "postStatus" }, { val: "DESC", id: "order" }, { val: ["date"], id: "orderby" }, { val: "5", id: "postsPerPage" }, { val: "1", id: "paged" }] }, itemsWrap: { options: { excludedWrapper: "" }, styles: [] }, itemWrap: { options: { tag: "div", class: "item", counterClass: true, termsClass: true, oddEvenClass: true }, styles: [] } }], ["post-grid/post-query-pagination", { pagination: { options: { class: "pagination pg-post-query-pagination", type: "normal", maxPageNum: "5", prevText: "Previous", nextText: "Next", loadMoreText: "Load More", noMorePosts: "No More Posts", loadingText: "Loading...", loadingIcon: { loadingPosition: "beforeText", library: "fontAwesome", srcType: "class", iconSrc: "", class: "load-more" }, loadMoreIcon: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "load-more" } }, styles: { margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "center" }, alignItems: { Desktop: "center" }, gap: { Desktop: "0px" }, backgroundColor: { Desktop: "#ffffff" }, padding: [], width: { Desktop: "max-content", Tablet: "auto" }, marginRight: { Desktop: "auto" }, marginLeft: { Desktop: "auto" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, boxShadow: [], border: [], flexWrap: { Tablet: "wrap !important" } } }, paginationItem: { options: { class: "page-numbers " }, styles: { color: { Desktop: "#7b7b7b" }, fontSize: { Desktop: "16px" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: [], borderRadius: [], boxShadow: [], border: { Desktop: "1px solid #e3e3e3" }, fontWeight: { Desktop: "700" } } }, paginationItemActive: { options: { class: "page-numbers " }, styles: { backgroundColor: [], padding: [], borderRadius: [], color: { Desktop: "#e34f3f" }, border: [], boxShadow: [], fontWeight: [] } }, next: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "next" }, styles: [] }, previous: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "previous" }, styles: [] }, start: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "start" }, styles: [] }, end: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "end" }, styles: [] } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/post-grid/index.js": /*!***************************************!*\ !*** ./src/blocks/post-grid/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__); /* 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 _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _pagination_types__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./pagination-types */ "./src/blocks/post-grid/pagination-types.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-grid/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./variations */ "./src/blocks/post-grid/variations.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_25___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_25__); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { parse } = wp.blockSerializationDefaultParser; const { RawHTML } = wp.element; // var select = wp.data.select('core/block-editor'); const ALLOWED_MEDIA_TYPES = ["image"]; // var queryPramsX = queryPrams.map((x, i) => { // return { value: i, label: x.label, description: x.description, isPro: x.isPro, } // }) var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { background: "#fff", foreground: "#fff", src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 15H4.70588C3.4578 15 2.26085 15.4958 1.37832 16.3783C0.495798 17.2608 0 18.4578 0 19.7059V66.7647C0 68.0128 0.495798 69.2097 1.37832 70.0923C2.26085 70.9748 3.4578 71.4706 4.70588 71.4706H61.1765C62.4246 71.4706 63.6215 70.9748 64.504 70.0923C65.3866 69.2097 65.8824 68.0128 65.8824 66.7647V19.7059C65.8824 18.4578 65.3866 17.2608 64.504 16.3783C63.6215 15.4958 62.4246 15 61.1765 15ZM56.4706 62.0588H9.41177V24.4118H56.4706V62.0588Z", fill: "url(#paint0_linear_62_34)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 29.1177H84.7061V38.5294H160V29.1177Z", fill: "url(#paint1_linear_62_34)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141.177 47.9414H84.7061V57.3532H141.177V47.9414Z", fill: "url(#paint2_linear_62_34)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 89H4.70588C3.4578 89 2.26085 89.4958 1.37832 90.3783C0.495798 91.2608 0 92.4578 0 93.7059V140.765C0 142.013 0.495798 143.21 1.37832 144.092C2.26085 144.975 3.4578 145.471 4.70588 145.471H61.1765C62.4246 145.471 63.6215 144.975 64.504 144.092C65.3866 143.21 65.8824 142.013 65.8824 140.765V93.7059C65.8824 92.4578 65.3866 91.2608 64.504 90.3783C63.6215 89.4958 62.4246 89 61.1765 89ZM56.4706 136.059H9.41177V98.4118H56.4706V136.059Z", fill: "url(#paint3_linear_62_34)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 103.118H84.7061V112.529H160V103.118Z", fill: "url(#paint4_linear_62_34)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141.177 121.941H84.7061V131.353H141.177V121.941Z", fill: "url(#paint5_linear_62_34)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_62_34", x1: "0", y1: "43.2353", x2: "65.8824", y2: "43.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_62_34", x1: "84.7061", y1: "33.8236", x2: "160", y2: "33.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_62_34", x1: "84.7061", y1: "52.6473", x2: "141.177", y2: "52.6473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_62_34", x1: "0", y1: "117.235", x2: "65.8824", y2: "117.235", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_62_34", x1: "84.7061", y1: "107.824", x2: "160", y2: "107.824", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_62_34", x1: "84.7061", y1: "126.647", x2: "141.177", y2: "126.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var clientId = props.clientId; var setAttributes = props.setAttributes; var lazyLoad = attributes.lazyLoad; var container = attributes.container; var itemsWrap = attributes.itemsWrap; var itemWrap = attributes.itemWrap; var noPostsWrap = attributes.noPostsWrap; var spinnerWrap = attributes.spinnerWrap; var grid = attributes.grid; var nthItemStyle = attributes.nthItemStyle; var blockCssY = attributes.blockCssY; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var [isBusy, setIsBusy] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Using the hook. var [importLayoutOpen, setimportLayoutOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ id: 0, isOpen: false }); // Using the hook. const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} pg-post-grid` }); const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_8__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_8__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.store).getBlocks(clientId).length > 0, [clientId]); var containerSelector = blockClass; const itemsWrapSelector = blockClass + " .items-loop"; const itemWrapSelector = blockClass + " .item"; const noPostsSelector = blockClass + " .no-posts"; const lazyloadWrapSelector = blockClass + " .lazyLoad"; const spinnerSelector = blockClass + " .spinner"; var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Using the hook. const [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore != null ? myStore.getBreakPoint() : "Desktop"); const [postGridData, setPostGridData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(window.PostGridPluginData); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_4__.applyFilters)("isProFeature", true); const [clientData, setClientData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); var clientDataX = myStore != null ? myStore.getclientdata() : ""; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setPostGridData(window.PostGridPluginData); }, [window.PostGridPluginData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setClientData(myStore != null ? myStore.getclientdata() : ""); }, [clientDataX]); //const ALLOWED_BLOCKS = ["post-grid/post-query"]; const MY_TEMPLATE = [["post-grid/post-query", {}], ["post-grid/post-query-pagination", {}]]; const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useInnerBlocksProps)(blockProps, { //allowedBlocks: ALLOWED_BLOCKS, template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var lazyLoadX = attributes.lazyLoad; var containerX = attributes.container; var itemsWrapX = attributes.itemsWrap; var itemWrapX = attributes.itemWrap; var noPostsWrapX = attributes.noPostsWrap; var spinnerWrapX = attributes.spinnerWrap; // var gridX = attributes.grid; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; // if (gridX != undefined) { // var gridY = { ...gridX, options: grid.options }; // setAttributes({ grid: gridY }); // blockCssObj[gridSelector] = gridY; // } if (spinnerWrapX != undefined) { var spinnerWrapY = { ...spinnerWrapX, options: spinnerWrap.options }; setAttributes({ spinnerWrap: spinnerWrapY }); blockCssObj[spinnerWrapSelector] = spinnerWrapY; } if (noPostsWrapX != undefined) { var noPostsWrapY = { ...noPostsWrapX, options: noPostsWrap.options }; setAttributes({ noPostsWrap: noPostsWrapY }); blockCssObj[noPostsWrapSelector] = noPostsWrapY; } if (itemWrapX != undefined) { var itemWrapY = { ...itemWrapX, options: itemWrap.options }; setAttributes({ itemWrap: itemWrapY }); blockCssObj[itemWrapSelector] = itemWrapY; } if (itemsWrapX != undefined) { var itemsWrapY = { ...itemsWrapX, options: itemsWrap.options }; setAttributes({ itemsWrap: itemsWrapY }); blockCssObj[itemsWrapSelector] = itemsWrapY; } if (containerX != undefined) { var containerY = { ...containerX, options: container.options }; setAttributes({ container: containerY }); blockCssObj[containerSelector] = containerY; } if (lazyLoadX != undefined) { var lazyLoadY = { ...lazyLoadX, options: lazyLoad.options }; setAttributes({ lazyLoad: lazyLoadY }); blockCssObj[lazyLoadSelector] = lazyLoadY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeStyleContainer(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, container); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ container: object }); var elementSelector = myStore.getElementSelector(sudoScource, containerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleContainer(sudoScource, key) { var object = myStore.deletePropertyDeep(container, [sudoScource, key, breakPointX]); setAttributes({ container: object }); var elementSelector = myStore.getElementSelector(sudoScource, containerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleContainer(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, container); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ container: object }); } function onPickCssLibraryItemsWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; itemsWrap[sudoScource] = sudoScourceArgs; }); var itemsWrapX = Object.assign({}, itemsWrap); setAttributes({ itemsWrap: itemsWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemsWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleItemsWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, itemsWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ itemsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemsWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItemsWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(itemsWrap, [sudoScource, key, breakPointX]); setAttributes({ itemsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemsWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItemsWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, itemsWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ itemsWrap: object }); } function onPickCssLibraryItemWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; itemWrap[sudoScource] = sudoScourceArgs; }); var itemWrapX = Object.assign({}, itemWrap); setAttributes({ itemWrap: itemWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleItemWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, itemWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ itemWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItemWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(itemWrap, [sudoScource, key, breakPointX]); setAttributes({ itemWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItemWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, itemWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ itemWrap: object }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[containerSelector] = container; blockCssObj[itemsWrapSelector] = itemsWrap; blockCssObj[itemWrapSelector] = itemWrap; blockCssObj[noPostsSelector] = noPostsWrap; blockCssObj[lazyloadWrapSelector] = lazyLoad; blockCssObj[spinnerSelector] = spinnerWrap; // generateNthItemStyle(); var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: items } }); }, [blockId]); // useEffect(() => { // var blockCssObj = {}; // console.log(nthItemStyle); // console.log(nthItemStyle.length); // if (nthItemStyle.length > 0) { // for (let i = 1; i <= nthItemStyle.length; i++) { // var nthItemSelector = `${blockClass} .item:nth-child(${i})`; // blockCssObj[nthItemSelector] = nthItemStyle[i]; // var blockCssRules = myStore.getBlockCssRules(blockCssObj); // var items = { ...blockCssY.items, ...blockCssRules }; // setAttributes({ blockCssY: { items: items } }); // } // } // // generateNthItemStyle(); // }, [nthItemStyle]); // useEffect(() => { // if (nthItemStyle.length > 0) { // var blockCssObj = {}; // for (let i = 1; i <= nthItemStyle.length; i++) { // var nthItemSelector = `${blockClass} .item:nth-child(${i})`; // console.log(nthItemSelector) // blockCssObj[nthItemSelector] = nthItemStyle[i]; // var blockCssRules = myStore.getBlockCssRules(blockCssObj); // var items = { ...blockCssY.items, ...blockCssRules }; // setAttributes({ blockCssY: { items: items } }); // } // } // }, [nthItemStyle]); // useEffect(() => { // blockCssY.items[itemsWrapSelector] = // blockCssY.items[itemsWrapSelector] != undefined // ? blockCssY.items[itemsWrapSelector] // : {}; // var nthItemsResponsive = []; // var itemX = { ...blockCssY.items }; // Object.entries(grid.options.itemCss).map((args) => { // /****breakPoint****/ // var breakPoint = args[0]; // var nthItems = args[1]; // nthItems.length > 0 && // nthItems.map((x, i) => { // /****nthItems****/ // Object.entries(x).map((attr) => { // var attrId = attr[0]; // var attrVal = attr[1]; // if (nthItemsResponsive[i] != undefined) { // //nthItemsResponsive[i] = []; // } else { // nthItemsResponsive[i] = []; // } // if (nthItemsResponsive[i][attrId] != undefined) { // //nthItemsResponsive[i][attrId] = []; // } else { // nthItemsResponsive[i][attrId] = []; // } // if (nthItemsResponsive[i][attrId][breakPoint] != undefined) { // nthItemsResponsive[i][attrId][breakPoint] = attrVal; // } else { // nthItemsResponsive[i][attrId][breakPoint] = attrVal; // } // }); // }); // }); // for (var i = 0; i < 10; i++) { // var selector = `${blockClass} .item:nth-child(${i})`; // if (blockCssY.items[selector] != undefined) { // delete blockCssY.items[selector]; // } // } // var imtasdas = {}; // nthItemsResponsive.length > 0 && // nthItemsResponsive.map((nth, i) => { // var selector = `${blockClass} .item:nth-child(${i + 1})`; // Object.entries(nth).map((attr) => { // var attrId = attr[0]; // var attrVal = attr[1]; // if (imtasdas[selector] != undefined) { // } else { // imtasdas[selector] = {}; // } // if (imtasdas[selector][attrId] != undefined) { // } else { // imtasdas[selector][attrId] = {}; // } // imtasdas[selector][attrId] = attrVal; // }); // }); // var asdsd = { ...blockCssY.items, ...imtasdas }; // setAttributes({ blockCssY: { items: asdsd } }); // }, [grid]); function generateNthItemStyle() { blockCssY.items[itemsWrapSelector] = blockCssY.items[itemsWrapSelector] != undefined ? blockCssY.items[itemsWrapSelector] : {}; var nthItemsResponsive = []; var itemX = { ...blockCssY.items }; Object.entries(nthItemStyle).map(args => { /****breakPoint****/ var breakPoint = args[0]; var nthItems = args[1]; nthItems.length > 0 && nthItems.map((x, i) => { /****nthItems****/ Object.entries(x).map(attr => { var attrId = attr[0]; var attrVal = attr[1]; if (nthItemsResponsive[i] != undefined) { //nthItemsResponsive[i] = []; } else { nthItemsResponsive[i] = []; } if (nthItemsResponsive[i][attrId] != undefined) { //nthItemsResponsive[i][attrId] = []; } else { nthItemsResponsive[i][attrId] = []; } if (nthItemsResponsive[i][attrId][breakPoint] != undefined) { nthItemsResponsive[i][attrId][breakPoint] = attrVal; } else { nthItemsResponsive[i][attrId][breakPoint] = attrVal; } }); }); }); for (var i = 0; i < 10; i++) { var selector = `${blockClass} .item:nth-child(${i})`; if (blockCssY.items[selector] != undefined) { delete blockCssY.items[selector]; } } var imtasdas = {}; nthItemsResponsive.length > 0 && nthItemsResponsive.map((nth, i) => { var selector = `${blockClass} .item:nth-child(${i + 1})`; Object.entries(nth).map(attr => { var attrId = attr[0]; var attrVal = attr[1]; if (imtasdas[selector] != undefined) {} else { imtasdas[selector] = {}; } if (imtasdas[selector][attrId] != undefined) {} else { imtasdas[selector][attrId] = {}; } imtasdas[selector][attrId] = attrVal; }); }); var asdsd = { ...blockCssY.items, ...imtasdas }; setAttributes({ blockCssY: { items: asdsd } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { generateNthItemStyle(); }, [nthItemStyle]); var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_17__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_17__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } var postTypes = []; const postTypesData = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_8__.useSelect)(select => select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_9__.store).getPostTypes({ per_page: -1 }), []); postTypesData !== null && postTypesData.map(x => { postTypes.push({ value: x.slug, label: x.name }); }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); function addMedia(option, index) { //var isExist = items.elements.find(x => x.label === option.label); var nthItemStyleX = [...nthItemStyle]; nthItemStyleX.push({}); setAttributes({ nthItemStyle: nthItemStyleX }); } function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var index = extra.index; var path = [sudoScource, attr, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.updatePropertyDeep(objX, path, newVal); var nthItemStyleX = [...nthItemStyle]; // var itemsX = { ...nthItemStyle }; nthItemStyleX[index] = object; // console.log(itemsX.elements); setAttributes({ nthItemStyle: nthItemStyleX }); var selector = `${blockClass} .item:nth-child(${index + 1})`; //setAttributes({ obj: object }); var elementSelector = myStore.getElementSelector(sudoScource, selector); var cssPropty = myStore.cssAttrParse(attr); let itemsCssX = Object.assign({}, blockCssY.items); if (itemsCssX[elementSelector] == undefined) { itemsCssX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsCssX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var object = myStore.deletePropertyDeep(obj, [sudoScource, key, breakPointX]); var nthItemStyleX = [...nthItemStyle]; // var itemsX = { ...nthItemStyle }; nthItemStyleX[index] = object; setAttributes({ nthItemStyle: nthItemStyleX }); //setAttributes({ items: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(key); // var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); // setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var path = [sudoScource, key, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.addPropertyDeep(objX, path, ""); var nthItemStyleX = [...nthItemStyle]; nthItemStyleX[index] = object; //setAttributes({ nthItemStyle: object }); setAttributes({ nthItemStyle: nthItemStyleX }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, nthItemStyle); obj[sudoScource] = cssObj; setAttributes({ nthItemStyle: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Container", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "CSS Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], placeholder: "Add Class", value: container.options.class, onChange: newVal => { var options = { ...container.options, class: newVal }; setAttributes({ container: { styles: container.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: container, onChange: onChangeStyleContainer, onAdd: onAddStyleContainer, onRemove: onRemoveStyleContainer })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Grid Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: itemsWrap, onChange: onChangeStyleItemsWrap, onAdd: onAddStyleItemsWrap, onRemove: onRemoveStyleItemsWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Grid Item Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: itemWrap, onChange: onChangeStyleItemWrap, onAdd: onAddStyleItemWrap, onRemove: onRemoveStyleItemWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "N'th Item CSS", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add N'th Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("button", { onClick: ev => addMedia() }, "Add")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_25__.ReactSortable, { list: nthItemStyle, handle: ".handle", setList: item => { // var nthItemStyleX = [...nthItemStyle]; // setAttributes({ nthItemStyle: { ...nthItemStyle, nthItemStyle: item } }); } }, nthItemStyle.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var nthItemStyleX = [...nthItemStyle]; nthItemStyleX.splice(index, 1); setAttributes({ nthItemStyle: nthItemStyleX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-2" }, index + 1)), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: item, extra: { index: index }, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Lazy load", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Enable Lazy Load"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.SelectControl, { label: "", value: lazyLoad.options.enable, options: [{ label: "Yes", value: "yes" }, { label: "No", value: "no" }], onChange: newVal => { var options = { ...lazyLoad.options, enable: newVal }; setAttributes({ lazyLoad: { ...lazyLoad, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Lazy load Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_10__["default"], { library: lazyLoad.options.icon != undefined ? lazyLoad.options.icon.library : "fontAwesome", srcType: lazyLoad.options.icon != undefined ? lazyLoad.options.icon.srcType : "class", iconSrc: lazyLoad.options.icon != undefined ? lazyLoad.options.icon.iconSrc : "", onChange: arg => { var options = { ...lazyLoad.options, icon: { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc } }; setAttributes({ lazyLoad: { ...lazyLoad, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Lazy Load Image"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.MediaUpload, { onSelect: media => { // media.id var options = { ...lazyLoad.options, srcUrl: media.url, srcId: media.id }; setAttributes({ lazyLoad: { ...lazyLoad, options: options } }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, value: lazyLoad.options.srcId, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: "border", onClick: open }, "Open Media Library") }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { className: "my-5", src: lazyLoad.options.srcUrl, alt: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "post-grid", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostGrid", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "", title: "Tutorials", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_15__["default"], { slug: "post-grid" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], multiple: false, id: "postType", label: "Post Types", description: "Select Post Types to Query" }, { val: ["publish"], multiple: false, id: "postStatus", label: "Post status", description: "Query post by post status" }, { val: "DESC", multiple: false, id: "order", label: "Order", description: "Post query order" }, { val: ["date"], multiple: false, id: "orderby", label: "Orderby", description: "Post query orderby" }, { val: "3", multiple: false, id: "postsPerPage", label: "Posts Per Page", description: "Number of post to show per page" }, { val: "1", multiple: false, id: "paged", label: "Paged", description: "Pagination start with" }] }, itemsWrap: { options: { excludedWrapper: "" }, styles: [] }, itemWrap: { options: { tag: "div", class: "item", counterClass: true, termsClass: true, oddEvenClass: true }, styles: [] } }], ["post-grid/post-query-pagination", { pagination: { options: { class: "pagination pg-post-query-pagination", type: "normal", maxPageNum: "5", prevText: "Previous", nextText: "Next", loadMoreText: "Load More", noMorePosts: "No More Posts", loadingText: "Loading...", loadingIcon: { loadingPosition: "beforeText", library: "fontAwesome", srcType: "class", iconSrc: "", class: "load-more" }, loadMoreIcon: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "load-more" } }, styles: { margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "center" }, alignItems: { Desktop: "center" }, gap: { Desktop: "0px" }, backgroundColor: { Desktop: "#ffffff" }, padding: [], width: { Desktop: "max-content", Tablet: "auto" }, marginRight: { Desktop: "auto" }, marginLeft: { Desktop: "auto" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, boxShadow: [], border: [], flexWrap: { Tablet: "wrap !important" } } }, paginationItem: { options: { class: "page-numbers " }, styles: { color: { Desktop: "#7b7b7b" }, fontSize: { Desktop: "16px" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: [], borderRadius: [], boxShadow: [], border: { Desktop: "1px solid #e3e3e3" }, fontWeight: { Desktop: "700" } } }, paginationItemActive: { options: { class: "page-numbers " }, styles: { backgroundColor: [], padding: [], borderRadius: [], color: { Desktop: "#e34f3f" }, border: [], boxShadow: [], fontWeight: [] } }, next: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "next" }, styles: [] }, previous: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "previous" }, styles: [] }, start: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "start" }, styles: [] }, end: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "end" }, styles: [] } }]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__["default"], { blockName: "post-grid", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, innerBlocksProps.children)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, lazyLoad.options.enable == "yes" && isBusy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: lazyLoad.options.class }), isBusy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Spinner, null)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; // var wrapper = attributes.wrapper; // var blockId = attributes.blockId; // const blockProps = useBlockProps.save({ // className: ` ${blockId} `, // }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/post-grid/pagination-types.js": /*!**************************************************!*\ !*** ./src/blocks/post-grid/pagination-types.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); const paginationTypesBasic = { none: { label: 'None', value: 'none', isPro: false }, normal: { label: 'Normal Pagination', value: 'normal', isPro: false }, ajax: { label: 'Ajax Pagination', value: 'ajax', isPro: true }, next_previous: { label: 'Next-Previous', value: 'next_previous', isPro: true }, loadmore: { label: 'Load More', value: 'loadmore', isPro: true }, infinite: { label: 'Infinite Load', value: 'infinite', isPro: true } }; let paginationTypes = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)('paginationTypes', paginationTypesBasic); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (paginationTypes); /***/ }), /***/ "./src/blocks/post-grid/variations.js": /*!********************************************!*\ !*** ./src/blocks/post-grid/variations.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "3-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("3 Col"), isDefault: true, isPro: false, atts: { lazyLoad: { options: { class: "lazyLoad", enable: "no", srcUrl: "", srcId: "", icon: { library: "", srcType: "class", iconSrc: "" } }, styles: [] }, container: { options: { class: "" }, styles: [] }, itemsWrap: { options: { class: "items-loop" }, styles: { gridTemplateColumns: { Desktop: "1fr 1fr 1fr", Mobile: "1fr" }, gap: { Desktop: "2em" }, display: { Desktop: "grid" } } }, itemWrap: { options: { class: "item" }, styles: [] }, noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] } }, innerBlocks: [["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], multiple: false, id: "postType", label: "Post Types", description: "Select Post Types to Query" }, { val: ["publish"], multiple: false, id: "postStatus", label: "Post status", description: "Query post by post status" }, { val: "DESC", multiple: false, id: "order", label: "Order", description: "Post query order" }, { val: ["date"], multiple: false, id: "orderby", label: "Orderby", description: "Post query orderby" }, { val: "3", multiple: false, id: "postsPerPage", label: "Posts Per Page", description: "Number of post to show per page" }, { val: "1", multiple: false, id: "paged", label: "Paged", description: "Pagination start with" }] }, itemsWrap: { options: { excludedWrapper: "" }, styles: [] }, itemWrap: { options: { tag: "div", class: "item", counterClass: true, termsClass: true, oddEvenClass: true }, styles: [] } }], ["post-grid/post-query-pagination", { pagination: { options: { class: "pagination pg-post-query-pagination", type: "normal", maxPageNum: "5", prevText: "Previous", nextText: "Next", loadMoreText: "Load More", noMorePosts: "No More Posts", loadingText: "Loading...", loadingIcon: { loadingPosition: "beforeText", library: "fontAwesome", srcType: "class", iconSrc: "", class: "load-more" }, loadMoreIcon: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "load-more" } }, styles: { margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "center" }, alignItems: { Desktop: "center" }, gap: { Desktop: "0px" }, backgroundColor: { Desktop: "#ffffff" }, padding: [], width: { Desktop: "max-content", Tablet: "auto" }, marginRight: { Desktop: "auto" }, marginLeft: { Desktop: "auto" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, boxShadow: [], border: [], flexWrap: { Tablet: "wrap !important" } } }, paginationItem: { options: { class: "page-numbers " }, styles: { color: { Desktop: "#7b7b7b" }, fontSize: { Desktop: "16px" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: [], borderRadius: [], boxShadow: [], border: { Desktop: "1px solid #e3e3e3" }, fontWeight: { Desktop: "700" } } }, paginationItemActive: { options: { class: "page-numbers " }, styles: { backgroundColor: [], padding: [], borderRadius: [], color: { Desktop: "#e34f3f" }, border: [], boxShadow: [], fontWeight: [] } }, next: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "next" }, styles: [] }, previous: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "previous" }, styles: [] }, start: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "start" }, styles: [] }, end: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "end" }, styles: [] } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }, { name: "1-column", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("1 Col"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("1 Col"), isDefault: true, isPro: false, atts: { lazyLoad: { options: { class: "lazyLoad", enable: "no", srcUrl: "", srcId: "", icon: { library: "", srcType: "class", iconSrc: "" } }, styles: [] }, container: { options: { class: "" }, styles: [] }, itemsWrap: { options: { class: "items-loop" }, styles: { gridTemplateColumns: { Desktop: "1fr" }, gap: { Desktop: "1em" }, display: { Desktop: "grid" } } }, itemWrap: { options: { class: "item" }, styles: { padding: { Desktop: "0px 0px 40px 0px", Tablet: "0px 0px 0px 0px" }, position: { Desktop: "relative" } }, after: { position: { Desktop: "absolute !important" }, gridTemplateColumns: [], gap: [], content: { Desktop: '" "' }, height: { Desktop: "1px", Tablet: "0px" }, width: { Desktop: "100%", Tablet: "0px" }, top: { Desktop: "200px" }, left: { Desktop: "0px" }, backgroundColor: { Desktop: "#b98341" } } }, grid: { options: { itemCss: [] }, styles: { gridTemplateColumns: [], gridTemplateRows: [], colGap: [], rowGap: [], color: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] } }, innerBlocks: [["post-grid/post-query", { noPostsWrap: { options: { class: "no-posts text-center" }, styles: [] }, spinnerWrap: { options: { class: "spinner" }, styles: [] }, queryArgs: { items: [{ val: ["post"], id: "postType" }, { val: ["publish"], id: "postStatus" }, { val: "DESC", id: "order" }, { val: ["date"], id: "orderby" }, { val: "5", id: "postsPerPage" }, { val: "1", id: "paged" }] }, itemsWrap: { options: { excludedWrapper: "" }, styles: [] }, itemWrap: { options: { tag: "div", class: "item", counterClass: true, termsClass: true, oddEvenClass: true }, styles: [] } }], ["post-grid/post-query-pagination", { pagination: { options: { class: "pagination pg-post-query-pagination", type: "normal", maxPageNum: "5", prevText: "Previous", nextText: "Next", loadMoreText: "Load More", noMorePosts: "No More Posts", loadingText: "Loading...", loadingIcon: { loadingPosition: "beforeText", library: "fontAwesome", srcType: "class", iconSrc: "", class: "load-more" }, loadMoreIcon: { library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "load-more" } }, styles: { margin: { Desktop: "20px 0px 20px 0px" }, display: { Desktop: "flex" }, justifyContent: { Desktop: "center" }, alignItems: { Desktop: "center" }, gap: { Desktop: "0px" }, backgroundColor: { Desktop: "#ffffff" }, padding: [], width: { Desktop: "max-content", Tablet: "auto" }, marginRight: { Desktop: "auto" }, marginLeft: { Desktop: "auto" }, borderRadius: { Desktop: "5px 5px 5px 5px" }, boxShadow: [], border: [], flexWrap: { Tablet: "wrap !important" } } }, paginationItem: { options: { class: "page-numbers " }, styles: { color: { Desktop: "#7b7b7b" }, fontSize: { Desktop: "16px" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: [], borderRadius: [], boxShadow: [], border: { Desktop: "1px solid #e3e3e3" }, fontWeight: { Desktop: "700" } } }, paginationItemActive: { options: { class: "page-numbers " }, styles: { backgroundColor: [], padding: [], borderRadius: [], color: { Desktop: "#e34f3f" }, border: [], boxShadow: [], fontWeight: [] } }, next: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "next" }, styles: [] }, previous: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "previous" }, styles: [] }, start: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "start" }, styles: [] }, end: { options: { enable: true, library: "fontAwesome", srcType: "class", iconSrc: "", position: "beforeText", class: "end" }, styles: [] } }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/post-meta/index.js": /*!***************************************!*\ !*** ./src/blocks/post-meta/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-meta/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_18__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_442)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 56.9998H84.7061V66.4115H160V56.9998Z", fill: "url(#paint1_linear_61_442)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 94.8818H85V103.882H131V94.8818Z", fill: "url(#paint2_linear_61_442)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M106.561 76H85V85.41H106.561V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M133.281 76H111.72V85.41H133.281V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 76H138.439V85.41H160V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "url(#paint3_linear_61_442)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_442", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_442", x1: "84.7061", y1: "61.7056", x2: "160", y2: "61.7056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_442", x1: "85", y1: "99.3818", x2: "131", y2: "99.3818", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_442", x1: "13", y1: "82", x2: "53", y2: "82", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var meta = attributes.meta; var template = attributes.template; var templateLoop = attributes.templateLoop; var prefix = attributes.prefix; var postfix = attributes.postfix; var wrapper = attributes.wrapper; var items = attributes.items; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("isProFeature", true); const [metaValue, setMetaValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); const [metaHtml, setMetaHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const [metaArgs, setMetaArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const metaValueSelector = blockClass + " .metaValue"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ postTitle: postTitle }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[metaValueSelector] = meta; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); var metaKeyTypeArgsBasic = { string: { label: "String", value: "string" }, object: { label: "Object", value: "object", isPro: true }, array: { label: "Array", value: "array", isPro: true }, acfText: { label: "ACF Text", value: "acfText", isPro: true }, acfTextarea: { label: "ACF Textarea", value: "acfTextarea", isPro: true }, acfNumber: { label: "ACF Number", value: "acfNumber", isPro: true }, acfRange: { label: "ACF Range", value: "acfRange", isPro: true }, acfEmail: { label: "ACF Email", value: "acfEmail", isPro: true }, acfUrl: { label: "ACF URL", value: "acfUrl", isPro: true }, acfPassword: { label: "ACF Password", value: "acfPassword", isPro: true }, //acfWysiwyg: { label: 'ACF WYSIWYG', value: 'acfWysiwyg', isPro: true }, acfSelect: { label: "ACF Select", value: "acfSelect", isPro: true }, acfCheckbox: { label: "ACF Checkbox", value: "acfCheckbox", isPro: true }, acfRadio: { label: "ACF Radio", value: "acfRadio", isPro: true }, acfImage: { label: "ACF Image", value: "acfImage", isPro: true }, acfFile: { label: "ACF File", value: "acfFile", isPro: true }, acfTaxonomy: { label: "ACF Taxonomy", value: "acfTaxonomy", isPro: true }, acfPostObject: { label: "ACF Post Object", value: "acfPostObject", isPro: true }, acfPageLink: { label: "ACF Page Link", value: "acfPageLink", isPro: true }, acfLink: { label: "ACF Link", value: "acfLink", isPro: true }, acfUser: { label: "ACF User", value: "acfUser", isPro: true }, acfButtonGroup: { label: "ACF Button Group", value: "acfButtonGroup", isPro: true } // acfBoolen: { label: 'ACF Boolen', value: 'acfBoolen', isPro: true }, // acfTimePicker: { label: 'ACF TimePicker', value: 'acfTimePicker', isPro: true }, // acfDatePicker: { label: 'ACF DatePicker', value: 'acfDatePicker', isPro: true }, // acfDateTimePicker: { label: 'ACF DateTimePicker', value: 'acfDateTimePicker', isPro: true }, // acfColorPicker: { label: 'ACF ColorPicker', value: 'acfColorPicker', isPro: true }, // acfGoogleMap: { label: 'ACF Google Map', value: 'acfGoogleMap', isPro: true }, }; let metaKeyTypeArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("metaKeyTypeArgs", metaKeyTypeArgsBasic); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/post-grid/v2/get_post_meta", method: "POST", data: { postId: postId, meta_key: meta.options.key, type: meta.options.type, template: template } }).then(res => { if (res.args == undefined) {} else { setMetaArgs(res.args); } if (res.html == undefined) {} else { setMetaHtml(res.html); } // if (meta.options.type == 'acfImage') { // setMetaHtml(res.html); // setMetaArgs(res.args); // } // else if (meta.options.type == 'acfFile') { // setMetaHtml(res.html); // setMetaArgs(res.args); // } // else { // setMetaHtml(res.html); // setMetaArgs(res.args); // } }); }, [meta, template]); // useEffect(() => { // if (metaValue != null) { // if (meta.options.type == 'string') { // setMetaValue(res.meta_value) // } else if (meta.options.type == 'acfImage') { // console.log(res.html); // setMetaHtml(res.html); // } // } // }, [template]); // var breakPointList = []; const WrapperTag = wrapper.options.tag != undefined && wrapper.options.tag.length != 0 ? `${wrapper.options.tag}` : "div"; const CustomTag = wrapper.options.tag != undefined && wrapper.options.tag.length != 0 ? `${wrapper.options.tag}` : "div"; function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var metaX = attributes.meta; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var templateX = attributes.template; var templateLoopX = attributes.templateLoop; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (templateLoopX != undefined) { var templateLoopY = { ...templateLoopX, options: templateLoop.options }; setAttributes({ templateLoop: templateLoopY }); blockCssObj[templateLoopSelector] = templateLoopY; } if (templateX != undefined) { var templateY = { ...templateX, options: template.options }; setAttributes({ template: templateY }); blockCssObj[templateSelector] = templateY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (metaX != undefined) { var metaY = { ...metaX, options: meta.options }; setAttributes({ meta: metaY }); blockCssObj[metaSelector] = metaY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryMeta(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; meta[sudoScource] = sudoScourceArgs; }); var metaX = Object.assign({}, meta); setAttributes({ meta: metaX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, metaValueSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, wrapper); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ wrapper: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); // sudoScourceX[attr][breakPointX] = newVal; // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...wrapper[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // wrapper[sudoScource] = sudoScourceX; // setAttributes({ wrapper: { ...wrapper } }); // if (blockCssY.items[wrapperSelector] == undefined) { // blockCssY.items[wrapperSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[wrapperSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[wrapperSelector][key] != undefined) { // delete blockCssY.items[wrapperSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStyleWrapper(sudoScource, key) { // var sudoScourceX = { ...wrapper[sudoScource] } // sudoScourceX[key] = {}; // wrapper[sudoScource] = sudoScourceX; // setAttributes({ wrapper: { ...wrapper } }); var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleMeta(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, meta); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ meta: object }); var elementSelector = myStore.getElementSelector(sudoScource, metaValueSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); // var path = sudoScource + '.' + attr + '.' + breakPointX // let obj = Object.assign({}, meta); // const updatedObj = myStore.setPropertyDeep(obj, path, newVal) // setAttributes({ meta: updatedObj }); // var sudoScourceX = { ...updatedObj[sudoScource] } // var elementSelector = metaValueSelector; // var elementSelector = myStore.getElementSelector(sudoScource, metaValueSelector); // sudoScourceX[attr][breakPointX] = newVal; // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[elementSelector][argAttr] = argAttrVal; // }) // setAttributes({ blockCssY: { items: blockCssY.items } }); // setAttributes({ meta: { ...meta } }); } function onRemoveStyleMeta(sudoScource, key) { var object = myStore.deletePropertyDeep(meta, [sudoScource, key, breakPointX]); setAttributes({ meta: object }); var elementSelector = myStore.getElementSelector(sudoScource, metaValueSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); // var sudoScourceX = { ...meta[sudoScource] } // if (sudoScourceX[key] != undefined) { // delete sudoScourceX[key]; // } // meta[sudoScource] = sudoScourceX; // setAttributes({ meta: { ...meta } }); // if (blockCssY.items[metaValueSelector] == undefined) { // blockCssY.items[metaValueSelector] = {}; // } // Object.entries(sudoScourceX).map(args => { // var argAttr = myStore.cssAttrParse(args[0]); // var argAttrVal = args[1]; // blockCssY.items[metaValueSelector][argAttr] = argAttrVal; // }) // if (blockCssY.items[metaValueSelector][key] != undefined) { // delete blockCssY.items[metaValueSelector][key]; // } // setAttributes({ blockCssY: { items: blockCssY.items } }); } function onAddStyleMeta(sudoScource, key) { // var sudoScourceX = { ...meta[sudoScource] } // sudoScourceX[key] = {}; // meta[sudoScource] = sudoScourceX; // setAttributes({ meta: { ...meta } }); var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, meta); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ meta: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddMeta(sudoScource, cssObj) { let obj = Object.assign({}, meta); obj[sudoScource] = cssObj; setAttributes({ meta: obj }); var selector = myStore.getElementSelector(sudoScource, metaSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [items]); const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_20__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Meta Key", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_14__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" } // { // name: 'css', // title: 'CSS Library', // icon: styles, // className: 'tab-css', // }, ] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Meta key", value: meta.options.key, onChange: newVal => { var options = { ...meta.options, key: newVal }; setAttributes({ meta: { ...meta, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Meta Key Type "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: metaKeyTypeArgs, buttonTitle: "Choose", onChange: (option, index) => { var options = { ...meta.options, type: option.value }; setAttributes({ meta: { ...meta, options: options } }); }, values: "", value: meta.options.type })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { className: "my-3", for: "" }, "Template"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.TextareaControl, { value: template, onChange: newVal => { setAttributes({ template: newVal }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", null, "You can use following ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("code", null, "{metaValue}"), " to display output"), meta.options.type != "string" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { className: "mt-5 block", for: "" }, "Loop Template", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.TextareaControl, { placeholder: "<div>{title}</div><div>{details}</div>", value: templateLoop, onChange: newVal => { setAttributes({ templateLoop: newVal }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", null, "You can use following for loop template to iterate array elements", " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("code", null, "<div> {itemIndex1}</div><div>{itemIndex2}</div>"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Parameters"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, metaArgs != undefined && Object.entries(metaArgs).map((arg, i) => { var key = arg[0]; var val = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2 bg-gray-300" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { onClick: ev => { var target = ev.target; }, className: "bg-gray-500 px-3 py-2 text-white" }, key), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3 py-2" }, val)); }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_16__["default"], { obj: meta, onChange: onChangeStyleMeta, onAdd: onAddStyleMeta, onBulkAdd: onBulkAddMeta, onRemove: onRemoveStyleMeta })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_15__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: meta, onChange: onPickCssLibraryMeta })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__["default"], { blockName: "post-meta", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, meta.options.key.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "bg-slate-300 p-10 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-[400px] mx-auto my-0" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 my-4 block" }, "Meta Field Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Write Meta key", value: meta.options.key, onChange: newVal => { var options = { ...meta.options, key: newVal }; setAttributes({ meta: { ...meta, options: options } }); } })))), meta.options.key.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(WrapperTag, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { dangerouslySetInnerHTML: { __html: metaHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-query-pagination/index.js": /*!***************************************************!*\ !*** ./src/blocks/post-query-pagination/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/pencil.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/cloud.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./variations */ "./src/blocks/post-query-pagination/variations.js"); /* harmony import */ var _pagination_types__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./pagination-types */ "./src/blocks/post-query-pagination/pagination-types.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_input_select__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/input-select */ "./src/components/input-select/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-query-pagination/block.json"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { parse } = wp.blockSerializationDefaultParser; const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); // var queryPramsX = queryPrams.map((x, i) => { // return { value: i, label: x.label, description: x.description, isPro: x.isPro, } // }) (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M61.176 0H4.70539C3.45732 0 2.26036 0.495793 1.37783 1.37832C0.49531 2.26084 -0.000488281 3.4578 -0.000488281 4.70588V51.7647C-0.000488281 53.0128 0.49531 54.2097 1.37783 55.0923C2.26036 55.9748 3.45732 56.4706 4.70539 56.4706H61.176C62.4241 56.4706 63.621 55.9748 64.5035 55.0923C65.3861 54.2097 65.8819 53.0128 65.8819 51.7647V4.70588C65.8819 3.4578 65.3861 2.26084 64.5035 1.37832C63.621 0.495793 62.4241 0 61.176 0ZM56.4701 47.0588H9.41128V9.41177H56.4701V47.0588Z", fill: "url(#paint0_linear_61_3)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 14.1177H84.7056V23.5294H160V14.1177Z", fill: "url(#paint1_linear_61_3)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.176 32.9414H84.7056V42.3532H141.176V32.9414Z", fill: "url(#paint2_linear_61_3)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M61.176 74H4.70539C3.45732 74 2.26036 74.4958 1.37783 75.3783C0.49531 76.2608 -0.000488281 77.4578 -0.000488281 78.7059V125.765C-0.000488281 127.013 0.49531 128.21 1.37783 129.092C2.26036 129.975 3.45732 130.471 4.70539 130.471H61.176C62.4241 130.471 63.621 129.975 64.5035 129.092C65.3861 128.21 65.8819 127.013 65.8819 125.765V78.7059C65.8819 77.4578 65.3861 76.2608 64.5035 75.3783C63.621 74.4958 62.4241 74 61.176 74ZM56.4701 121.059H9.41128V83.4118H56.4701V121.059Z", fill: "url(#paint3_linear_61_3)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 88.1177H84.7056V97.5294H160V88.1177Z", fill: "url(#paint4_linear_61_3)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.176 106.941H84.7056V116.353H141.176V106.941Z", fill: "url(#paint5_linear_61_3)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M53.5996 142H35.5996V160H53.5996V142Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M89.5996 142H71.5996V160H89.5996V142Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M125.6 142H107.6V160H125.6V142Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M155.809 151.788C155.809 152.076 155.579 152.459 155.349 152.651L145.93 159.461C145.356 159.845 144.552 159.845 143.977 159.365C143.518 158.886 143.518 158.214 144.092 157.735L152.363 151.788L144.092 145.842C143.518 145.458 143.403 144.691 143.977 144.211C144.437 143.731 145.356 143.636 145.93 144.115L155.349 150.925C155.694 151.117 155.809 151.404 155.809 151.788Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M4.99955 151.788C4.99955 152.076 5.22945 152.459 5.45919 152.651L14.8782 159.461C15.4525 159.845 16.2565 159.845 16.8308 159.365C17.2903 158.886 17.2905 158.214 16.7161 157.735L8.44554 151.788L16.7161 145.842C17.2905 145.458 17.4052 144.691 16.8308 144.211C16.3714 143.731 15.4525 143.636 14.8782 144.115L5.45919 150.925C5.11459 151.117 4.99955 151.404 4.99955 151.788Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_3", x1: "-0.000488281", y1: "28.2353", x2: "65.8819", y2: "28.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_3", x1: "84.7056", y1: "18.8236", x2: "160", y2: "18.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_3", x1: "84.7056", y1: "37.6473", x2: "141.176", y2: "37.6473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_3", x1: "-0.000488281", y1: "102.235", x2: "65.8819", y2: "102.235", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_3", x1: "84.7056", y1: "92.8236", x2: "160", y2: "92.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_3", x1: "84.7056", y1: "111.647", x2: "141.176", y2: "111.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var pagination = attributes.pagination; var paginationItem = attributes.paginationItem; var paginationItemActive = attributes.paginationItemActive; var next = attributes.next; var previous = attributes.previous; var start = attributes.start; var end = attributes.end; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("isProFeature", true); var [isBusy, setIsBusy] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Using the hook. const paginationSelector = blockClass; const paginationItemSelector = blockClass + " .page-numbers"; const paginationItemActiveSelector = blockClass + " .page-numbers.current"; const nextSelector = blockClass + " .page-numbers.next"; const previousSelector = blockClass + " .page-numbers.prev"; const startSelector = blockClass + " .page-numbers.start"; const endSelector = blockClass + " .page-numbers.end"; const parentBlocks = wp.data.select("core/block-editor").getBlockParents(clientId); const parentAttributes = wp.data.select("core/block-editor").getBlocksByClientId(parentBlocks); var [paginationTypeZ, setPaginationTypeZ] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentAttributes[0].name === "post-grid/post-grid") { const paginationTypeX = { ..._pagination_types__WEBPACK_IMPORTED_MODULE_14__["default"] }; if ("filterable" in paginationTypeX) { delete paginationTypeX.filterable; setPaginationTypeZ(paginationTypeX); } } else if (parentAttributes[0].name === "post-grid/post-grid-filterable") { const paginationTypeX = { filterable: _pagination_types__WEBPACK_IMPORTED_MODULE_14__["default"].filterable }; setPaginationTypeZ(paginationTypeX); } }, [parentAttributes]); var parentPagination = context["post-grid/pagination"] == undefined ? null : context["post-grid/pagination"]; var parentPaginationItem = context["post-grid/paginationItem"] == undefined ? null : context["post-grid/paginationItem"]; var parentPaginationItemActive = context["post-grid/paginationItemActive"] == undefined ? null : context["post-grid/paginationItemActive"]; var postGridId = context["post-grid/postGridId"] == undefined ? null : context["post-grid/postGridId"]; const [previousHtml, setPreviousHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [nextHtml, setNextHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [startHtml, setStartHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [endHtml, setEndHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [loadingHtml, setLoadingHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [loadMoreHtml, setLoadMoreHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = previous.options.iconSrc; var previousHtml = `<span class="${iconSrc}"></span>`; setPreviousHtml(previousHtml); }, [previous]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = next.options.iconSrc; var nextHtml = `<span class="${iconSrc}"></span>`; setNextHtml(nextHtml); }, [next]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = start.options.iconSrc; var startHtml = `<span class="${iconSrc}"></span>`; setStartHtml(startHtml); }, [start]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = end.options.iconSrc; var endHtml = `<span class="${iconSrc}"></span>`; setEndHtml(endHtml); }, [end]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = pagination.options.loadingIcon.iconSrc; var loadingHtml = `<span class="${iconSrc}"></span>`; setLoadingHtml(loadingHtml); // var iconSrc1 = pagination.options.loadMoreIcon.iconSrc; // var loadMoreHtml = `<span class="${iconSrc}"></span>`; // setLoadMoreHtml(loadMoreHtml); }, [pagination]); // useEffect(() => { // var iconSrc1 = pagination.options.loadMoreIcon.iconSrc; // var loadMoreHtml = `<span className="${iconSrc1}"></span>`; // setLoadMoreHtml(loadMoreHtml); // }, [pagination]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[paginationSelector] = pagination; blockCssObj[paginationItemSelector] = paginationItem; blockCssObj[paginationItemActiveSelector] = paginationItemActive; blockCssObj[nextSelector] = next; blockCssObj[previousSelector] = previous; blockCssObj[startSelector] = start; blockCssObj[endSelector] = end; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentPagination != null && Object.entries(pagination.styles).length == 0) { // setAttributes({ pagination: parentPagination }); } }, [parentPagination]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentPaginationItem != null && Object.entries(paginationItem.styles).length == 0) { // setAttributes({ paginationItem: parentPaginationItem }); } }, [parentPaginationItem]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (parentPaginationItemActive != null && Object.entries(paginationItemActive.styles).length == 0) { // setAttributes({ paginationItemActive: parentPaginationItemActive }); } }, [parentPaginationItemActive]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { // var blockId = attributes.blockId var paginationX = attributes.pagination; var paginationItemX = attributes.paginationItem; var paginationItemActiveX = attributes.paginationItemActive; var nextX = attributes.next; var previousX = attributes.previous; var startX = attributes.start; var endX = attributes.end; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (paginationX != undefined) { var paginationY = { ...paginationX, options: pagination.options }; setAttributes({ pagination: paginationY }); blockCssObj[paginationSelector] = paginationY; } if (paginationItemX != undefined) { var paginationItemY = { ...paginationItemX, options: paginationItem.options }; setAttributes({ paginationItem: paginationItemY }); blockCssObj[paginationItemSelector] = paginationItemY; } if (paginationItemActiveX != undefined) { var paginationItemActiveY = { ...paginationItemActiveX, options: paginationItemActive.options }; setAttributes({ paginationItemActive: paginationItemActiveY }); blockCssObj[paginationItemActiveSelector] = paginationItemActiveY; } if (nextX != undefined) { var nextY = { ...nextX, options: next.options }; setAttributes({ next: nextY }); blockCssObj[nextSelector] = nextY; } if (previousX != undefined) { var previousY = { ...previousX, options: previous.options }; setAttributes({ previous: previousY }); blockCssObj[previousSelector] = previousY; } if (startX != undefined) { var startY = { ...startX, options: start.options }; setAttributes({ start: startY }); blockCssObj[startSelector] = startY; } if (endX != undefined) { var endY = { ...endX, options: end.options }; setAttributes({ end: endY }); blockCssObj[endSelector] = endY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryPaginationItemActive(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; paginationItemActive[sudoScource] = sudoScourceArgs; }); var paginationItemActiveX = Object.assign({}, paginationItemActive); setAttributes({ paginationItemActive: paginationItemActiveX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, paginationItemActiveSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStylePaginationItemActive(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, paginationItemActive); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ paginationItemActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationItemActiveSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePaginationItemActive(sudoScource, key) { var object = myStore.deletePropertyDeep(paginationItemActive, [sudoScource, key, breakPointX]); setAttributes({ paginationItemActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationItemActiveSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePaginationItemActive(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, paginationItemActive); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ paginationItemActive: object }); } function onPickCssLibraryPagination(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; pagination[sudoScource] = sudoScourceArgs; }); var paginationX = Object.assign({}, pagination); setAttributes({ pagination: paginationX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, paginationSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // function onChangeStylePagination(sudoScource, newVal, attr) { // var path = [sudoScource, attr, breakPointX]; // let obj = Object.assign({}, pagination); // const object = myStore.updatePropertyDeep(obj, path, newVal); // setAttributes({ pagination: object }); // var elementSelector = myStore.getElementSelector( // sudoScource, // paginationSelector // ); // var cssPropty = myStore.cssAttrParse(attr); // let itemsX = Object.assign({}, blockCssY.items); // if (itemsX[elementSelector] == undefined) { // itemsX[elementSelector] = {}; // } // var cssPath = [elementSelector, cssPropty, breakPointX]; // const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); // setAttributes({ blockCssY: { items: cssItems } }); // } function onChangeStylePagination(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, pagination); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ pagination: object }); var elementSelector = myStore.getElementSelector(sudoSource, paginationSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePagination(sudoScource, key) { var object = myStore.deletePropertyDeep(pagination, [sudoScource, key, breakPointX]); setAttributes({ pagination: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePagination(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, pagination); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ pagination: object }); } function onPickCssLibraryPaginationItem(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; paginationItem[sudoScource] = sudoScourceArgs; }); var paginationX = Object.assign({}, paginationItem); setAttributes({ paginationItem: paginationX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, paginationItemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStylePaginationItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, paginationItem); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ paginationItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationItemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePaginationItem(sudoScource, key) { var object = myStore.deletePropertyDeep(paginationItem, [sudoScource, key, breakPointX]); setAttributes({ paginationItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, paginationItemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } // button style function onChangeStylePrevious(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, previous); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ previous: object }); var elementSelector = myStore.getElementSelector(sudoSource, previousSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrevious(sudoScource, key) { var object = myStore.deletePropertyDeep(previous, [sudoScource, key, breakPointX]); setAttributes({ previous: object }); var elementSelector = myStore.getElementSelector(sudoScource, previousSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrevious(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, previous); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ previous: object }); } function onChangeStyleNext(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, next); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ next: object }); var elementSelector = myStore.getElementSelector(sudoSource, nextSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNext(sudoScource, key) { var object = myStore.deletePropertyDeep(next, [sudoScource, key, breakPointX]); setAttributes({ next: object }); var elementSelector = myStore.getElementSelector(sudoScource, nextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNext(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, next); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ next: object }); } function onChangeStyleStart(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, start); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ start: object }); var elementSelector = myStore.getElementSelector(sudoSource, startSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleStart(sudoScource, key) { var object = myStore.deletePropertyDeep(start, [sudoScource, key, breakPointX]); setAttributes({ start: object }); var elementSelector = myStore.getElementSelector(sudoScource, startSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleStart(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, start); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ start: object }); } function onChangeStyleEnd(sudoSource, newVal, attr) { var path = [sudoSource, attr, breakPointX]; let obj = Object.assign({}, end); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ end: object }); var elementSelector = myStore.getElementSelector(sudoSource, endSelector); var cssProperty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssProperty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleEnd(sudoScource, key) { var object = myStore.deletePropertyDeep(end, [sudoScource, key, breakPointX]); setAttributes({ end: object }); var elementSelector = myStore.getElementSelector(sudoScource, endSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleEnd(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, end); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ end: object }); } function onBulkAddPrevious(sudoScource, cssObj) { let obj = Object.assign({}, previous); obj[sudoScource] = cssObj; setAttributes({ previous: obj }); var selector = myStore.getElementSelector(sudoScource, previousSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddNext(sudoScource, cssObj) { let obj = Object.assign({}, next); obj[sudoScource] = cssObj; setAttributes({ next: obj }); var selector = myStore.getElementSelector(sudoScource, nextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddStart(sudoScource, cssObj) { let obj = Object.assign({}, start); obj[sudoScource] = cssObj; setAttributes({ start: obj }); var selector = myStore.getElementSelector(sudoScource, startSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddEnd(sudoScource, cssObj) { let obj = Object.assign({}, end); obj[sudoScource] = cssObj; setAttributes({ end: obj }); var selector = myStore.getElementSelector(sudoScource, endSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onPickCssLibraryPrevious(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; previous[sudoScource] = sudoScourceArgs; }); var previousX = Object.assign({}, previous); setAttributes({ previous: previousX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, previousSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryNext(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; next[sudoScource] = sudoScourceArgs; }); var nextX = Object.assign({}, next); setAttributes({ next: nextX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, nextSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryStart(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; start[sudoScource] = sudoScourceArgs; }); var startX = Object.assign({}, start); setAttributes({ start: startX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, startSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryEnd(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; end[sudoScource] = sudoScourceArgs; }); var endX = Object.assign({}, end); setAttributes({ end: endX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, endSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // button style end function onAddStylePaginationItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, paginationItem); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ paginationItem: object }); } function onChangePreviousIcon(arg) { var options = { ...previous.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ previous: { ...previous, options: options } }); } function onChangeNextIcon(arg) { var options = { ...next.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ next: { ...next, options: options } }); } function onChangeStartIcon(arg) { var options = { ...start.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ start: { ...start, options: options } }); } function onChangeEndIcon(arg) { var options = { ...end.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ end: { ...end, options: options } }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${pagination.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text pg-font" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4 px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Pagination Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_20__["default"], { position: "bottom right", variant: "secondary", options: paginationTypeZ, buttonTitle: paginationTypeZ[pagination.options.type] != undefined ? paginationTypeZ[pagination.options.type].label : "Choose", onChange: (arg, index) => { var options = { ...pagination.options, type: arg.value }; setAttributes({ pagination: { ...pagination, options: options } }); }, values: "" })), (pagination.options.type == "normal" || pagination.options.type == "ajax") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Max Number of Pagination"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: pagination.options.maxPageNum, onChange: newVal => { var options = { ...pagination.options, maxPageNum: newVal }; setAttributes({ pagination: { ...pagination, options: options } }); } }))), (pagination.options.type == "normal" || pagination.options.type == "ajax" || pagination.options.type == "next_previous" || pagination.options.type == "filterable") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Previous Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: pagination.options.prevText, onChange: newVal => { var options = { ...pagination.options, prevText: newVal }; setAttributes({ pagination: { ...pagination, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Next Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: pagination.options.nextText, onChange: newVal => { var options = { ...pagination.options, nextText: newVal }; setAttributes({ pagination: { ...pagination, options: options } }); } }))), (pagination.options.type == "loadmore" || pagination.options.type == "infinite") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Load More Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: pagination.options.loadMoreText, onChange: newVal => { var options = { ...pagination.options, loadMoreText: newVal }; setAttributes({ pagination: { ...pagination, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "No Posts Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: pagination.options.noMorePosts, onChange: newVal => { var options = { ...pagination.options, noMorePosts: newVal }; setAttributes({ pagination: { ...pagination, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Loading Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: pagination.options.loadingText, onChange: newVal => { var options = { ...pagination.options, loadingText: newVal }; setAttributes({ pagination: { ...pagination, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Loading Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: pagination.options.loadingIcon.library, srcType: pagination.options.loadingIcon.srcType, iconSrc: pagination.options.loadingIcon.iconSrc, onChange: arg => { const options = { ...pagination.options }; const iconX = { ...options.loadingIcon, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; const optionX = { ...options, loadingIcon: iconX }; setAttributes({ pagination: { ...pagination, options: optionX } }); // setAttributes({ // pagination: { ...pagination, options: options }, // }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Loading Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: pagination.options.loadingIcon.loadingPosition, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }], onChange: newVal => { const options = { ...pagination.options }; const positionX = { ...options.loadingIcon, loadingPosition: newVal }; const optionX = { ...options, loadingIcon: positionX }; setAttributes({ pagination: { ...pagination, options: optionX } }); // setAttributes({ // pagination: { ...pagination, options: options }, // }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Load More Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: pagination.options.loadMoreIcon.library, srcType: pagination.options.loadMoreIcon.srcType, iconSrc: pagination.options.loadMoreIcon.iconSrc, onChange: arg => { const options = { ...pagination.options }; const iconX = { ...options.loadMoreIcon, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; const optionX = { ...options, loadMoreIcon: iconX }; setAttributes({ pagination: { ...pagination, options: optionX } }); // setAttributes({ // pagination: { ...pagination, options: options }, // }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Load More Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: pagination.options.loadMoreIcon.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }], onChange: newVal => { const options = { ...pagination.options }; const positionX = { ...options.loadMoreIcon, position: newVal }; const optionX = { ...options, loadMoreIcon: positionX }; setAttributes({ pagination: { ...pagination, options: optionX } }); // setAttributes({ // pagination: { ...pagination, options: options }, // }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "", title: "Pagination Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: pagination, onChange: onChangeStylePagination, onAdd: onAddStylePagination, onRemove: onRemoveStylePagination })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: pagination, onChange: onPickCssLibraryPagination })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { title: "Pagination Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: paginationItem, onChange: onChangeStylePaginationItem, onAdd: onAddStylePaginationItem, onRemove: onRemoveStylePaginationItem })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: paginationItem, onChange: onPickCssLibraryPaginationItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { title: "Pagination Active", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: paginationItemActive, onChange: onChangeStylePaginationItemActive, onAdd: onAddStylePaginationItemActive, onRemove: onRemoveStylePaginationItemActive })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: paginationItemActive, onChange: onPickCssLibraryPaginationItemActive })))), (pagination.options.type == "normal" || pagination.options.type == "ajax" || pagination.options.type == "next_previous" || pagination.options.type == "filterable") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Previous", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Previous Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: previous.options.library, srcType: previous.options.srcType, iconSrc: previous.options.iconSrc, onChange: onChangePreviousIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: previous.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }], onChange: newVal => { var options = { ...previous.options, position: newVal }; setAttributes({ previous: { ...previous, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: previous, onChange: onChangeStylePrevious, onAdd: onAddStylePrevious, onRemove: onRemoveStylePrevious, onBulkAdd: onBulkAddPrevious })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: previous, onChange: onPickCssLibraryPrevious })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Next", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Next Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: next.options.library, srcType: next.options.srcType, iconSrc: next.options.iconSrc, onChange: onChangeNextIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: next.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }], onChange: newVal => { var options = { ...next.options, position: newVal }; setAttributes({ next: { ...next, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: next, onChange: onChangeStyleNext, onAdd: onAddStyleNext, onRemove: onRemoveStyleNext, onBulkAdd: onBulkAddNext })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: next, onChange: onPickCssLibraryNext })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Start", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Start Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: start.options.library, srcType: start.options.srcType, iconSrc: start.options.iconSrc, onChange: onChangeStartIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: start.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }], onChange: newVal => { var options = { ...start.options, position: newVal }; setAttributes({ start: { ...start, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: start, onChange: onChangeStyleStart, onAdd: onAddStyleStart, onRemove: onRemoveStyleStart, onBulkAdd: onBulkAddStart })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: start, onChange: onPickCssLibraryStart })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "End", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose End Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_19__["default"], { library: end.options.library, srcType: end.options.srcType, iconSrc: end.options.iconSrc, onChange: onChangeEndIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: end.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Text", value: "beforeText" }, { label: "After Text", value: "afterText" }], onChange: newVal => { var options = { ...end.options, position: newVal }; setAttributes({ end: { ...end, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: end, onChange: onChangeStyleEnd, onAdd: onAddStyleEnd, onRemove: onRemoveStyleEnd, onBulkAdd: onBulkAddEnd })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: end, onChange: onPickCssLibraryEnd }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_23__["default"], { blockName: "post-query-pagination", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-query-pagination" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, pagination.options.type == "normal" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers prev" }, previous.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } }), pagination.options.prevText, previous.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers current" }, "1"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers" }, "2"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers" }, "3"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers next" }, next.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }), pagination.options.nextText, next.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }))), pagination.options.type == "filterable" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers prev" }, previous.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } }), pagination.options.prevText, previous.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers current" }, "1"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers" }, "2"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers" }, "3"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers next" }, next.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }), pagination.options.nextText, next.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }))), pagination.options.type == "ajax" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers prev" }, previous.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } }), pagination.options.prevText, previous.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers current" }, "1"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers" }, "2"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers" }, "3"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers next" }, next.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }), pagination.options.nextText, next.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }))), pagination.options.type == "next_previous" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers prev" }, previous.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } }), pagination.options.prevText, previous.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: previousHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "page-numbers next" }, next.options.position == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }), pagination.options.nextText, next.options.position == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "", dangerouslySetInnerHTML: { __html: nextHtml } }))), pagination.options.type == "loadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "page-numbers" }, pagination.options.loadMoreIcon.position === "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: pagination.options.loadMoreIcon.iconSrc, dangerouslySetInnerHTML: { __html: loadMoreHtml } }), pagination.options.loadMoreText, pagination.options.loadMoreIcon.position === "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: pagination.options.loadMoreIcon.iconSrc, dangerouslySetInnerHTML: { __html: loadMoreHtml } }))), pagination.options.type == "infinite" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "page-numbers" }, pagination.options.loadingPosition == "beforeText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: pagination.options.loadingIcon.class, dangerouslySetInnerHTML: { __html: loadingHtml } }), pagination.options.loadMoreText, pagination.options.loadingPosition == "afterText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: pagination.options.loadingIcon.class, dangerouslySetInnerHTML: { __html: loadingHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; //return <InnerBlocks.Content />; return null; } }); /***/ }), /***/ "./src/blocks/post-query-pagination/pagination-types.js": /*!**************************************************************!*\ !*** ./src/blocks/post-query-pagination/pagination-types.js ***! \**************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); const paginationTypesBasic = { none: { label: 'None', value: 'none', isPro: false }, normal: { label: 'Normal Pagination', value: 'normal', isPro: false }, ajax: { label: 'Ajax Pagination', value: 'ajax' /*isPro: false*/ }, next_previous: { label: 'Next-Previous', value: 'next_previous' /*isPro: false*/ }, loadmore: { label: 'Load More', value: 'loadmore' /*isPro: false*/ }, infinite: { label: 'Infinite Load', value: 'infinite' /*isPro: false*/ }, filterable: { label: 'Filterable', value: 'filterable' } }; let paginationTypes = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)('paginationTypes', paginationTypesBasic); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (paginationTypes); /***/ }), /***/ "./src/blocks/post-query-pagination/variations.js": /*!********************************************************!*\ !*** ./src/blocks/post-query-pagination/variations.js ***! \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)('isProFeature', true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: '1-column', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('1 Col'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('1 Col'), isDefault: true, isPro: false, atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "152.29", height: "82.57" })) }, { name: '2-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('2-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('2-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "119.78", width: "32.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "79.58", width: "72.71", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "72.71", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'] }, { name: '3-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('3-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('3-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "99.24", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "106.1", width: "46.18", height: "82.57" })) }, { name: '4-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('4-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('4-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "32.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "40.21", width: "31.66", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "80.41", width: "31.66", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "120.62", width: "31.66", height: "82.57" })) }, { name: '5-columns', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('5-columns'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('5-columns'), isPro: false, icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })), atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexBasis": { "Desktop": "0" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "31.7", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "63.4", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "95.09", width: "25.5", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "126.79", width: "25.5", height: "82.57" })) }, { name: '33-66', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('33-66'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('33-66'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "33%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "66%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "46.18", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "53.05", width: "99.24", height: "82.57" })) }, { name: '66-33', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('66-33'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('66-33'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "66%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "33%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "99.24", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "106.1", width: "46.18", height: "82.57" })) }, { name: '25-50-25', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-50-25'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-50-25'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "50%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "39.15", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "46.02", width: "60.25", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "113.14", width: "39.15", height: "82.57" })) }, { name: '25-25-50', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-25-50'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('25-25-50'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "50%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "31.29", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "38.16", width: "31.29", height: "82.57" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "76.33", width: "75.96", height: "82.57" })) }, { name: '50-25-25', title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('50-25-25'), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)('50-25-25'), isDefault: true, isPro: !isProFeature ? false : true, atts: { "wrapper": { "options": { "tag": "div", "class": "flex-wrap" }, "styles": { "display": { "Desktop": "flex" }, "gap": { "Desktop": "1em" } } } }, innerBlocks: [['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "50%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }], ['post-grid/flex-wrap-item', { "wrapper": { "options": { "tag": "div", "class": "flex-item-wrap" }, "styles": { "width": { "Desktop": "25%" }, "flexGrow": { "Desktop": "1" } } } }]], scope: ['block'], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 152.29 82.57" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "120.99", width: "31.29", height: "82.57", transform: "translate(273.28 82.57) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "82.83", width: "31.29", height: "82.57", transform: "translate(196.95 82.57) rotate(180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", width: "75.96", height: "82.57", transform: "translate(75.96 82.57) rotate(180)" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/post-query/index.js": /*!****************************************!*\ !*** ./src/blocks/post-query/index.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _query_presets__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./query-presets */ "./src/blocks/post-query/query-presets.js"); /* harmony import */ var _queryprams__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./queryprams */ "./src/blocks/post-query/queryprams.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_input_select__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/input-select */ "./src/components/input-select/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-query/block.json"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { parse } = wp.blockSerializationDefaultParser; const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); // var queryPramsX = queryPrams.map((x, i) => { // return { value: i, label: x.label, description: x.description, isPro: x.isPro, } // }) (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_23__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M66.9973 7H27.833C26.9674 7 26.1373 7.34385 25.5252 7.95591C24.9132 8.56797 24.5693 9.3981 24.5693 10.2637V42.9006C24.5693 43.7662 24.9132 44.5963 25.5252 45.2084C26.1373 45.8204 26.9674 46.1643 27.833 46.1643H66.9973C67.8629 46.1643 68.693 45.8204 69.3051 45.2084C69.9171 44.5963 70.261 43.7662 70.261 42.9006V10.2637C70.261 9.3981 69.9171 8.56797 69.3051 7.95591C68.693 7.34385 67.8629 7 66.9973 7ZM63.7336 39.6369H31.0967V13.5274H63.7336V39.6369Z", fill: "url(#paint0_linear_61_69)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M135.535 16.791H83.3164V23.3184H135.535V16.791Z", fill: "url(#paint1_linear_61_69)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M122.481 29.8457H83.3164V36.3731H122.481V29.8457Z", fill: "url(#paint2_linear_61_69)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M28.0221 65.7147L28.021 65.7134C27.2356 64.8585 26.7572 63.8486 26.6206 62.7999C26.4842 61.7523 26.6917 60.6878 27.2304 59.7216C27.7703 58.7533 28.6257 57.9154 29.716 57.314C30.8047 56.7134 32.0769 56.3771 33.3901 56.3499H125.729C127.027 56.3765 128.285 56.7051 129.366 57.2928C130.448 57.8809 131.302 58.701 131.851 59.6516C132.396 60.616 132.61 61.6801 132.48 62.7287C132.35 63.7785 131.878 64.7909 131.097 65.6494C131.097 65.6497 131.096 65.6501 131.096 65.6505L95.2332 104.881L95.233 104.882C94.5921 105.583 94.2315 106.467 94.2382 107.393V150.445C94.235 150.879 94.0948 151.314 93.8179 151.704C93.5394 152.097 93.1311 152.432 92.6248 152.663C92.1185 152.893 91.5416 153.006 90.9568 152.983C90.3725 152.961 89.8127 152.804 89.337 152.538C89.3366 152.538 89.3362 152.538 89.3359 152.538L66.2508 139.462L66.2475 139.46C65.8125 139.217 65.4679 138.893 65.2342 138.527C65.0016 138.163 64.8839 137.765 64.8811 137.367V107.458C64.8878 106.532 64.5271 105.648 63.8862 104.947L63.8861 104.947L28.0221 65.7147ZM86.9037 144.954L87.9695 145.559V144.333L87.9695 107.393C87.9695 107.392 87.9695 107.392 87.9695 107.392C87.977 105.415 88.7538 103.479 90.207 101.888L126.262 62.6579L127.362 61.4612H125.736H33.3829H31.7576L32.8574 62.6579L68.9123 101.888C68.9125 101.889 68.9128 101.889 68.913 101.889C70.3657 103.48 71.1423 105.415 71.1498 107.392C71.1498 107.392 71.1498 107.392 71.1498 107.393L71.1498 135.604V136.02L71.5114 136.225L86.9037 144.954Z", fill: "#C15940", stroke: "#C15940", "stroke-width": "1.42743" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_69", x1: "24.5693", y1: "26.5821", x2: "70.261", y2: "26.5821", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_69", x1: "83.3164", y1: "20.0547", x2: "135.535", y2: "20.0547", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_69", x1: "83.3164", y1: "33.1094", x2: "122.481", y2: "33.1094", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var noPostsWrap = attributes.noPostsWrap; var spinnerWrap = attributes.spinnerWrap; var queryArgs = attributes.queryArgs; var itemsWrap = attributes.itemsWrap; var itemWrap = attributes.itemWrap; var blockCssY = attributes.blockCssY; const CustomTagItemWrapper = `${itemWrap.options.tag}`; var parentQueryArgs = context["post-grid/queryArgs"] == undefined ? null : context["post-grid/queryArgs"]; var parentLayout = context["post-grid/layout"] == undefined ? null : context["post-grid/layout"]; var postGridId = context["post-grid/postGridId"] == undefined ? null : context["post-grid/postGridId"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); const [clientData, setClientData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); var [isBusy, setIsBusy] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Using the hook. var [importLayoutOpen, setimportLayoutOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ id: 0, isOpen: false }); // Using the hook. var clientDataX = myStore != null ? myStore.getclientdata() : ""; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setClientData(myStore != null ? myStore.getclientdata() : ""); }, [clientDataX]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (parentQueryArgs != null && queryArgs.items.length == 0) { setAttributes({ queryArgs: parentQueryArgs }); } }, [parentQueryArgs]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (parentLayout != null && parentLayout.rawData.length > 0) { // console.log(parentLayout); //setAttributes({ layout: parentLayout }); } }, [parentLayout]); const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const TEMPLATE = [["post-grid/post-featured-image"], ["post-grid/post-title"], ["post-grid/post-excerpt"]]; var oldLayout = parentLayout != null ? parse(parentLayout.rawData) : []; var oldTemplate = ObjectToArr(oldLayout); var [TEMPLATEX, setTEMPLATEX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(oldTemplate.length > 0 ? oldTemplate : TEMPLATE); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const [posts, setPosts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [activeBlockContextId, setActiveBlockContextId] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(); const [queryLayouts, setQueryLayouts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ keyword: "", page: 1, category: "" }); var [layoutList, setLayoutList] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ items: [] }); var [layoutData, setLayoutData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ source: "library" }); var [layoutLoading, setLayoutLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var [layoutCats, setLayoutCats] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); var select = wp.data.select("core/block-editor"); var blocks = select.getBlocks(clientId); function PostTemplateInnerBlocks({ attsx }) { const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)({ className: itemWrap.options.class }, { template: attsx }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagItemWrapper, innerBlocksProps); } function PostTemplateBlockPreview({ blocks, blockContextId, isHidden, setActiveBlockContextId }) { const blockPreviewProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalUseBlockPreview)({ blocks, props: { className: itemWrap.options.class } }); const handleOnClick = () => { setActiveBlockContextId(blockContextId); }; const style = { display: isHidden ? "none" : undefined }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockPreviewProps, { tabIndex: 0, role: "button", onClick: handleOnClick, style: style })); } const MemoizedPostTemplateBlockPreview = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.memo)(PostTemplateBlockPreview); function fetchPosts() { setIsBusy(true); var arg = queryArgs.items.map(item => { return { id: item.id, val: item.val }; }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_posts", method: "POST", data: { queryArgs: arg, rawData: (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.serialize)(blocks) } }).then(res => { setIsBusy(false); setPosts(res.posts); }); } const removeEmptyLines = str => str.split(/\r?\n/).filter(line => line.trim() !== "").join("\n"); function ObjectToArr(obj, arr = []) { obj.map(item => { var blockName = item.blockName; var attrs = item.attrs; var innerBlocks = item.innerBlocks; var blockData = [blockName, attrs]; if (innerBlocks.length > 0) { var inner = ObjectToArr(innerBlocks, []); var blockData = [blockName, attrs, inner]; } arr.push(blockData); //return { blockName, attrs } }); return arr; } function selectLayout(id, postContent) { var str = removeEmptyLines(postContent); var someText = str.replace(/(\r\n|\n|\r)/gm, ""); var srcServer = layoutData.source; var blocks = parse(postContent); if (srcServer == "library") { var arrs = ObjectToArr(blocks); replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)(arrs)); var allStyle = {}; var allStyleX = getCssfromBlocks(allStyle, blocks); var xxx = { ...blockCssY.items, ...allStyleX }; setAttributes({ blockCssY: { items: xxx } }); } else { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: id } }).then(res => { var postContent = res.post_content.replace(/(^[ \t]*\n)/gm, ""); var blocks = parse(postContent); var allStyle = {}; var flatObj = []; var flatObjCss = []; var flatData = flatObject(blocks[0], flatObj, flatObjCss); flatData.map((block, i) => { var items = block.attrs.blockCssY != undefined ? block.attrs.blockCssY.items : []; if (Object.entries(items).length > 0) { Object.entries(items).map(data => { var handle = data[0]; var css = data[1]; allStyle[handle] = css; }); } }); var xxx = { ...blockCssY.items, ...allStyle }; setAttributes({ blockCssY: { items: xxx } }); }); } //console.log(wp.data.select('core/block-editor').getBlocks()); //wp.data.dispatch('core/block-editor').insertBlocks(wp.blocks.parse(post_content)); //wp.data.dispatch('core/notices').createNotice('success', 'Here is our notice!'); //var content = "<!-- wp:paragraph --><p>paragraph one</p><!-- /wp:paragraph --><!-- wp:paragraph --><p>then two</p><!-- /wp:paragraph -->"; //Parse the serialized content into valid blocks using parse from @wordpress/block-serialization-default-parser // var gutblock = wp.blocks.rawHandler({ // HTML: post_content, // }); //setBlocksX(gutblock) } function flatObject(block, flatObj, flatObjCss) { flatObj.push(block); var items = block.attrs.blockCssY != undefined ? block.attrs.blockCssY.items : []; if (Object.entries(items).length > 0) { Object.entries(items).map(data => { var handle = data[0]; var css = data[1]; //flatObjCss[handle] = css; }); } if (block.innerBlocks != undefined) { block.innerBlocks.map(block => { flatObject(block, flatObj); }); } return flatObj; } function getCssfromBlocks(allStyle, blocks) { blocks.map((block, i) => { var items = block.attrs.blockCssY != undefined ? block.attrs.blockCssY.items : []; var innerBlocks = block.innerBlocks != undefined ? block.innerBlocks : []; if (Object.entries(items).length > 0) { Object.entries(items).map(data => { var handle = data[0]; var css = data[1]; allStyle[handle] = css; }); } if (innerBlocks.length > 0) { getCssfromBlocks(allStyle, innerBlocks); } }); return allStyle; } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { fetchPosts(); }, [queryArgs]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var keywordLength = queryLayouts.keyword.length; if (keywordLength != 0) { if (keywordLength >= 4) { fetchLayouts(); } else {} } else { fetchLayouts(); } }, [layoutData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var keywordLength = queryLayouts.keyword.length; if (keywordLength != 0) { if (keywordLength >= 4) { fetchLayouts(); } else {} } else { fetchLayouts(); } }, [queryLayouts]); var [layoutImporting, setlayoutImporting] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Using the hook. function importLayout(postData) { setTimeout(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/import_post_grid_template", method: "POST", data: { postData: postData } }).then(res => { setlayoutImporting(false); }); }, 2000); } function fetchLayouts() { setLayoutLoading(true); if (layoutData.source == "saved") { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_posts_layout", method: "POST", data: { category: queryLayouts.category, page: queryLayouts.page, keyword: queryLayouts.keyword } }).then(res => { setLayoutList({ items: res.posts }); setLayoutCats(res.terms); setLayoutLoading(false); }); } else { var postData = { keyword: queryLayouts.keyword, page: queryLayouts.page, category: queryLayouts.category }; postData = JSON.stringify(postData); fetch("https://getpostgrid.com/wp-json/post-grid/v2/get_post_layouts", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(data => { setLayoutList({ items: data.posts }); setLayoutCats(data.terms); setLayoutLoading(false); }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } } function fetchLayoutData() { setQueryLayouts({ keyword: queryLayouts.keyword, page: queryLayouts.page, category: queryLayouts.category }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_posts_layout", method: "POST", data: { category: queryLayouts.category, source: queryLayouts.source, page: queryLayouts.page, keyword: queryLayouts.keyword } }).then(_res => { setLayoutData({ source: layoutData.source }); setQueryLayouts({ keyword: queryLayouts.keyword, page: queryLayouts.page, category: queryLayouts.category }); }); } function updateQueryPram(newVal, index) { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; item.val = newVal; items[index] = item; setAttributes({ queryArgs: { ...queryArgs, items: items } }); fetchPosts(); } function generateQueryArgOptions(item, index) { var itemId = item.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveQueryPram, { title: _queryprams__WEBPACK_IMPORTED_MODULE_15__["default"][itemId] == undefined ? itemId : _queryprams__WEBPACK_IMPORTED_MODULE_15__["default"][itemId].label, index: index }), initialOpen: false }, item.id == "postType" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "postType" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_input_select__WEBPACK_IMPORTED_MODULE_22__["default"], { val: item.val, options: postTypes, multiple: true, onChange: newVal => { updateQueryPram(newVal, index); } })), item.id == "postStatus" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "postStatus" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_input_select__WEBPACK_IMPORTED_MODULE_22__["default"], { val: item.val, options: [{ label: "Publish", value: "publish" }, { label: "Pending", value: "pending" }, { label: "Draft", value: "draft" }, { label: "Auto draft", value: "auto-draft" }, { label: "Future", value: "future" }, { label: "Private", value: "private" }, { label: "Inherit", value: "inherit" }, { label: "Trash", value: "trash" }, { label: "Any", value: "any" }], multiple: true, onChange: newVal => { updateQueryPram(newVal, index); } })), item.id == "order" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "order" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: item.val, options: [{ label: "Ascending", value: "ASC" }, { label: "Descending", value: "DESC" }], onChange: newVal => updateQueryPram(newVal, index) })), item.id == "orderby" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "orderby" ? "" : "hidden" }, JSON.stringify(item.val), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_input_select__WEBPACK_IMPORTED_MODULE_22__["default"], { val: item.val, options: [{ label: "None", value: "none" }, { label: "ID", value: "ID" }, { label: "Author", value: "author" }, { label: "Title", value: "title" }, { label: "Name", value: "name" }, { label: "Type", value: "type" }, { label: "Date", value: "date" }, { label: "Modified", value: "modified" }, { label: "Parent", value: "parent" }, { label: "Random", value: "rand" }, { label: "Comment Count", value: "comment_count" }, { label: "Relevance", value: "relevance" }, { label: "Menu Order", value: "menu_order" }, { label: "Meta Value(String)", value: "meta_value" }, { label: "Meta Value(Number)", value: "meta_value_num" }, { label: "post__in", value: "post__in" }, { label: "post_name__in", value: "post_name__in" }, { label: "post_parent__in", value: "post_parent__in" }], multiple: true, onChange: newVal => { updateQueryPram(newVal, index); } })), item.id == "taxQueryRelation" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "taxQueryRelation" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: item.val, options: [{ label: "OR", value: "OR" }, { label: "AND", value: "AND" }], onChange: newVal => updateQueryPram(newVal, index) })), item.id == "metaQuery" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer inline-block mb-2 px-3 py-1 text-white bg-blue-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var xx = item.val.concat({ fields: [{ key: "", value: "", type: "", compare: "" }], relation: "OR" }); items[index].val = xx; //setAttributes({ queryArgs: { items: queryArgsX.items } }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Add"), item.val.map((x, j) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: "Meta Field", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer inline-block mb-2 px-3 py-1 text-white bg-red-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var xx = item.val.splice(j, 1); items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Remove"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "Relation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: x.relation, options: [{ label: "OR", value: "OR" }, { label: "AND", value: "AND" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; item.val[j].relation = newVal; //var term = itemData.val[j].fields[k] //term.taxonomy = newVal; items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), x.fields.map((y, k) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-solid border-gray-300 py-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer block text-right mb-2 px-3 py-1 text-white bg-red-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var fields = item.val[j].fields; var xx = item.val[j].fields.splice(k, 1); items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Remove"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { label: "Custom field key", value: y.key, placeholder: "meta_key", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].fields[k]; term.key = newVal; items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { label: "Meta Value ", value: y.value, placeholder: "25", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].fields[k]; term.value = newVal; items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "Custom field type", value: y.type, options: [{ label: "NUMERIC", value: "NUMERIC" }, { label: "BINARY", value: "BINARY" }, { label: "CHAR", value: "CHAR" }, { label: "DATE", value: "DATE" }, { label: "DATETIME", value: "DATETIME" }, { label: "DECIMAL", value: "DECIMAL" }, { label: "SIGNED", value: "SIGNED" }, { label: "TIME", value: "TIME" }, { label: "UNSIGNED", value: "UNSIGNED" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].fields[k]; term.type = newVal; items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "compare ", value: y.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: ">=", value: ">=" }, { label: "<", value: "<" }, { label: "<=", value: "<=" }, { label: "LIKE", value: "LIKE" }, { label: "NOT LIKE", value: "NOT LIKE" }, { label: "IN", value: "IN" }, { label: "NOT IN", value: "NOT IN" }, { label: "BETWEEN", value: "BETWEEN" }, { label: "NOT BETWEEN", value: "NOT BETWEEN" }, { label: "EXISTS", value: "EXISTS" }, { label: "NOT EXISTS", value: "NOT EXISTS" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].fields[k]; term.compare = newVal; items[index].val = item.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }))); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer text-center px-3 py-1 text-white bg-blue-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var xx = item.val[j].fields.concat({ key: "", value: "", type: "", compare: "" }); items[index].val[j].fields = xx; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Add"))); }))), item.id == "dateQuery" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Add Arguments"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { options: [{ value: "", label: "Select..." }, { value: "year", label: "Year" }, { value: "month", label: "Month" }, { value: "week", label: "Week" }, { value: "day", label: "Day" }, { value: "hour", label: "Hour" }, { value: "minute", label: "Minute" }, { value: "second", label: "Second" }, { value: "after", label: "After" }, { value: "before", label: "Before" }, { value: "inclusive", label: "Inclusive" }, { value: "compare", label: "Compare" }, { value: "column", label: "Column" }, { value: "relation", label: "Relation" }], onChange: newVal => { var items = [...queryArgs.items]; var itemData = { ...queryArgs.items[index] }; if (newVal == "year") { var xx = itemData.val.concat({ id: "year", value: "", compare: "" }); } if (newVal == "month") { var xx = itemData.val.concat({ id: "month", value: "", compare: "" }); } if (newVal == "week") { var xx = itemData.val.concat({ id: "week", value: "", compare: "" }); } if (newVal == "day") { var xx = itemData.val.concat({ id: "day", value: "", compare: "" }); } if (newVal == "hour") { var xx = itemData.val.concat({ id: "hour", value: "", compare: "" }); } if (newVal == "minute") { var xx = itemData.val.concat({ id: "minute", value: "", compare: "" }); } if (newVal == "second") { var xx = itemData.val.concat({ id: "second", value: "", compare: "" }); } if (newVal == "inclusive") { var xx = itemData.val.concat({ id: "inclusive", value: true }); } if (newVal == "compare") { var xx = itemData.val.concat({ id: "compare", value: "" }); } if (newVal == "column") { var xx = itemData.val.concat({ id: "column", value: "" }); } if (newVal == "relation") { var xx = itemData.val.concat({ id: "relation", value: "" }); } if (newVal == "before") { var xx = itemData.val.concat({ id: "before", value: "", year: "", month: "", day: "" }); } if (newVal == "after") { var xx = itemData.val.concat({ id: "after", value: "", year: "", month: "", day: "" }); } items[index].val = xx; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), item.val.map((x, j) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: x.id, initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer px-3 py-1 text-white bg-red-600 text-sm my-2 inline-block", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //item.val = newVal; //queryArgsX.items[index].val.splice(j, 1); item.val.splice(j, 1); items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Delete"), (x.id == "after" || x.id == "before") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Year"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //queryArgsX.items[index].val[j].year = newVal; item.val[j].year = newVal; items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Month"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //queryArgsX.items[index].val[j].month = newVal; item.val[j].month = newVal; items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", null, "Day"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "", onChange: newVal => { //clearTimeout(debounce); //debounce = setTimeout(() => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //queryArgsX.items[index].val[j].day = newVal; item.val[j].day = newVal; items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); //}, 1000); } }))), x.id == "inclusive" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, options: [{ label: "True", value: true }, { label: "False", value: false }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //queryArgsX.items[index].val[j].value = newVal; item.val[j].value = newVal; items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), x.id == "compare" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: ">=", value: ">=" }, { label: "<", value: "<" }, { label: "<=", value: "<=" }, { label: "IN", value: "IN" }, { label: "NOT IN", value: "NOT IN" }, { label: "EXISTS", value: "EXISTS" }, { label: "NOT EXISTS", value: "NOT EXISTS" }, { label: "BETWEEN", value: "BETWEEN" }, { label: "NOT BETWEEN", value: "NOT BETWEEN" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //queryArgsX.items[index].val[j].value = newVal; item.val[j].value = newVal; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), x.id == "column" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "", onChange: newVal => { //clearTimeout(debounce); //debounce = setTimeout(() => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; // queryArgsX.items[index].val[j].value = newVal; item.val[j].value = newVal; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); //}, 1000); } })), x.id == "relation" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, options: [{ label: "OR", value: "OR" }, { label: "AND", value: "AND" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //queryArgsX.items[index].val[j].value = newVal; item.val[j].value = newVal; items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), (x.id == "year" || x.id == "month" || x.id == "week" || x.id == "day" || x.id == "hour" || x.id == "minute" || x.id == "second") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { label: "Value", placeholder: "", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //clearTimeout(debounce); //debounce = setTimeout(() => { //queryArgsX.items[index].val[j].value = newVal; item.val[j].value = newVal; items[index] = item; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); //}, 1000); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "compare ", options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: ">=", value: ">=" }, { label: "<", value: "<" }, { label: "<=", value: "<=" }, { label: "IN", value: "IN" }, { label: "NOT IN", value: "NOT IN" }, { label: "EXISTS", value: "EXISTS" }, { label: "NOT EXISTS", value: "NOT EXISTS" }, { label: "BETWEEN", value: "BETWEEN" }, { label: "NOT BETWEEN", value: "NOT BETWEEN" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; item.val[j].compare = newVal; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })))); })), item.id == "taxQuery" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer inline-block mb-2 px-3 py-1 text-white bg-blue-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var xx = item.val.concat({ terms: [{ taxonomy: "", field: "", terms: [], operator: "" }], relation: "OR" }); items[index].val = xx; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Add"), item.val.map((x, j) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: "Term", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer inline-block mb-2 px-3 py-1 text-white bg-red-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; //var itemData = items[index]; var xx = item.val.splice(j, 1); items[index].val = item.val; // setAttributes({ // queryArgs: { items: queryArgsX.items }, // }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Remove"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, "Terms Relation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: x.relation, options: [{ label: "OR", value: "OR" }, { label: "AND", value: "AND" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; item.val[j].relation = newVal; items[index].val = itemData.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), x.terms.map((y, k) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-solid border-gray-300 py-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { label: "Taxonomy", value: y.taxonomy, placeholder: "Taxonomy", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].terms[k]; term.taxonomy = newVal; items[index].val = item.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { label: "Terms", value: y.terms.join(","), placeholder: "Comma separated", onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].terms[k]; term.terms = newVal.split(","); items[index].val = item.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "Fields", value: y.field, options: [{ label: "Choose...", value: "" }, { label: "Term ID", value: "term_id" }, { label: "Name", value: "name" }, { label: "Slug", value: "slug" }, { label: "Term taxonomy id", value: "term_taxonomy_id" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].terms[k]; term.field = newVal; items[index].val = item.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "Operator", value: y.operator, options: [{ label: "Choose...", value: "" }, { label: "IN", value: "IN" }, { label: "NOT IN", value: "NOT IN" }, { label: "AND", value: "AND" }, { label: "EXISTS", value: "EXISTS" }, { label: "NOT EXISTS", value: "NOT EXISTS" }], onChange: newVal => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var term = item.val[j].terms[k]; term.operator = newVal; items[index].val = item.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer block text-center my-2 px-3 py-1 text-white bg-red-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var terms = item.val[j].terms; var xx = item.val[j].terms.splice(k, 1); items[index].val = item.val; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Remove")); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer text-center px-3 py-1 text-white bg-blue-600 text-sm", onClick: _ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; var xx = item.val[j].terms.concat({ taxonomy: "", field: "", terms: [], operator: "" }); items[index].val[j].terms = xx; setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, "Add"))); }))), (item.id == "metaKey" || item.id == "s" || item.id == "metaValue" || item.id == "metaValueNum" || item.id == "year" || item.id == "monthnum" || item.id == "w" || item.id == "day" || item.id == "hour" || item.id == "minute" || item.id == "second" || item.id == "m" || item.id == "author" || item.id == "authorName" || item.id == "tag" || item.id == "tagId" || item.id == "cat" || item.id == "categoryName" || item.id == "p" || item.id == "name" || item.id == "pageId" || item.id == "pagename" || item.id == "postParent" || item.id == "postsPerPage" || item.id == "paged" || item.id == "offset" || item.id == "postsPerArchivePage" || item.id == "perm") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: item.val, onChange: newVal => { //clearTimeout(debounce); //debounce = setTimeout(() => { updateQueryPram(newVal, index); //}, 1000); } })), item.id == "metaCompare" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: item.val, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: ">=", value: ">=" }, { label: "<", value: "<" }, { label: "<=", value: "<=" }, { label: "LIKE", value: "LIKE" }, { label: "NOT LIKE", value: "NOT LIKE" }, { label: "IN", value: "IN" }, { label: "NOT IN", value: "NOT IN" }, { label: "BETWEEN", value: "BETWEEN" }, { label: "NOT BETWEEN", value: "NOT BETWEEN" }, { label: "NOT EXISTS", value: "NOT EXISTS" }, { label: "REGEXP", value: "REGEXP" }, { label: "NOT REGEXP", value: "NOT REGEXP" }, { label: "RLIKE", value: "RLIKE" }], onChange: newVal => { updateQueryPram(newVal, index); } })), item.id == "postPassword" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: item.val, onChange: newVal => updateQueryPram(newVal, index) })), (item.id == "postNameIn" || item.id == "authorIn" || item.id == "authorNotIn" || item.id == "postNotIn" || item.id == "postIn" || item.id == "postParentNotIn" || item.id == "tagNotIn" || item.id == "tagAnd" || item.id == "tagIn" || item.id == "postParentIn" || item.id == "tagSlugIn" || item.id == "tagSlugAnd" || item.id == "categoryNotIn" || item.id == "categoryIn" || item.id == "categoryAnd") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: item.val, placeholder: "Comma separated", onChange: newVal => updateQueryPram(newVal, index) })), item.id == "commentCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: item.val?.value, placeholder: "Comment Count, Ex: 25", onChange: newVal => updateQueryPram({ ...item.val, value: newVal }, index) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: item.val?.compare, options: [{ label: "=", value: "=" }, { label: "!=", value: "!=" }, { label: ">", value: ">" }, { label: ">=", value: ">=" }, { label: "<", value: "<" }, { label: "<=", value: "<=" }], onChange: newVal => updateQueryPram({ ...item.val, compare: newVal }, index) })), item.id == "postMimeType" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_input_select__WEBPACK_IMPORTED_MODULE_22__["default"], { val: item.val, options: [{ label: "image/jpeg", value: "jpg|jpeg|jpe" }, { label: "image/gif", value: "gif" }, { label: "image/png", value: "png" }, { label: "image/bmp", value: "bmp" }], multiple: true, onChange: newVal => { updateQueryPram(newVal, index); } })), (item.id == "cacheResults" || item.id == "nopaging" || item.id == "hasPassword" || item.id == "updatePostMetaCache" || item.id == "updatePostTermCache") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: item.val, options: [{ label: "True", value: true }, { label: "False", value: false }], onChange: newVal => updateQueryPram(newVal, index) })), item.id == "ignoreStickyPosts" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { style: { margin: 0 }, label: "", value: item.val, options: [{ label: "True", value: true }, { label: "False", value: false }], onChange: newVal => updateQueryPram(newVal, index) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", null, " ", _queryprams__WEBPACK_IMPORTED_MODULE_15__["default"][itemId] == undefined ? itemId : _queryprams__WEBPACK_IMPORTED_MODULE_15__["default"][itemId].description))); } function addQueryPram(option, index) { var id = option.id; var items = [...queryArgs.items]; var itemX = { ...queryArgs.items[index] }; var data = { val: _queryprams__WEBPACK_IMPORTED_MODULE_15__["default"][id].value, id: id }; var multiple = data.multiple; var isExist = items.map(item => { if (item.id == id) { return true; } }); var itemsX = items.concat([data]); //setAttributes({ queryArgs: { items: items } }); setAttributes({ queryArgs: { ...queryArgs, items: itemsX } }); } var RemoveQueryPram = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; items.splice(index, 1); //setAttributes({ queryArgs: { items: queryArgsX.items } }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-2" }, title)); }; function addQueryPreset(option, index) { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; items = option.value.items; //setAttributes({ queryArgs: { items: queryArgsX.items } }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); fetchPosts(); } var postTypes = []; const postTypesData = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.store).getPostTypes({ per_page: -1 }), []); postTypesData !== null && postTypesData.map(x => { postTypes.push({ value: x.slug, label: x.name }); }); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } const ALLOWED_BLOCKS = ["post-grid/post-grid-item"]; const MY_TEMPLATE = [["post-grid/post-grid-item", {}], ["post-grid/post-grid-item", {}], ["post-grid/post-grid-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} pg-post-query items-loop` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, //template: MY_TEMPLATE, orientation: "horizontal", templateInsertUpdatesSelection: true //renderAppender: InnerBlocks.ButtonBlockAppender }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: "Layouts", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-white cursor-pointer" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: layoutData.source == "library" ? "bg-blue-500 w-1/2 inline-block px-3 py-2 text-[14px] font-bold" : "bg-blue-300 text-[14px] font-bold inline-block px-3 py-2 w-1/2", onClick: _ev => { setLayoutData({ source: "library" }); setQueryLayouts({ keyword: "", page: 1, category: "" }); } }, "Library"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: layoutData.source == "saved" ? "bg-blue-500 w-1/2 inline-block px-3 py-2 text-[14px] font-bold" : "bg-blue-300 inline-block px-3 py-2 w-1/2 text-[14px] font-bold", onClick: _ev => { setLayoutData({ source: "saved" }); setQueryLayouts({ keyword: "", page: 1, category: "" }); } }, "Saved")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: queryLayouts.keyword, type: "text", placeholder: "Search Layouts...", onChange: newVal => { //clearTimeout(debounce); //debounce = setTimeout(() => { setQueryLayouts({ keyword: newVal, page: queryLayouts.page, category: queryLayouts.category }); //}, 1000); //fetchLayouts(); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { className: "w-full", style: { margin: 0 }, label: "", value: queryLayouts.category, options: layoutCats, onChange: newVal => { setQueryLayouts({ keyword: queryLayouts.keyword, page: queryLayouts.page, category: newVal }); //fetchLayouts(); } })), layoutData.source == "saved" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex gap-2\t" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-full rounded-sm py-2 bg-blue-500 text-[14px] font-bold text-white cursor-pointer my-3 text-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { className: " ", target: "_blank", href: clientData.siteAdminurl + "edit.php?post_type=post_grid_template" }, "All Layouts")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-full rounded-sm py-2 bg-blue-500 text-[14px] font-bold text-white cursor-pointer my-3 text-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { className: "", target: "_blank", href: clientData.siteAdminurl + "post-new.php?post_type=post_grid_template" }, "Create Layout"))), layoutLoading == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Spinner, null)), layoutLoading == false && layoutList.items.length > 0 && layoutList.items.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-4 border bg-gray-200 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative cursor-pointer", onClick: _ev => { if (x.is_pro == true) { alert("Sorry this is only available in premium"); return; } selectLayout(x.post_id, x.post_content); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { className: "w-full", src: x.thumb_url }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-[14px] p-1 bg-gray-500 text-white bg-opacity-80 text-bold text-center" }, x.post_title)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "py-3 flex justify-items-stretch" }, layoutData.source != "library" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-1 inline-block bg-blue-500 hover:bg-blue-400 px-2 py-1 text-white rounded-sm cursor-pointer" }, " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: clientData.siteAdminurl + "post.php?post=" + x.post_id + "&action=edit" }, "Edit"), " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-1 inline-block bg-blue-500 hover:bg-blue-400 px-2 py-1 text-white rounded-sm cursor-pointer" }, "#", x.post_id), layoutData.source == "library" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mx-1 relative inline-block bg-blue-500 hover:bg-blue-400 px-2 py-1 text-white rounded-sm cursor-pointer", onClick: ev => { if (isProFeature == false) { if (!importLayoutOpen.isOpen) { setlayoutImporting(true); importLayout(x); } } setimportLayoutOpen({ id: x.post_id, isOpen: !importLayoutOpen.isOpen }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "dashicons dashicons-download" }), " ", "Import"), importLayoutOpen.id == x.post_id && importLayoutOpen.isOpen && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom left p-2 " }, isProFeature == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-48 bg-amber-100 px-3 py-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", { className: "" }, " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "underline" }, "Importing Layouts"), " ", "Only available in Premium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", { className: "" }, "After import the layout you can customize and make your own.")), isProFeature == false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-48 bg-sky-300 px-3 py-2" }, layoutImporting && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Spinner, null), " Importing"), !layoutImporting && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", { className: "" }, "Layout imported and saved under", " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", className: "font-bold underline ", href: clientData.siteAdminurl + "edit.php?post_type=post_grid_template" }, "Saved Templates"))))), x.is_pro == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: " bg-amber-500 text-white px-3 rounded-sm py-1" }, "Pro"), x.is_pro == false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: " bg-lime-600 text-white px-3 rounded-sm py-1" }, "Free"))); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-full rounded-sm py-2 bg-blue-500 text-[14px] font-bold text-white cursor-pointer my-3 text-center", onClick: _ev => { var page = queryLayouts.page + 1; setQueryLayouts({ keyword: queryLayouts.keyword, page: page, category: queryLayouts.category }); } }, layoutLoading.loading == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Spinner, null)), "Load More")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: "Query Post", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-3 flex gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_21__["default"], { position: "bottom right", btnClass: "py-2", variant: "secondary", options: _query_presets__WEBPACK_IMPORTED_MODULE_14__["default"], buttonTitle: "Query Presets", onChange: addQueryPreset, values: "" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_21__["default"], { position: "bottom right", variant: "secondary", options: _queryprams__WEBPACK_IMPORTED_MODULE_15__["default"], buttonTitle: "Add Query Params", onChange: addQueryPram, values: "" })), queryArgs.items.map((item, index) => { return generateQueryArgOptions(item, index); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Wrapper Exclude?", help: itemsWrap.options.excludedWrapper ? "Wrapper Excluded." : "Wrapper Included", checked: itemsWrap.options.excludedWrapper ? true : false, onChange: e => { var options = { ...itemsWrap.options, excludedWrapper: itemsWrap.options.excludedWrapper ? false : true }; setAttributes({ itemsWrap: { ...itemsWrap, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: itemWrap.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "li", value: "li" }], onChange: newVal => { var options = { ...itemWrap.options, tag: newVal }; setAttributes({ itemWrap: { ...itemWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Wrapper Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: itemWrap.options.class, onChange: newVal => { var options = { ...itemWrap.options, class: newVal }; setAttributes({ itemWrap: { ...itemWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " flex flex-col gap-4 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Counter Class?", help: itemWrap.options.counterClass ? "Counter Class Added." : "Counter Class Removed", checked: itemWrap.options.counterClass ? true : false, onChange: e => { var options = { ...itemWrap.options, counterClass: itemWrap.options.counterClass ? false : true }; setAttributes({ itemWrap: { ...itemWrap, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Terms Class?", help: itemWrap.options.termsClass ? "Terms Class Added." : "Terms Class Removed", checked: itemWrap.options.termsClass ? true : false, onChange: e => { var options = { ...itemWrap.options, termsClass: itemWrap.options.termsClass ? false : true }; setAttributes({ itemWrap: { ...itemWrap, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Odd/Even Class?", help: itemWrap.options.oddEvenClass ? "Odd/Even Class Added." : "Odd/Even Class Removed", checked: itemWrap.options.oddEvenClass ? true : false, onChange: e => { var options = { ...itemWrap.options, oddEvenClass: itemWrap.options.oddEvenClass ? false : true }; setAttributes({ itemWrap: { ...itemWrap, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-query" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, isBusy == false && posts == null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: noPostsWrap.options.class }, "No Post found")), isBusy && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: spinnerWrap.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Spinner, null)), " "), isBusy == false && posts != null && posts.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, posts.map(post => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.BlockContextProvider, { key: post.ID, value: { postId: post.ID, postType: post.post_type } }, post.ID === (activeBlockContextId || posts[0]?.ID) ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(PostTemplateInnerBlocks, { attsx: TEMPLATEX })) : null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(MemoizedPostTemplateBlockPreview, { blocks: blocks, blockContextId: post.ID, setActiveBlockContextId: setActiveBlockContextId, isHidden: post.ID === (activeBlockContextId || posts[0]?.ID) }))); })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/post-query/query-presets.js": /*!************************************************!*\ !*** ./src/blocks/post-query/query-presets.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); const queryPresetsBasic = [{ label: 'Latest Posts by Publish Date', key: 'preset1', isPro: false, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["date"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Oldest Posts by Publish Date', key: 'preset2', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "ASC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["date"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Latest Posts by Modified Date', key: 'preset3', isPro: false, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["modified"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Oldest Posts by Modified Date', key: 'preset4', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "ASC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["modified"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Alphabetical Order A-Z', key: 'preset5', isPro: false, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "ASC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["name"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Alphabetical Order Z-A', key: 'preset6', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["name"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Most Commented Posts', key: 'preset7', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["name"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Random 10 Posts', key: 'preset8', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["rand"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }]; let queryPresets = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)('queryPresets', queryPresetsBasic); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (queryPresets); /***/ }), /***/ "./src/blocks/post-query/queryprams.js": /*!*********************************************!*\ !*** ./src/blocks/post-query/queryprams.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); // const queryPramsBasic = [ // { val: ['post'], multiple: false, id: 'postType', label: 'Post Types', description: "Select Post Types to Query" }, // { val: '', multiple: false, id: 's', label: 'Keyword', description: "Search keyword, ex: hello" }, // { val: [], multiple: false, id: 'postStatus', label: 'Post status', description: "Query post by post status" }, // { val: '', multiple: false, id: 'order', label: 'Order', description: "Post query order" }, // { val: [], multiple: false, id: 'orderby', label: 'Orderby', description: "Post query orderby" }, // { val: '', multiple: false, id: 'metaKey', label: 'Meta fields key', description: "Post query by meta fields key" }, // // Category Parameters // { val: '', multiple: false, id: 'cat', label: 'Category ID', description: "Post query by Category ID" }, // { val: '', multiple: false, id: 'categoryName', label: 'Category Name', description: "Post query by Category Name" }, // { val: [], multiple: false, id: 'categoryAnd', label: 'Category And', description: "Post query by Category IDs", isPro: true }, // { val: [], multiple: false, id: 'categoryIn', label: 'Category In', description: "Post query by Category IDs", isPro: true }, // { val: [], multiple: false, id: 'categoryNotIn', label: 'Category Not In', description: "Post query by excluded Category IDs", isPro: true }, // // Tag Parameters // { val: '', multiple: false, id: 'tag', label: 'Tags', description: "Post query by Tag slug" }, // { val: '', multiple: false, id: 'tagId', label: 'Tag Id', description: "Post query by Tag ID" }, // { val: [], multiple: false, id: 'tagAnd', label: 'Tag And', description: "Post query by Tag Ids", isPro: true }, // { val: [], multiple: false, id: 'tagIn', label: 'Tag In', description: "Post query by Tag ids", isPro: true }, // { val: [], multiple: false, id: 'tagNotIn', label: 'Tag Not In', description: "Post query by excluded Tag ids" }, // { val: [], multiple: false, id: 'tagSlugAnd', label: 'Tag Slug And', description: "Post query by Tags slug", isPro: true }, // { val: [], multiple: false, id: 'tagSlugIn', label: 'Tag Slug In', description: "Post query by excluded Tags slug", isPro: true }, // { val: [], multiple: false, id: 'taxQuery', label: 'Tax Query', description: "Taxonomies query arguments", isPro: true }, // { val: 'OR', multiple: false, id: 'taxQueryRelation', label: 'Tax Query Relation', description: "Taxonomies query relation" }, // // Date Parameters // { val: [], multiple: false, id: 'dateQuery', label: 'Date Query', description: "Post query by date", isPro: true }, // { val: '', multiple: false, id: 'year', label: 'Year', description: "Post query by year" }, // { val: '', multiple: false, id: 'monthnum', label: 'Month', description: "Post query by month" }, // { val: '', multiple: false, id: 'w', label: 'Week', description: "Post query by week" }, // { val: '', multiple: false, id: 'day', label: 'Day', description: "Post query by day" }, // { val: '', multiple: false, id: 'hour', label: 'Hour', description: "Post query by hour" }, // { val: '', multiple: false, id: 'minute', label: 'Miniute', description: "Post query by miniute" }, // { val: '', multiple: false, id: 'second', label: 'Second', description: "Post query by second" }, // { val: '', multiple: false, id: 'm', label: 'Month', description: "Post query by month" }, // // Author Parameters // { val: '', multiple: false, id: 'author', label: 'Author', description: "Post query by Author ID" }, // { val: '', multiple: false, id: 'authorName', label: 'Author Name', description: "Post query by Author Name" }, // { val: [], multiple: false, id: 'authorIn', label: 'Author In', description: "Post query by Author IDs", isPro: true }, // { val: [], multiple: false, id: 'authorNotIn', label: 'Author Not In', description: "Post query by exluded Author IDs", isPro: true }, // { val: '', multiple: false, id: 'p', label: 'Post id', description: "Post query by single post id" }, // { val: '', multiple: false, id: 'name', label: 'Name', description: "Post query by post slug" }, // { val: '', multiple: false, id: 'pageId', label: 'Page Id', description: "Post query by single page id" }, // { val: '', multiple: false, id: 'pagename', label: 'Page name', description: "Post query by page slug" }, // { val: '', multiple: false, id: 'postParent', label: 'Post Parent', description: "Post query by post parent id", isPro: true }, // { val: [], multiple: false, id: 'postParentIn', label: 'Post Parent In', description: "Post query by post parent ids", isPro: true }, // { val: [], multiple: false, id: 'postParentNotIn', label: 'Post Parent Not In', description: "Post query by excluded post parent ids" }, // { val: [], multiple: false, id: 'postIn', label: 'Post In', description: "Post query by multiple post ids, comma separated.", isPro: true }, // { val: [], multiple: false, id: 'postNotIn', label: 'Post Not In', description: "Post query by excluded post ids", isPro: true }, // { val: [{ slug: '' }], multiple: false, id: 'postNameIn', label: 'Post Name In', description: "Post query by post slugs", isPro: true }, // { val: '', multiple: false, id: 'hasPassword', label: 'Has Password', description: "Post query for posts with passwords" }, // { val: '', multiple: false, id: 'postPassword', label: 'Post Password', description: "Post query for posts with particular passwords", isPro: true }, // { val: { compare: '=' }, multiple: false, id: 'commentCount', label: 'Comment Count', description: "Post query by comment count" }, // { val: '', multiple: false, id: 'nopaging', label: 'No Paging', description: "Enable show all posts or use pagination" }, // { val: '', multiple: false, id: 'postsPerPage', label: 'Posts Per Page', description: "Number of post to show per page" }, // { val: '', multiple: false, id: 'paged', label: 'Paged', description: "Pagination start with" }, // { val: '', multiple: false, id: 'offset', label: 'Offset', description: "Number of post to displace or pass over" }, // { val: '', multiple: false, id: 'postsPerArchivePage', label: 'Posts Per Archive Page', description: "" }, // { val: '', multiple: false, id: 'ignoreStickyPosts', label: 'Ignore Sticky Posts', description: "Ignore post from post query", isPro: true }, // { val: '', multiple: false, id: 'metaKey', label: 'Meta Key', description: "Post query by custom field key" }, // { val: '', multiple: false, id: 'metaValue', label: 'Meta Value', description: "Post query by custom field value" }, // { val: '', multiple: false, id: 'metaValueNum', label: 'Meta Value Num', description: "Post query by custom field value for number types" }, // { val: '', multiple: false, id: 'metaCompare', label: 'Meta Compare', description: "Meta query compare" }, // { val: [], multiple: false, id: 'metaQuery', label: 'Meta Query', description: "Advance meta fields query", isPro: true }, // { val: 'readable', multiple: false, id: 'perm', label: 'Perm', description: "User permission parameter" }, // { val: [], multiple: false, id: 'postMimeType', label: 'Post Mime Type', description: "Post query by allwed post mime types" }, // { val: false, multiple: false, id: 'cacheResults', label: 'Cache Results', description: "Enable Post information cache" }, // { val: false, multiple: false, id: 'updatePostMetaCache', label: 'Update Post Meta Cache', description: "Enable Post meta information cache" }, // { val: false, multiple: false, id: 'updatePostTermCache', label: 'Update Post Term Cache', description: "Enable Post term information cache" }, // ]; const queryPramsBasic = { postType: { value: ['post'], multiple: false, id: 'postType', label: 'Post types', description: "Select Post Types to Query" }, s: { value: '', multiple: false, id: 's', label: 'Keyword', description: "Search keyword, ex: hello" }, postStatus: { value: [], multiple: false, id: 'postStatus', label: 'Post status', description: "Query post by post status" }, order: { value: '', multiple: false, id: 'order', label: 'Order', description: "Post query order" }, orderby: { value: [], multiple: false, id: 'orderby', label: 'Orderby', description: "Post query orderby" }, metaKey: { value: '', multiple: false, id: 'metaKey', label: 'Meta fields key', description: "Post query by meta fields key" }, // Category Parameters cat: { value: '', multiple: false, id: 'cat', label: 'Category ID', description: "Post query by Category ID" }, categoryName: { value: '', multiple: false, id: 'categoryName', label: 'Category Name', description: "Post query by Category Name" }, categoryAnd: { value: [], multiple: false, id: 'categoryAnd', label: 'Category And', description: "Post query by Category IDs", isPro: true }, categoryIn: { value: [], multiple: false, id: 'categoryIn', label: 'Category In', description: "Post query by Category IDs", isPro: true }, categoryNotIn: { value: [], multiple: false, id: 'categoryNotIn', label: 'Category Not In', description: "Post query by excluded Category IDs", isPro: true }, // Tag Parameters tag: { val: '', multiple: false, id: 'tag', label: 'Tags', description: "Post query by Tag slug" }, tagId: { val: '', multiple: false, id: 'tagId', label: 'Tag Id', description: "Post query by Tag ID" }, tagAnd: { val: [], multiple: false, id: 'tagAnd', label: 'Tag And', description: "Post query by Tag Ids", isPro: true }, tagIn: { val: [], multiple: false, id: 'tagIn', label: 'Tag In', description: "Post query by Tag ids", isPro: true }, tagNotIn: { val: [], multiple: false, id: 'tagNotIn', label: 'Tag Not In', description: "Post query by excluded Tag ids" }, tagSlugAnd: { val: [], multiple: false, id: 'tagSlugAnd', label: 'Tag Slug And', description: "Post query by Tags slug", isPro: true }, tagSlugIn: { val: [], multiple: false, id: 'tagSlugIn', label: 'Tag Slug In', description: "Post query by excluded Tags slug", isPro: true }, taxQuery: { value: [], multiple: false, id: 'taxQuery', label: 'Tax Query', description: "Taxonomies query arguments", isPro: true }, taxQueryRelation: { val: 'OR', multiple: false, id: 'taxQueryRelation', label: 'Tax Query Relation', description: "Taxonomies query relation" }, // // Date Parameters dateQuery: { value: [], multiple: false, id: 'dateQuery', label: 'Date Query', description: "Post query by date", isPro: true }, year: { val: '', multiple: false, id: 'year', label: 'Year', description: "Post query by year" }, monthnum: { val: '', multiple: false, id: 'monthnum', label: 'Month', description: "Post query by month" }, w: { val: '', multiple: false, id: 'w', label: 'Week', description: "Post query by week" }, day: { val: '', multiple: false, id: 'day', label: 'Day', description: "Post query by day" }, hour: { val: '', multiple: false, id: 'hour', label: 'Hour', description: "Post query by hour" }, minute: { val: '', multiple: false, id: 'minute', label: 'Miniute', description: "Post query by miniute" }, second: { val: '', multiple: false, id: 'second', label: 'Second', description: "Post query by second" }, m: { val: '', multiple: false, id: 'm', label: 'Month', description: "Post query by month" }, // // Author Parameters author: { val: '', multiple: false, id: 'author', label: 'Author', description: "Post query by Author ID" }, authorName: { val: '', multiple: false, id: 'authorName', label: 'Author Name', description: "Post query by Author Name" }, authorIn: { val: [], multiple: false, id: 'authorIn', label: 'Author In', description: "Post query by Author IDs", isPro: true }, authorNotIn: { val: [], multiple: false, id: 'authorNotIn', label: 'Author Not In', description: "Post query by exluded Author IDs", isPro: true }, p: { val: '', multiple: false, id: 'p', label: 'Post id', description: "Post query by single post id" }, name: { val: '', multiple: false, id: 'name', label: 'Name', description: "Post query by post slug" }, pageId: { val: '', multiple: false, id: 'pageId', label: 'Page Id', description: "Post query by single page id" }, pagename: { val: '', multiple: false, id: 'pagename', label: 'Page name', description: "Post query by page slug" }, postParent: { val: '', multiple: false, id: 'postParent', label: 'Post Parent', description: "Post query by post parent id", isPro: true }, postParentIn: { val: [], multiple: false, id: 'postParentIn', label: 'Post Parent In', description: "Post query by post parent ids", isPro: true }, postParentNotIn: { val: [], multiple: false, id: 'postParentNotIn', label: 'Post Parent Not In', description: "Post query by excluded post parent ids" }, postIn: { val: [], multiple: false, id: 'postIn', label: 'Post In', description: "Post query by multiple post ids, comma separated.", isPro: true }, postNotIn: { val: [], multiple: false, id: 'postNotIn', label: 'Post Not In', description: "Post query by excluded post ids", isPro: true }, postNameIn: { val: [{ slug: '' }], multiple: false, id: 'postNameIn', label: 'Post Name In', description: "Post query by post slugs", isPro: true }, hasPassword: { val: '', multiple: false, id: 'hasPassword', label: 'Has Password', description: "Post query for posts with passwords" }, postPassword: { val: '', multiple: false, id: 'postPassword', label: 'Post Password', description: "Post query for posts with particular passwords", isPro: true }, commentCount: { val: { compare: "=", value: 10 }, multiple: false, id: 'commentCount', label: 'Comment Count', description: "Post query by comment count" }, nopaging: { val: '', multiple: false, id: 'nopaging', label: 'No Paging', description: "Enable show all posts or use pagination" }, postsPerPage: { val: '', multiple: false, id: 'postsPerPage', label: 'Posts Per Page', description: "Number of post to show per page" }, paged: { val: '', multiple: false, id: 'paged', label: 'Paged', description: "Pagination start with" }, offset: { val: '', multiple: false, id: 'offset', label: 'Offset', description: "Number of post to displace or pass over" }, postsPerArchivePage: { val: '', multiple: false, id: 'postsPerArchivePage', label: 'Posts Per Archive Page', description: "" }, ignoreStickyPosts: { val: '', multiple: false, id: 'ignoreStickyPosts', label: 'Ignore Sticky Posts', description: "Ignore post from post query", isPro: true }, metaKey: { val: '', multiple: false, id: 'metaKey', label: 'Meta Key', description: "Post query by custom field key" }, metaValue: { val: '', multiple: false, id: 'metaValue', label: 'Meta Value', description: "Post query by custom field value" }, metaValueNum: { val: '', multiple: false, id: 'metaValueNum', label: 'Meta Value Num', description: "Post query by custom field value for number types" }, metaCompare: { val: '', multiple: false, id: 'metaCompare', label: 'Meta Compare', description: "Meta query compare" }, metaQuery: { value: [], multiple: false, id: 'metaQuery', label: 'Meta Query', description: "Advance meta fields query", isPro: true }, perm: { val: 'readable', multiple: false, id: 'perm', label: 'Perm', description: "User permission parameter" }, postMimeType: { val: [], multiple: false, id: 'postMimeType', label: 'Post Mime Type', description: "Post query by allwed post mime types" }, cacheResults: { val: false, multiple: false, id: 'cacheResults', label: 'Cache Results', description: "Enable Post information cache" }, updatePostMetaCache: { val: false, multiple: false, id: 'updatePostMetaCache', label: 'Update Post Meta Cache', description: "Enable Post meta information cache" }, updatePostTermCache: { val: false, multiple: false, id: 'updatePostTermCache', label: 'Update Post Term Cache', description: "Enable Post term information cache" } }; let queryPrams = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)('queryPrams', queryPramsBasic); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (queryPrams); /***/ }), /***/ "./src/blocks/post-tags/index.js": /*!***************************************!*\ !*** ./src/blocks/post-tags/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-tags/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_363)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 56.9998H84.7061V66.4115H160V56.9998Z", fill: "url(#paint1_linear_61_363)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 94.8818H85V103.882H131V94.8818Z", fill: "url(#paint2_linear_61_363)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M106.561 76H85V85.41H106.561V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M133.281 76H111.72V85.41H133.281V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 76H138.439V85.41H160V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 68L27.097 83.7233L23.2135 77.5059L13 94H20.7281H33.4661H53L36.8446 68Z", fill: "url(#paint3_linear_61_363)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_363", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_363", x1: "84.7061", y1: "61.7056", x2: "160", y2: "61.7056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_363", x1: "85", y1: "99.3818", x2: "131", y2: "99.3818", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_363", x1: "13", y1: "81", x2: "53", y2: "81", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var items = attributes.items; var separator = attributes.separator; var frontText = attributes.frontText; var icon = attributes.icon; var termTitle = attributes.termTitle; var postCount = attributes.postCount; var utmTracking = attributes.utmTracking; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("isProFeature", true); const CustomTagWrapper = `${wrapper.options.tag}`; // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const itemSelector = blockClass + " .item"; const termTitleSelector = blockClass + " .termTitle"; const separatorSelector = blockClass + " .separator"; const frontTextSelector = blockClass + " .frontText"; const postCountSelector = blockClass + " .postCount"; const iconSelector = blockClass + " .icon"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ postTitle: postTitle }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = items; blockCssObj[termTitleSelector] = termTitle; blockCssObj[separatorSelector] = separator; blockCssObj[frontTextSelector] = frontText; blockCssObj[postCountSelector] = postCount; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var itemX = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: itemX } }); }, [blockId]); var iconPositionArgsBasic = { none: { label: "Choose Position", value: "" }, beforeFronttext: { label: "Before Front text", value: "beforeFronttext" }, afterFronttext: { label: "After Front text", value: "afterFronttext", isPro: true }, beforeItems: { label: "Before Items", value: "beforeItems", isPro: true }, afterItems: { label: "After Items", value: "afterItems", isPro: true }, beforeItem: { label: "Before Each Items", value: "beforeItem", isPro: true }, afterItem: { label: "After Each Items", value: "afterItem", isPro: true } }; let iconPositionArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("iconPositionArgs", iconPositionArgsBasic); var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, termUrl: { label: "Term URL", value: "termUrl" }, postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = linkToArgsBasic; function setFieldLinkTo(option, index) { var options = { ...items.options, linkTo: option.value }; setAttributes({ items: { ...items, options: options } }); } function setIconPosition(option, index) { var options = { ...icon.options, position: option.value }; setAttributes({ icon: { ...icon, options: options } }); } // var breakPointList = []; var dummyCats = [{ id: 1, count: 1, description: "", link: "#", name: "Tag 1", slug: "tag-1", taxonomy: "tag_tax" }, { id: 2, count: 1, description: "", link: "#", name: "Tag 2", slug: "tag-2", taxonomy: "tag_tax" }, { id: 3, count: 1, description: "", link: "#", name: "Tag 3", slug: "tag-3", taxonomy: "tag_tax" }, { id: 4, count: 1, description: "", link: "#", name: "Tag 4", slug: "tag-4", taxonomy: "tag_tax" }, { id: 5, count: 1, description: "", link: "#", name: "Tag 5", slug: "tag-5", taxonomy: "tag_tax" }, { id: 6, count: 1, description: "", link: "#", name: "Tag 6", slug: "tag-6", taxonomy: "tag_tax" }]; const [categoryCount, setcategoryCount] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); // Using the hook. const [postCategoriesData, setPostCategoriesData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [categories, setCategories] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [postCategoriesX, setPostCategoriesX] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "tags", postId); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setPostCategoriesData([]); setCategories([]); setcategoryCount(categories.length - 1); if (postCategoriesX != undefined) { for (var x in postCategoriesX) { var catId = postCategoriesX[x]; var assd = x; if (x) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/wp/v2/tags/" + catId, method: "GET" }).then(res => { setPostCategoriesData(current => [...current, res]); setCategories(current => [...current, res]); }); } } } else { setPostCategoriesData(dummyCats); setCategories(dummyCats); } }, [postCategoriesX]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var asdasd = postCategoriesData.slice(0, items.options.maxCount); setCategories(asdasd); }, [postCategoriesData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (postCategoriesX != undefined && postCategoriesX.length > 0) { var maxCount = items.options.maxCount.length > 0 ? items.options.maxCount : 99; setcategoryCount(categories.length - 1); var asdasd = postCategoriesData.slice(0, maxCount); setCategories(asdasd); } else { var asdasd = dummyCats.slice(0, maxCount); setCategories(asdasd); } }, [items]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var itemsX = attributes.items; var iconX = attributes.icon; var termTitleX = attributes.termTitle; var separatorX = attributes.separator; var postCountX = attributes.postCount; var frontTextX = attributes.frontText; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (frontTextX != undefined) { var frontTextY = { ...frontTextX, options: frontText.options }; setAttributes({ frontText: frontTextY }); blockCssObj[frontTextSelector] = frontTextY; } if (postCountX != undefined) { var postCountY = { ...postCountX, options: postCount.options }; setAttributes({ postCount: postCountY }); blockCssObj[postCountSelector] = postCountY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (termTitleX != undefined) { var termTitleY = { ...termTitleX, options: termTitle.options }; setAttributes({ termTitle: termTitleY }); blockCssObj[termTitleSelector] = termTitleY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemSelector] = itemsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var cssStyle = blockCssRules; setAttributes({ blockCssY: { items: cssStyle } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryItems(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; items[sudoScource] = sudoScourceArgs; }); var itemsX = Object.assign({}, items); setAttributes({ items: itemsX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySeparator(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; separator[sudoScource] = sudoScourceArgs; }); var separatorX = Object.assign({}, separator); setAttributes({ separator: separatorX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryFrontText(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; frontText[sudoScource] = sudoScourceArgs; }); var frontTextX = Object.assign({}, frontText); setAttributes({ frontText: frontTextX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItems(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, items); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItems(sudoScource, key) { var object = myStore.deletePropertyDeep(items, [sudoScource, key, breakPointX]); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItems(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, items); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ items: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleFrontText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFrontText(sudoScource, key) { var object = myStore.deletePropertyDeep(frontText, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFrontText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ frontText: object }); } function onChangeStyleSeparator(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSeparator(sudoScource, key) { var object = myStore.deletePropertyDeep(separator, [sudoScource, key, breakPointX]); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSeparator(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ separator: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddFrontText(sudoScource, cssObj) { let obj = Object.assign({}, frontText); obj[sudoScource] = cssObj; setAttributes({ frontText: obj }); var selector = myStore.getElementSelector(sudoScource, frontTextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSeparator(sudoScource, cssObj) { let obj = Object.assign({}, separator); obj[sudoScource] = cssObj; setAttributes({ separator: obj }); var selector = myStore.getElementSelector(sudoScource, separatorSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddTermTitle(sudoScource, cssObj) { let obj = Object.assign({}, termTitle); obj[sudoScource] = cssObj; setAttributes({ termTitle: obj }); var selector = myStore.getElementSelector(sudoScource, termTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostCount(sudoScource, cssObj) { let obj = Object.assign({}, postCount); obj[sudoScource] = cssObj; setAttributes({ postCount: obj }); var selector = myStore.getElementSelector(sudoScource, postCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // function onChangeStyleTermTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleTermTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(termTitle, [sudoScource, key, breakPointX]); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleTermTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ termTitle: object }); } function onChangeStylePostCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostCount(sudoScource, key) { var object = myStore.deletePropertyDeep(postCount, [sudoScource, key, breakPointX]); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postCount: object }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetItems(sudoScources) { let obj = Object.assign({}, items); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ items: obj }); } function onResetSeparator(sudoScources) { let obj = Object.assign({}, separator); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ separator: obj }); } function onResetFrontText(sudoScources) { let obj = Object.assign({}, frontText); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ frontText: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } function onResetTermTitle(sudoScources) { let obj = Object.assign({}, termTitle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ termTitle: obj }); } function onResetPostCount(sudoScources) { let obj = Object.assign({}, postCount); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postCount: obj }); } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); myStore.generateBlockCss(blockCssY.items, blockId); }, [items]); var linkAttrObj = () => { var sdsd = {}; items.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.AlignmentToolbar, { value: wrapper.styles.textAlign, onChange: newVal => { var styles = { ...postfix.styles, textAlign: newVal }; setAttributes({ postfix: { ...postfix, styles: styles } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.class, onChange: newVal => { var options = { ...items.options, class: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Max Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.maxCount, onChange: newVal => { var options = { ...items.options, maxCount: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: items.options.linkTo == undefined || items.options.linkTo.length == 0 ? "Choose" : linkToArgs[items.options.linkTo] == undefined ? "" : linkToArgs[items.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), items.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...items.options, customUrl: "" }; setAttributes({ items: { ...items, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(LinkControl, { settings: [], value: items.options.customUrl, onChange: newVal => { var options = { ...items.options, customUrl: newVal.url }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", items.options.customUrl.length != 0 ? items.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: items.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...items.options, linkTarget: newVal }; setAttributes({ items: { ...items, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.prefix, onChange: newVal => { var options = { ...items.options, prefix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.postfix, onChange: newVal => { var options = { ...items.options, postfix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = items.options.linkAttr.concat({ id: "", val: "" }); var options = { ...items.options, linkAttr: sdsd }; setAttributes({ items: { ...items, options: options } }); linkAttrObj(); } }, "Add")), items.options.linkAttr.length > 0 && items.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: items.options.linkAttr[i].id, onChange: newVal => { items.options.linkAttr[i].id = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Value", className: "mr-2", value: x.val, onChange: newVal => { items.options.linkAttr[i].val = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { items.options.linkAttr.splice(i, 1); var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: items, onChange: onChangeStyleItems, onAdd: onAddStyleItems, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleItems, onReset: onResetItems })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: items, onChange: onPickCssLibraryItems })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", options: iconPositionArgs, buttonTitle: icon.options.position.length == 0 ? "Choose" : iconPositionArgs[icon.options.position].label, onChange: setIconPosition, values: [] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Front Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Front Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: frontText.options.text, onChange: newVal => { var options = { ...frontText.options, text: newVal }; setAttributes({ frontText: { ...frontText, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: frontText, onChange: onChangeStyleFrontText, onAdd: onAddStyleFrontText, onBulkAdd: onBulkAddFrontText, onRemove: onRemoveStyleFrontText, onReset: onResetFrontText })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: frontText, onChange: onPickCssLibraryFrontText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Term Title", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: termTitle, onChange: onChangeStyleTermTitle, onAdd: onAddStyleTermTitle, onBulkAdd: onBulkAddTermTitle, onRemove: onRemoveStyleTermTitle, onReset: onResetTermTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 " // title="Post Count" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Post Count"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postCount, onChange: onChangeStylePostCount, onAdd: onAddStylePostCount, onBulkAdd: onBulkAddPostCount, onRemove: onRemoveStylePostCount, onReset: onResetPostCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.ToggleControl, { label: "Display Post Count", help: items.options.postCount ? "Post Count Enabled" : "Post Count Disabled", checked: items.options.postCount ? true : false, onChange: e => { var options = { ...items.options, postCount: items.options.postCount ? false : true }; setAttributes({ items: { ...items, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Separator", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: separator.options.text, onChange: newVal => { var options = { ...separator.options, text: newVal }; setAttributes({ separator: { ...separator, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: separator, onChange: onChangeStyleSeparator, onAdd: onAddStyleSeparator, onBulkAdd: onBulkAddSeparator, onRemove: onRemoveStyleSeparator, onReset: onResetSeparator })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: separator, onChange: onPickCssLibrarySeparator })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "post-tags", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-tags" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, categories.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, "No Tags Found"), categories.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagWrapper, blockProps, icon.options.position == "beforeFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "frontText " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, frontText.options.text)), icon.options.position == "afterFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), categories.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo != undefined && items.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ title: x.name }, linkAttrItems, { className: items.options.class, href: x.link }), icon.options.position == "beforeItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, x.count), icon.options.position == "afterItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: ev => ev.preventDefault(), target: items.options.linkTarget, title: x.name }, linkAttrItems, { className: items.options.class, href: x.link }), icon.options.position == "beforeItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, "(", x.count, ")"), icon.options.position == "afterItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), categories.length > index + 1 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "separator", dangerouslySetInnerHTML: { __html: separator.options.text } })); }), icon.options.position == "afterItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-taxonomies/index.js": /*!*********************************************!*\ !*** ./src/blocks/post-taxonomies/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-taxonomies/block.json"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_374)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 56.9998H84.7061V66.4115H160V56.9998Z", fill: "url(#paint1_linear_61_374)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 94.8818H85V103.882H131V94.8818Z", fill: "url(#paint2_linear_61_374)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M106.561 76H85V85.41H106.561V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M133.281 76H111.72V85.41H133.281V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 76H138.439V85.41H160V76Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "url(#paint3_linear_61_374)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_374", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_374", x1: "84.7061", y1: "61.7056", x2: "160", y2: "61.7056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_374", x1: "85", y1: "99.3818", x2: "131", y2: "99.3818", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_374", x1: "13", y1: "82", x2: "53", y2: "82", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var items = attributes.items; var separator = attributes.separator; var frontText = attributes.frontText; var icon = attributes.icon; var termTitle = attributes.termTitle; var postCount = attributes.postCount; var blockCssY = attributes.blockCssY; var taxonomies = attributes.taxonomies; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); var utmTracking = attributes.utmTracking; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("isProFeature", true); const [postObjects, setPostObjects] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const CustomTagWrapper = `${wrapper.options.tag}`; // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const itemSelector = blockClass + " .item"; const termTitleSelector = blockClass + " .termTitle"; const separatorSelector = blockClass + " .separator"; const frontTextSelector = blockClass + " .frontText"; const postCountSelector = blockClass + " .postCount"; const iconSelector = blockClass + " .icon"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ postTitle: postTitle }); // setAttributes({ wrapper: wrapper }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/post-grid/v2/post_type_objects", method: "POST", data: { postTypes: [postType] } }).then(res => { setPostObjects(res); }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = items; blockCssObj[termTitleSelector] = termTitle; blockCssObj[separatorSelector] = separator; blockCssObj[frontTextSelector] = frontText; blockCssObj[postCountSelector] = postCount; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var itemX = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: itemX } }); }, [blockId]); var iconPositionArgsBasic = { none: { label: "Choose Position", value: "" }, beforeFronttext: { label: "Before Front text", value: "beforeFronttext" }, afterFronttext: { label: "After Front text", value: "afterFronttext", isPro: true }, beforeItems: { label: "Before Items", value: "beforeItems", isPro: true }, afterItems: { label: "After Items", value: "afterItems", isPro: true }, beforeItem: { label: "Before Each Items", value: "beforeItem", isPro: true }, afterItem: { label: "After Each Items", value: "afterItem", isPro: true } }; let iconPositionArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__.applyFilters)("iconPositionArgs", iconPositionArgsBasic); function setIconPosition(option, index) { var options = { ...icon.options, position: option.value }; setAttributes({ icon: { ...icon, options: options } }); } var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, termUrl: { label: "Term URL", value: "termUrl" }, postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = linkToArgsBasic; function setFieldLinkTo(option, index) { var options = { ...items.options, linkTo: option.value }; setAttributes({ items: { ...items, options: options } }); } var breakPointList = []; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } const [categoryCount, setcategoryCount] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); // Using the hook. const [postCategoriesData, setPostCategoriesData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [categories, setCategories] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [postCategoriesX, setPostCategoriesX] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, taxonomies.options.taxName, postId); var dummyCats = [{ id: 1, count: 1, description: "", link: "#", name: "Category 1", slug: "category-1", taxonomy: "category_tax" }, { id: 2, count: 1, description: "", link: "#", name: "Category 2", slug: "category-2", taxonomy: "category_tax" }, { id: 3, count: 1, description: "", link: "#", name: "Category 3", slug: "category-3", taxonomy: "category_tax" }, { id: 4, count: 1, description: "", link: "#", name: "Category 4", slug: "category-4", taxonomy: "category_tax" }, { id: 5, count: 1, description: "", link: "#", name: "Category 5", slug: "category-5", taxonomy: "category_tax" }, { id: 6, count: 1, description: "", link: "#", name: "Category 6", slug: "category-6", taxonomy: "category_tax" }]; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setPostCategoriesData([]); setCategories([]); setcategoryCount(categories.length - 1); if (postCategoriesX != undefined) { for (x in postCategoriesX) { var catId = postCategoriesX[x]; var assd = x; if (x) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/wp/v2/" + taxonomies.options.taxName + "/" + catId, method: "GET" }).then(res => { setPostCategoriesData(current => [...current, res]); setCategories(current => [...current, res]); }); } } } else { setPostCategoriesData(dummyCats); setCategories(dummyCats); } }, [postCategoriesX]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var asdasd = postCategoriesData.slice(0, items.options.maxCount); setCategories(asdasd); }, [postCategoriesData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var maxCount = items.options.maxCount.length > 0 ? items.options.maxCount : 99; if (postCategoriesX != undefined && postCategoriesX.length > 0) { setcategoryCount(categories.length - 1); var asdasd = postCategoriesData.slice(0, maxCount); setCategories(asdasd); } else { var asdasd = dummyCats.slice(0, maxCount); setCategories(asdasd); } }, [items]); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function setTaxonomy(option, index) { var options = { ...taxonomies.options, taxName: option.id }; setAttributes({ taxonomies: { ...taxonomies, options: options } }); // var attrExist = false; // var data = queryPrams[index]; // var multiple = data.multiple; // var isExist = queryArgs.items.map((item) => { // if (item.id == index) { // return true; // } // }) // var items = queryArgs.items.concat([data]) // setAttributes({ queryArgs: { items: items } }); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var itemsX = attributes.items; var taxonomiesX = attributes.taxonomies; var iconX = attributes.icon; var termTitleX = attributes.termTitle; var separatorX = attributes.separator; var postCountX = attributes.postCount; var frontTextX = attributes.frontText; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (taxonomiesX != undefined) { var taxonomiesY = { ...taxonomiesX, options: taxonomies.options }; setAttributes({ taxonomies: taxonomiesY }); blockCssObj[taxonomiesSelector] = taxonomiesY; } if (frontTextX != undefined) { var frontTextY = { ...frontTextX, options: frontText.options }; setAttributes({ frontText: frontTextY }); blockCssObj[frontTextSelector] = frontTextY; } if (postCountX != undefined) { var postCountY = { ...postCountX, options: postCount.options }; setAttributes({ postCount: postCountY }); blockCssObj[postCountSelector] = postCountY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (termTitleX != undefined) { var termTitleY = { ...termTitleX, options: termTitle.options }; setAttributes({ termTitle: termTitleY }); blockCssObj[termTitleSelector] = termTitleY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemSelector] = itemsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var cssStyle = blockCssRules; setAttributes({ blockCssY: { items: cssStyle } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryItems(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; items[sudoScource] = sudoScourceArgs; }); var itemsX = Object.assign({}, items); setAttributes({ items: itemsX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySeparator(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; separator[sudoScource] = sudoScourceArgs; }); var separatorX = Object.assign({}, separator); setAttributes({ separator: separatorX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryFrontText(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; frontText[sudoScource] = sudoScourceArgs; }); var frontTextX = Object.assign({}, frontText); setAttributes({ frontText: frontTextX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItems(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, items); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItems(sudoScource, key) { var object = myStore.deletePropertyDeep(items, [sudoScource, key, breakPointX]); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItems(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, items); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ items: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleFrontText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFrontText(sudoScource, key) { var object = myStore.deletePropertyDeep(frontText, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFrontText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ frontText: object }); } function onChangeStyleSeparator(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSeparator(sudoScource, key) { var object = myStore.deletePropertyDeep(separator, [sudoScource, key, breakPointX]); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSeparator(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ separator: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddFrontText(sudoScource, cssObj) { let obj = Object.assign({}, frontText); obj[sudoScource] = cssObj; setAttributes({ frontText: obj }); var selector = myStore.getElementSelector(sudoScource, frontTextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSeperator(sudoScource, cssObj) { let obj = Object.assign({}, separator); obj[sudoScource] = cssObj; setAttributes({ separator: obj }); var selector = myStore.getElementSelector(sudoScource, separatorSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddTermTitle(sudoScource, cssObj) { let obj = Object.assign({}, termTitle); obj[sudoScource] = cssObj; setAttributes({ termTitle: obj }); var selector = myStore.getElementSelector(sudoScource, termTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostCount(sudoScource, cssObj) { let obj = Object.assign({}, postCount); obj[sudoScource] = cssObj; setAttributes({ postCount: obj }); var selector = myStore.getElementSelector(sudoScource, postCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // function onChangeStyleTermTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleTermTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(termTitle, [sudoScource, key, breakPointX]); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleTermTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ termTitle: object }); } function onChangeStylePostCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostCount(sudoScource, key) { var object = myStore.deletePropertyDeep(postCount, [sudoScource, key, breakPointX]); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postCount: object }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); myStore.generateBlockCss(blockCssY.items, blockId); }, [items]); var linkAttrObj = () => { var sdsd = {}; items.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3 my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Select Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: postObjects, buttonTitle: "Choose", onChange: setTaxonomy, values: taxonomies.options.taxName })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: taxonomies.options.taxName, onChange: newVal => { var options = { ...taxonomies.options, taxName: newVal }; setAttributes({ taxonomies: { ...taxonomies, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.class, onChange: newVal => { var options = { ...items.options, class: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Max Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.maxCount, onChange: newVal => { var options = { ...items.options, maxCount: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: items.options.linkTo == undefined || items.options.linkTo.length == 0 ? "Choose" : linkToArgs[items.options.linkTo] == undefined ? "" : linkToArgs[items.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), items.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...items.options, customUrl: "" }; setAttributes({ items: { ...items, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(LinkControl, { settings: [], value: items.options.customUrl, onChange: newVal => { var options = { ...items.options, customUrl: newVal.url }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", items.options.customUrl.length != 0 ? items.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: items.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...items.options, linkTarget: newVal }; setAttributes({ items: { ...items, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.prefix, onChange: newVal => { var options = { ...items.options, prefix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: items.options.postfix, onChange: newVal => { var options = { ...items.options, postfix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = items.options.linkAttr.concat({ id: "", val: "" }); var options = { ...items.options, linkAttr: sdsd }; setAttributes({ items: { ...items, options: options } }); linkAttrObj(); } }, "Add")), items.options.linkAttr.length > 0 && items.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: items.options.linkAttr[i].id, onChange: newVal => { items.options.linkAttr[i].id = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { items.options.linkAttr[i].val = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { items.options.linkAttr.splice(i, 1); var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: items, onChange: onChangeStyleItems, onAdd: onAddStyleItems, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleItems })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: items, onChange: onPickCssLibraryItems })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_15__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: iconPositionArgs, buttonTitle: icon.options.position.length == 0 ? "Choose" : iconPositionArgs[icon.options.position].label, onChange: setIconPosition, values: [] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onBulkAdd: onBulkAddIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Front Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Front Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: frontText.options.text, onChange: newVal => { var options = { ...frontText.options, text: newVal }; setAttributes({ frontText: { ...frontText, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: frontText, onChange: onChangeStyleFrontText, onAdd: onAddStyleFrontText, onBulkAdd: onBulkAddFrontText, onRemove: onRemoveStyleFrontText })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: frontText, onChange: onPickCssLibraryFrontText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Term Title", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: termTitle, onChange: onChangeStyleTermTitle, onAdd: onAddStyleTermTitle, onBulkAdd: onBulkAddTermTitle, onRemove: onRemoveStyleTermTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 " // title="Post Count" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Post Count"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postCount, onChange: onChangeStylePostCount, onAdd: onAddStylePostCount, onBulkAdd: onBulkAddPostCount, onRemove: onRemoveStylePostCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.ToggleControl, { label: "Display Post Count", help: items.options.postCount ? "Post Count Enabled" : "Post Count Disabled", checked: items.options.postCount ? true : false, onChange: e => { var options = { ...items.options, postCount: items.options.postCount ? false : true }; setAttributes({ items: { ...items, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Separator", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: separator.options.text, onChange: newVal => { var options = { ...separator.options, text: newVal }; setAttributes({ separator: { ...separator, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: separator, onChange: onChangeStyleSeparator, onAdd: onAddStyleSeparator, onBulkAdd: onBulkAddSeperator, onRemove: onRemoveStyleSeparator })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: separator, onChange: onPickCssLibrarySeparator })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_21__["default"], { blockName: "post-taxonomies", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "post-taxonomies" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, taxonomies.options.taxName.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "bg-slate-300 p-10 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-[400px] mx-auto my-0" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Select Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: postObjects, buttonTitle: "Choose", onChange: setTaxonomy, values: taxonomies.options.taxName })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: taxonomies.options.taxName, onChange: newVal => { var options = { ...taxonomies.options, taxName: newVal }; setAttributes({ taxonomies: { ...taxonomies, options: options } }); } }))))), taxonomies.options.taxName.length > 0 && categories.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, "No Terms Found"), taxonomies.options.taxName.length > 0 && categories.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagWrapper, blockProps, icon.options.position == "beforeFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "frontText inline-block" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, frontText.options.text)), icon.options.position == "afterFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), categories.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo != undefined && items.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ title: x.name }, linkAttrItems, { className: items.options.class }), icon.options.position == "beforeItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, "(", x.count, ")"), icon.options.position == "afterItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: ev => ev.preventDefault(), target: items.options.linkTarget, title: x.name }, linkAttrItems, { className: items.options.class, href: x.link }), icon.options.position == "beforeItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, x.count), icon.options.position == "afterItem" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), categories.length > index + 1 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "separator", dangerouslySetInnerHTML: { __html: separator.options.text } })); }), icon.options.position == "afterItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/post-title/index.js": /*!****************************************!*\ !*** ./src/blocks/post-title/index.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _components_templates__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/templates */ "./src/components/templates/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./block.json */ "./src/blocks/post-title/block.json"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_24___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_24__); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_23__, { title: "Post Title", description: "The post title block showcases the main title or headline of a blog post.", icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_182)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 66.1177H84.7061V75.5294H160V66.1177Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141.177 84.9412H84.7061V94.3529H141.177V84.9412Z", fill: "url(#paint1_linear_61_182)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "url(#paint2_linear_61_182)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_182", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_182", x1: "84.7061", y1: "89.647", x2: "141.177", y2: "89.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_182", x1: "13", y1: "82", x2: "53", y2: "82", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/post-title"], transform: attributes => { return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/post-title", { wrapper: { options: { tag: "h" + attributes.level, class: "pg-post-title" }, styles: { display: { Desktop: "block" } } }, abTest: [], postTitle: { options: { tag: "", limitBy: "", limitCount: 99, isLink: true, linkTo: "postUrl", linkToAuthorMeta: "", linkToCustomMeta: "", linkTarget: attributes.linkTarget, linkAttr: attributes.rel.length > 0 ? [{ id: "rel", val: attributes.rel }] : [], customUrl: "", class: "" }, styles: { color: { Desktop: "#000000" }, fontSize: { Desktop: "30px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "700" }, lineHeight: { Desktop: "155%" } } }, prefix: { options: { text: "", class: "prefix", position: "beforebegin " }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 10px 0px 0px" } } }, postfix: { options: { text: "", class: "postfix", position: "afterend" }, styles: { color: { Desktop: "#000000 !important" }, fontSize: { Desktop: "18px" }, fontFamily: { Desktop: "Poppins" }, fontStyle: { Desktop: "normal" }, fontWeight: { Desktop: "400" }, margin: { Desktop: "0px 0px 0px 10px" } } } }); } }], to: [{ type: "block", blocks: ["core/post-title"], transform: attributes => { var content = attributes.wrapper.options; var postTitle = attributes.postTitle.options; var numb = content.tag.match(/\d/g); if (numb !== null) { numb = numb.join(""); } function checkIDExists(idToCheck) { return postTitle.linkAttr.some(item => item.id === idToCheck); } const relExists = checkIDExists("rel"); var value = ""; if (relExists) { value = postTitle.linkAttr.find(obj => obj.id === "rel"); } return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/post-title", { level: content.tag === ("div" || 0 || 0) ? 2 : numb, linkTarget: postTitle.linkTarget, rel: relExists ? value.val : null, isLink: postTitle.linkTo ? true : false }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let postTitle = attributes.postTitle; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var prefix = attributes.prefix; var postfix = attributes.postfix; var abTest = attributes.abTest; var utmTracking = attributes.utmTracking; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("isProFeature", true); const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const { deviceType } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => { const { __experimentalGetPreviewDeviceType } = select("core/edit-post"); return { deviceType: __experimentalGetPreviewDeviceType() }; }, []); var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("linkToArgs", linkToArgsBasic); var limitByArgsBasic = { none: { label: "Choose..", value: "" }, word: { label: "Word", value: "word" }, character: { label: "Character", value: "character", isPro: true } }; let limitByArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("limitByArgs", limitByArgsBasic); const [currentPostTitle, setCurrentPostTitle] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "title", postId); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => {}, [wrapper]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[postTitleSelector] = postTitle; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"]); setpostfixText(text); }, [postfix.options.text]); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var postTitleSelector = ""; if (wrapper.options.tag.length != 0) { if (postTitle.options.isLink) { postTitleSelector = blockClass + " a"; } else { postTitleSelector = blockClass; } } else { postTitleSelector = blockClass; } function setFieldLinkTo(option, index) { var options = { ...postTitle.options, linkTo: option.value }; setAttributes({ postTitle: { ...postTitle, options: options } }); } function setLimitBy(option, index) { var options = { ...postTitle.options, limitBy: option.value }; setAttributes({ postTitle: { ...postTitle, options: options } }); } const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const [postTitleEdited, setpostTitleEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(currentPostTitle); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var count = postTitle.options.limitCount > 0 ? postTitle.options.limitCount : 999; var currentPostTitleX = currentPostTitle != undefined && currentPostTitle.length == 0 ? currentPostTitle : "What is Lorem Ipsum?"; if (postTitle.options.limitBy == "character") { setpostTitleEdited(currentPostTitleX.substring(0, count)); } else { setpostTitleEdited(currentPostTitleX.split(" ").splice(0, count).join(" ")); } }, [postTitle]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var count = postTitle.options.limitCount > 0 ? postTitle.options.limitCount : 0; var currentPostTitleX = currentPostTitle != undefined && currentPostTitle.length > 0 ? currentPostTitle : "What is Lorem Ipsum?"; if (postTitle.options.limitBy == "character") { setpostTitleEdited(currentPostTitleX.substring(0, count)); } else { setpostTitleEdited(currentPostTitleX.split(" ").splice(0, count).join(" ")); } }, [currentPostTitle]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } // if (action == "applyStyle") { // // var wrapper = attributes.wrapper; // var postTitle = attributes.postTitle; // var prefix = attributes.prefix; // var postfix = attributes.postfix; // var blockCssY = attributes.blockCssY; // setAttributes({ wrapper: wrapper }); // setAttributes({ postTitle: postTitle }); // setAttributes({ prefix: prefix }); // // setAttributes({ postfix: postfix }); // setAttributes({ blockCssY: blockCssY }); // } if (action == "applyStyle") { // var blockId = attributes.blockId var wrapperX = attributes.wrapper; var postTitleX = attributes.postTitle; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postTitleX != undefined) { var postTitleY = { ...postTitleX, options: postTitle.options }; setAttributes({ postTitle: postTitleY }); blockCssObj[postTitleSelector] = postTitleY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostTitle(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postTitle[sudoScource] = sudoScourceArgs; }); var postTitleX = Object.assign({}, postTitle); setAttributes({ postTitle: postTitleX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postTitleSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onChangeStylePostTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, postTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(postTitle, [sudoScource, key, breakPointX]); setAttributes({ postTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, postTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postTitle: object }); } function onResetPostTitle(sudoScources) { let obj = Object.assign({}, postTitle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postTitleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postTitle: obj }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostTitle(sudoScource, cssObj) { let obj = Object.assign({}, postTitle); obj[sudoScource] = cssObj; setAttributes({ postTitle: obj }); var selector = myStore.getElementSelector(sudoScource, postTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [postTitle]); var linkAttrObj = () => { var sdsd = {}; postTitle.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = postTitle.options.customUrl != undefined && postTitle.options.customUrl.length > 0 ? postTitle.options.customUrl : currentPostUrl; const CustomTagWrapper = `${wrapper.options.tag}`; const CustomTagPostTitle = postTitle.options.tag.length != 0 ? `${postTitle.options.tag}` : "div"; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); function addMedia(option, index) { //var isExist = items.elements.find(x => x.label === option.label); if (!isProFeature) { var abTestX = [...abTest]; abTestX.push({ content: "" }); setAttributes({ abTest: abTestX }); } } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.InspectorControls, { className: " pg-setting-input-text " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"], label: "CSS Class", className: "pg-setting-input-textarea", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-select" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Post Title", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-textarea" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"], label: "CSS Class", placeholder: "Add Class", value: postTitle.options.class, onChange: newVal => { var options = { ...postTitle.options, class: newVal }; setAttributes({ postTitle: { styles: postTitle.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Linked?", help: postTitle.options.isLink ? "Linked to URL" : "Not linked to URL.", checked: postTitle.options.isLink ? true : false, onChange: e => { var options = { ...postTitle.options, isLink: postTitle.options.isLink ? false : true }; setAttributes({ postTitle: { ...postTitle, options: options } }); } }), !postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: postTitle.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...postTitle.options, tag: newVal }; setAttributes({ postTitle: { ...postTitle, options: options } }); } })), postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right" // variant="secondary" , options: linkToArgs, buttonTitle: postTitle.options.linkTo == undefined ? "Choose" : linkToArgs[postTitle.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), postTitle.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: postTitle.options.linkToAuthorMeta, onChange: newVal => { var options = { ...postTitle.options, linkToAuthorMeta: newVal }; setAttributes({ postTitle: { ...postTitle, options: options } }); } })), postTitle.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: postTitle.options.linkToAuthorMeta, onChange: newVal => { var options = { ...postTitle.options, linkToAuthorMeta: newVal }; setAttributes({ postTitle: { ...postTitle, options: options } }); } })), postTitle.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), postTitle.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], onClick: ev => { var options = { ...postTitle.options, customUrl: "" }; setAttributes({ postTitle: { ...postTitle, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_9__.__experimentalLinkControl, { settings: [], value: postTitle.options.customUrl, onChange: newVal => { var options = { ...postTitle.options, customUrl: newVal.url }; setAttributes({ postTitle: { ...postTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", postTitle.options.customUrl.length != 0 ? postTitle.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-select" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: postTitle.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...postTitle.options, linkTarget: newVal }; setAttributes({ text: { ...text, options: options } }); } }))), postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = postTitle.options.linkAttr.concat({ id: "", val: "" }); var options = { ...postTitle.options, linkAttr: sdsd }; setAttributes({ postTitle: { ...postTitle, options: options } }); linkAttrObj(); } }, "Add")), postTitle.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: postTitle.options.linkAttr[i].id, onChange: newVal => { postTitle.options.linkAttr[i].id = newVal; var ssdsd = postTitle.options.linkAttr.concat([]); var options = { ...postTitle.options, linkAttr: ssdsd }; setAttributes({ postTitle: { ...postTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Value", className: "mr-2", value: x.val, onChange: newVal => { postTitle.options.linkAttr[i].val = newVal; var ssdsd = postTitle.options.linkAttr.concat([]); var options = { ...postTitle.options, linkAttr: ssdsd }; setAttributes({ postTitle: { ...postTitle, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { postTitle.options.linkAttr.splice(i, 1); var ssdsd = postTitle.options.linkAttr.concat([]); var options = { ...postTitle.options, linkAttr: ssdsd }; setAttributes({ postTitle: { ...postTitle, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Limit By"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", btnClass: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // variant="secondary" , options: limitByArgs, buttonTitle: "Choose", onChange: setLimitBy, values: [] })), postTitle.options.limitBy.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "bg-gray-500 my-3 text-white p-2" }, limitByArgs[postTitle.options.limitBy].label), (postTitle.options.limitBy == "word" || postTitle.options.limitBy == "character") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Limit Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: postTitle.options.limitCount, onChange: newVal => { var options = { ...postTitle.options, limitCount: newVal }; setAttributes({ postTitle: { ...postTitle, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postTitle, onChange: onChangeStylePostTitle, onAdd: onAddStylePostTitle, onRemove: onRemoveStylePostTitle, onBulkAdd: onBulkAddPostTitle, onReset: onResetPostTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postTitle, onChange: onPickCssLibraryPostTitle })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false, disabled: "true" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-textarea" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-select" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: prefix.options.position, options: [{ label: "None", value: "none" }, { label: "Before Post Title", value: "beforebegin" }, { label: "Start of Post Title", value: "afterbegin" }], onChange: newVal => { var options = { ...prefix.options, position: newVal }; setAttributes({ prefix: { ...prefix, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-textarea" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_11__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pg-setting-select" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: postfix.options.position, options: [{ label: "None", value: "none" }, { label: "After Post Title", value: "afterend" }, { label: "End of Post Title", value: "beforeend" }], onChange: newVal => { var options = { ...postfix.options, position: newVal }; setAttributes({ postfix: { ...postfix, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "A/B Test"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ` ${isVisible ? "pb-6" : ""} transition-all duration-200 w-full flex justify-between items-center relative` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "A/B Test Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("button", { onClick: ev => { addMedia(); if (isProFeature) { setIsVisible(!isVisible); } }, className: "pg-font flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" }, "Add"), isProFeature && isVisible && // <div className="absolute bottom-2 right-0 pg-bg-color text-white no-underline px-2 rounded-sm py-1 "> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { href: "https://getpostgrid.com/pricing/", target: "_blank", className: "absolute bottom-2 right-0 pg-bg-color text-white hover:text-white no-underline px-2 rounded-sm py-1 " }, "Subscribe to use") // </div> )), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_24__.ReactSortable, { list: abTest, handle: ".handle", setList: item => { // var nthItemStyleX = [...nthItemStyle]; // setAttributes({ nthItemStyle: { ...nthItemStyle, nthItemStyle: item } }); } }, abTest.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var abTestX = [...abTest]; abTestX.splice(index, 1); setAttributes({ abTest: abTestX }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_33__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-2" }, abTest[index].content.length > 0 ? abTest[index].content : index + 1)), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Title - ", index + 1), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: item.content, onChange: newVal => { var abTestX = [...abTest]; abTestX[index].content = newVal; setAttributes({ abTest: abTestX }); } }))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_20__["default"], { blockName: "post-title", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "post-title" })))), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagWrapper, blockProps, postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, prefix.options.position == "beforebegin" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: handleLinkClick }, linkAttrItems, { href: postUrl, className: postTitle.options.class, target: postTitle.options.linkTarget }), prefix.options.position == "afterbegin" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), postTitleEdited, postfix.options.position == "beforeend" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), postfix.options.position == "afterend" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), !postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postTitle.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, prefix.options.position != "none" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), postTitleEdited, postfix.options.position != "none" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), postTitle.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, prefix.options.position == "beforebegin" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagPostTitle, null, prefix.options.position == "afterbegin" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), postTitleEdited, postfix.options.position == "beforeend" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), postfix.options.position == "afterend" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)))), wrapper.options.tag.length == 0 && postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, prefix.options.position == "beforebegin" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: handleLinkClick // {...blockProps} // className="p" }, linkAttrItems, { href: postUrl, target: postTitle.options.linkTarget }), prefix.options.position == "afterbegin" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), postTitleEdited, postfix.options.position == "beforeend" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), postfix.options.position == "afterend" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), wrapper.options.tag.length == 0 && !postTitle.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, postTitle.options.tag.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagPostTitle, blockProps, prefix.options.position != "none" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), postTitleEdited, postfix.options.position != "none" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)), postTitle.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTagPostTitle, blockProps, prefix.options.position != "none" && prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), postTitleEdited, postfix.options.position != "none" && postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/progress-bar/index.js": /*!******************************************!*\ !*** ./src/blocks/progress-bar/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./variations */ "./src/blocks/progress-bar/variations.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/progress-bar/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.996 25H-0.00439453V50.7778H159.996V25Z", fill: "url(#paint0_linear_61_608)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M10.6617 29.8887H88.4394C89.7728 29.8887 90.6617 30.7776 90.6617 32.1109V43.222C90.6617 44.5553 89.7728 45.4442 88.4394 45.4442H10.6617C9.32834 45.4442 8.43945 44.5553 8.43945 43.222V32.1109C8.43945 30.7776 9.32834 29.8887 10.6617 29.8887Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.996 67.6665H-0.00439453V93.4443H159.996V67.6665Z", fill: "url(#paint1_linear_61_608)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M10.6617 72.5557H132.884C134.217 72.5557 135.106 73.4446 135.106 74.7779V85.889C135.106 87.2223 134.217 88.1112 132.884 88.1112H10.6617C9.32834 88.1112 8.43945 87.2223 8.43945 85.889V74.7779C8.43945 73.889 9.32834 72.5557 10.6617 72.5557Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M159.996 110.333H-0.00439453V136.111H159.996V110.333Z", fill: "url(#paint2_linear_61_608)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M10.6617 115.667H150.217C151.551 115.667 152.439 116.555 152.439 117.889V129C152.439 130.333 151.551 131.222 150.217 131.222H10.6617C9.32834 131.222 8.43945 130.333 8.43945 129V117.889C8.43945 116.555 9.32834 115.667 10.6617 115.667Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_608", x1: "-0.00439453", y1: "37.8889", x2: "159.996", y2: "37.8889", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_608", x1: "-0.00439453", y1: "80.5554", x2: "159.996", y2: "80.5554", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_608", x1: "-0.00439453", y1: "123.222", x2: "159.996", y2: "123.222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; let progressBar = attributes.progressBar; var progressLabel = attributes.progressLabel; var progressCount = attributes.progressCount; var progressFill = attributes.progressFill; var progressData = attributes.progressData; var progressInfo = attributes.progressInfo; var circleOverlay = attributes.circleOverlay; var circleMask = attributes.circleMask; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var progressBarSelector = blockClass + " .progress-bar"; var progressFillSelector = blockClass + " .progress-fill"; var progressCountSelector = blockClass + " .progress-count"; var progressLabelSelector = blockClass + " .progress-label"; const iconSelector = blockClass + " .progress-icon"; const circleOverlaySelector = blockClass + " .progress-circle-overlay"; const circleMaskSelector = blockClass + " .progress-circle-mask"; var progressInfoSelector = blockClass + " .progress-info"; // useEffect(() => { // var start = parseInt(progressData.options.start) // var end = parseInt(progressData.options.end) // var duration = parseInt(progressData.options.duration) // }, [progressData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ progressBar: progressBar }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[progressBarSelector] = progressBar; blockCssObj[progressFillSelector] = progressFill; blockCssObj[progressCountSelector] = progressCount; blockCssObj[progressLabelSelector] = progressLabel; blockCssObj[iconSelector] = icon; blockCssObj[circleOverlaySelector] = circleOverlay; blockCssObj[circleMaskSelector] = circleMask; blockCssObj[progressInfoSelector] = progressInfo; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var progressDataX = attributes.progressData; var progressInfoX = attributes.progressInfo; var progressBarX = attributes.progressBar; var progressFillX = attributes.progressFill; var progressCountX = attributes.progressCount; var circleOverlayX = attributes.circleOverlay; var circleMaskX = attributes.circleMask; var progressLabelX = attributes.progressLabel; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (progressLabelX != undefined) { var progressLabelY = { ...progressLabelX, options: progressLabel.options }; setAttributes({ progressLabel: progressLabelY }); blockCssObj[progressLabelSelector] = progressLabelY; } if (circleMaskX != undefined) { var circleMaskY = { ...circleMaskX, options: circleMask.options }; setAttributes({ circleMask: circleMaskY }); blockCssObj[circleMaskSelector] = circleMaskY; } if (circleOverlayX != undefined) { var circleOverlayY = { ...circleOverlayX, options: circleOverlay.options }; setAttributes({ circleOverlay: circleOverlayY }); blockCssObj[circleOverlaySelector] = circleOverlayY; } if (progressCountX != undefined) { var progressCountY = { ...progressCountX, options: progressCount.options }; setAttributes({ progressCount: progressCountY }); blockCssObj[progressCountSelector] = progressCountY; } if (progressFillX != undefined) { var progressFillY = { ...progressFillX, options: progressFill.options }; setAttributes({ progressFill: progressFillY }); blockCssObj[progressFillSelector] = progressFillY; } if (progressBarX != undefined) { var progressBarY = { ...progressBarX, options: progressBar.options }; setAttributes({ progressBar: progressBarY }); blockCssObj[progressBarSelector] = progressBarY; } if (progressInfoX != undefined) { var progressInfoY = { ...progressInfoX, options: progressInfo.options }; setAttributes({ progressInfo: progressInfoY }); blockCssObj[progressInfoSelector] = progressInfoY; } // if (progressDataX != undefined) { // var progressDataY = { // ...progressDataX, // options: progressData.options, // }; // setAttributes({ progressData: progressDataY }); // blockCssObj[progressDataSelector] = progressDataY; // } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleProgressCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, progressCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ progressCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleProgressCount(sudoScource, key) { var object = myStore.deletePropertyDeep(progressCount, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleProgressCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, progressCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ progressCount: object }); } function onChangeStyleProgressLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, progressLabel); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ progressLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressLabelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleProgressLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(progressLabel, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressLabelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleProgressLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, progressLabel); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ progressLabel: object }); } function onChangeStyleProgressBar(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, progressBar); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ progressBar: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressBarSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleProgressBar(sudoScource, key) { var object = myStore.deletePropertyDeep(progressBar, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressBarSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleProgressBar(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, progressBar); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ progressBar: object }); } function onChangeStyleProgressFill(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, progressFill); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ progressFill: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressFillSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleProgressFill(sudoScource, key) { var object = myStore.deletePropertyDeep(progressFill, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressFillSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleProgressFill(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, progressFill); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ progressFill: object }); } function onChangeStyleCircleOverlay(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, circleOverlay); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ circleOverlay: object }); var elementSelector = myStore.getElementSelector(sudoScource, circleOverlaySelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCircleOverlay(sudoScource, key) { var object = myStore.deletePropertyDeep(circleOverlay, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, circleOverlaySelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCircleOverlay(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, circleOverlay); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ circleOverlay: object }); } function onChangeStyleCircleMask(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, circleMask); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ circleMask: object }); var elementSelector = myStore.getElementSelector(sudoScource, circleMaskSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCircleMask(sudoScource, key) { var object = myStore.deletePropertyDeep(circleMask, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, circleMaskSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCircleMask(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, circleMask); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ circleMask: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleProgressInfo(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, progressInfo); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ progressInfo: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressInfoSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleProgressInfo(sudoScource, key) { var object = myStore.deletePropertyDeep(progressInfo, [sudoScource, key, breakPointX]); setAttributes({ progressInfo: object }); var elementSelector = myStore.getElementSelector(sudoScource, progressInfoSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleProgressInfo(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, progressInfo); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ progressInfo: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddProgressLabel(sudoScource, cssObj) { let obj = Object.assign({}, progressLabel); obj[sudoScource] = cssObj; setAttributes({ progressLabel: obj }); var selector = myStore.getElementSelector(sudoScource, progressLabelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddProgressCount(sudoScource, cssObj) { let obj = Object.assign({}, progressCount); obj[sudoScource] = cssObj; setAttributes({ progressCount: obj }); var selector = myStore.getElementSelector(sudoScource, progressCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddProgressBar(sudoScource, cssObj) { let obj = Object.assign({}, progressBar); obj[sudoScource] = cssObj; setAttributes({ progressBar: obj }); var selector = myStore.getElementSelector(sudoScource, progressBarSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddProgressFill(sudoScource, cssObj) { let obj = Object.assign({}, progressFill); obj[sudoScource] = cssObj; setAttributes({ progressFill: obj }); var selector = myStore.getElementSelector(sudoScource, progressFillSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCircleOverlay(sudoScource, cssObj) { let obj = Object.assign({}, circleOverlay); obj[sudoScource] = cssObj; setAttributes({ circleOverlay: obj }); var selector = myStore.getElementSelector(sudoScource, circleOverlaySelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCircleMask(sudoScource, cssObj) { let obj = Object.assign({}, circleMask); obj[sudoScource] = cssObj; setAttributes({ circleMask: obj }); var selector = myStore.getElementSelector(sudoScource, circleMaskSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddProgressInfo(sudoScource, cssObj) { let obj = Object.assign({}, progressInfo); obj[sudoScource] = cssObj; setAttributes({ progressInfo: obj }); var selector = myStore.getElementSelector(sudoScource, progressInfoSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); // useEffect(() => {}, [progressBar]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: progressData.type, options: [{ label: "Choose Type", value: "" }, { label: "Vertical", value: "vertical" }, { label: "Horizontal", value: "horizontal" } // { label: 'Circular Border', value: 'circleBorder' }, // { label: 'Circular Fill', value: 'circleFill' }, // { label: 'Semi Circular', value: 'circleBorderSemi' }, ], onChange: newVal => { setAttributes({ progressData: { ...progressData, type: newVal } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Fill?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { type: "number", className: "mr-2", value: progressData.fill, onChange: newVal => { setAttributes({ progressData: { ...progressData, fill: newVal } }); //var styles = { ...progressFill.styles, width: { Desktop: newVal + '%' } }; //setAttributes({ progressFill: { ...progressFill, styles: styles } }); onChangeStyleProgressFill("styles", newVal + "%", "width"); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Animate On"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: progressData.animate == undefined ? "" : progressData.animate, options: [{ label: "No Animation", value: "" }, { label: "onVisible", value: "onVisible" }, { label: "onLoad", value: "onLoad" }], onChange: newVal => { // var options = { ...progressData.options, animate: newVal }; setAttributes({ progressData: { ...progressData, animate: newVal } }); } })), progressData.animate != undefined && progressData.animate.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Duration?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { type: "number", className: "mr-2", placeholder: "In second", value: progressData.animateDuration, onChange: newVal => { setAttributes({ progressData: { ...progressData, animateDuration: newVal } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Progress Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Text?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { type: "text", className: "mr-2", value: progressLabel.options.text, onChange: newVal => { var options = { ...progressLabel.options, text: newVal }; setAttributes({ progressLabel: { ...progressLabel, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: progressLabel.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Bar", value: "beforeBar" }, { label: "Before Fill", value: "beforeFill" }, { label: "After Fill", value: "afterFill" }, { label: "Inside Fill", value: "insideFill" }, { label: "After Bar", value: "afterBar" }], onChange: newVal => { var options = { ...progressLabel.options, position: newVal }; setAttributes({ progressLabel: { ...progressLabel, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: progressLabel, onChange: onChangeStyleProgressLabel, onAdd: onAddStyleProgressLabel, onRemove: onRemoveStyleProgressLabel, onBulkAdd: onBulkAddProgressLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Progress Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Counter Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: progressCount.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Bar", value: "beforeBar" }, { label: "Before Fill", value: "beforeFill" }, { label: "Inside Fill", value: "insideFill" }, { label: "After Fill", value: "afterFill" }, { label: "After Bar", value: "afterBar" }, { label: "Before Label", value: "beforeLabel" }, { label: "After Label", value: "afterLabel" }], onChange: newVal => { var options = { ...progressCount.options, position: newVal }; setAttributes({ progressCount: { ...progressCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { type: "text", className: "mr-2", value: progressCount.options.prefix, onChange: newVal => { var options = { ...progressCount.options, prefix: newVal }; setAttributes({ progressCount: { ...progressCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { type: "text", className: "mr-2", value: progressCount.options.postfix, onChange: newVal => { var options = { ...progressCount.options, postfix: newVal }; setAttributes({ progressCount: { ...progressCount, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: progressCount, onChange: onChangeStyleProgressCount, onAdd: onAddStyleProgressCount, onRemove: onRemoveStyleProgressCount, onBulkAdd: onBulkAddProgressCount })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Progress Bar", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: progressBar, onChange: onChangeStyleProgressBar, onAdd: onAddStyleProgressBar, onRemove: onRemoveStyleProgressBar, onBulkAdd: onBulkAddProgressBar })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Progress Fill", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: progressFill, onChange: onChangeStyleProgressFill, onAdd: onAddStyleProgressFill, onRemove: onRemoveStyleProgressFill, onBulkAdd: onBulkAddProgressFill })))), progressData.type == "circleBorder" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Circle Overlay", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: circleOverlay, onChange: onChangeStyleCircleOverlay, onAdd: onAddStyleCircleOverlay, onRemove: onRemoveStyleCircleOverlay, onBulkAdd: onBulkAddCircleOverlay })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Circle Mask", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: circleMask, onChange: onChangeStyleCircleMask, onAdd: onAddStyleCircleMask, onRemove: onRemoveStyleCircleMask, onBulkAdd: onBulkAddCircleMask }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Progress Info", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Info Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: progressInfo.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Bar", value: "beforeBar" }, { label: "After Bar", value: "afterBar" }], onChange: newVal => { var options = { ...progressInfo.options, position: newVal }; setAttributes({ progressInfo: { ...progressInfo, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: progressInfo, onChange: onChangeStyleProgressInfo, onAdd: onAddStyleProgressInfo, onRemove: onRemoveStyleProgressInfo, onBulkAdd: onBulkAddProgressInfo })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_17__["default"], { blockName: "progress-bar", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "progress-bar" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, !progressData.type && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, createBlocksFromInnerBlocksTemplate([["post-grid/text", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_26__["default"], { blockName: "progress-bar", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), progressData.type == "horizontal" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, progressInfo.options.position == "beforeBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), progressLabel.options.position == "beforeBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "beforeBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-bar" }, progressLabel.options.position == "beforeFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "beforeFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-fill" }, progressLabel.options.position == "insideFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "insideFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), progressLabel.options.position == "afterFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), progressInfo.options.position == "afterBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), progressCount.options.position == "afterBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), progressLabel.options.position == "afterBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text)), progressData.type == "vertical" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, progressInfo.options.position == "beforeBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-bar" }, progressLabel.options.position == "beforeFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "beforeFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-fill" }, progressLabel.options.position == "insideFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "insideFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), progressLabel.options.position == "afterFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), progressInfo.options.position == "afterBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix))), progressData.type == "circleBorder" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, progressInfo.options.position == "beforeBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "circle-wrap progress-bar" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mask full progress-circle-mask" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fill progress-fill" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mask half progress-circle-mask" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fill progress-fill" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "inside-circle progress-circle-overlay" }, " ")), progressInfo.options.position == "afterBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, progressInfo.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressCount.options.prefix, progressData.fill, progressCount.options.postfix))), progressData.type == "circleFill" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, progressInfo.options.position == "beforeBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, progressInfo.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressData.fill), icon.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressData.fill), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressData.fill)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "circle-wrap progress-bar" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mask full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fill progress-fill" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "mask half" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "fill progress-fill" }))), progressInfo.options.position == "afterBar" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-info" }, progressInfo.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressData.fill), icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), progressCount.options.position == "beforeLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressData.fill), progressLabel.options.position.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-label" }, progressLabel.options.text), progressCount.options.position == "afterLabel" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "progress-count" }, progressData.fill))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/progress-bar/variations.js": /*!***********************************************!*\ !*** ./src/blocks/progress-bar/variations.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /** * WordPress dependencies */ let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "layout-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-1"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "space-between" }, padding: { Desktop: "10px 0px 10px 0px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, backgroundColor: { Desktop: "#9DD6DF" }, height: { Desktop: "50px" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, backgroundColor: { Desktop: "#18978F" }, height: { Desktop: "50px" }, width: { Desktop: "40%" } } }, progressCount: { options: { position: "afterLabel", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.83a5.27,5.27,0,0,1,.74,0,1.54,1.54,0,0,1,1.09.33,1.26,1.26,0,0,1,.38,1,1.44,1.44,0,0,1-.39,1.05,1.67,1.67,0,0,1-1.19.39c-.25,0-.46,0-.63,0Zm.35,2.39.35,0A1,1,0,0,0,7.61,7.09a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,6a.21.21,0,0,1-.22.22A.21.21,0,0,1,8.38,6a.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,6ZM8.42,8.49V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.56c0,.14,0,.29,0,.53V8.21a1.12,1.12,0,0,1-.28.89,1.05,1.05,0,0,1-.7.23,1.3,1.3,0,0,1-.65-.16l.09-.27a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.67V8.16h0a.67.67,0,0,1-.61.33.87.87,0,0,1-.82-1,.93.93,0,0,1,.87-1,.64.64,0,0,1,.6.34h0V6.56Zm-.36.76a.78.78,0,0,0,0-.16.52.52,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.7.57.7a.52.52,0,0,0,.49-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,6a.21.21,0,0,1-.22.22A.22.22,0,0,1,11.52,6a.22.22,0,0,1,.22-.22A.21.21,0,0,1,12,6Zm-.39,2.48V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,6v.56h.5v.27h-.5v1c0,.24.07.37.26.37l.21,0v.27a1.17,1.17,0,0,1-.31,0,.48.48,0,0,1-.38-.15.7.7,0,0,1-.14-.5v-1h-.3V6.56h.3V6.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.49l0-.24h0a.74.74,0,0,1-.59.29A.55.55,0,0,1,13.68,8c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15l-.09-.23a1.2,1.2,0,0,1,.64-.18c.59,0,.74.41.74.8V8a2.17,2.17,0,0,0,0,.46Zm-.05-1c-.39,0-.82.06-.82.43a.31.31,0,0,0,.33.34A.49.49,0,0,0,14.83,8a.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.65h.35V8.49h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.31c0-.38,0-.83,0-1.16h0c-.09.31-.21.65-.34,1L19,8.48H18.7l-.44-1.29c-.13-.38-.23-.72-.31-1h0c0,.33,0,.78-.05,1.19l-.07,1.15h-.33l.19-2.69h.44l.46,1.3c.11.33.2.63.27.91h0c.07-.27.17-.57.29-.91l.48-1.3h.44l.17,2.69H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.49l0-.24h0a.74.74,0,0,1-.59.29A.55.55,0,0,1,20.64,8c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45,1,1,0,0,0-.51.15l-.08-.23a1.2,1.2,0,0,1,.64-.18c.59,0,.74.41.74.8V8a2.17,2.17,0,0,0,0,.46Zm-.05-1c-.39,0-.82.06-.82.43a.31.31,0,0,0,.33.34A.49.49,0,0,0,21.79,8a.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.71,7.16c0-.23,0-.42,0-.6H23v.38h0a.59.59,0,0,1,.54-.43l.1,0v.33h-.12a.49.49,0,0,0-.47.45.78.78,0,0,0,0,.16v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.44h0l.18-.21.56-.67h.43l-.75.79.85,1.14h-.43l-.66-.92-.18.2v.72H24V5.65h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.59a.62.62,0,0,0,.66.67,1.2,1.2,0,0,0,.54-.1l.06.25a1.5,1.5,0,0,1-.64.12.9.9,0,0,1-1-1,1,1,0,0,1,.91-1,.83.83,0,0,1,.8.92c0,.07,0,.12,0,.16Zm1-.25a.49.49,0,0,0-.49-.57.58.58,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,6v.56h.51v.27h-.51v1c0,.24.07.37.27.37l.2,0,0,.27a1.19,1.19,0,0,1-.32,0,.49.49,0,0,1-.38-.15.7.7,0,0,1-.13-.5v-1h-.3V6.56H28V6.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,6a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,6Zm-.39,2.48V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7.08c0-.2,0-.36,0-.52h.31l0,.32h0a.71.71,0,0,1,.64-.37c.27,0,.69.16.69.83V8.49h-.36V7.38c0-.31-.11-.57-.44-.57a.5.5,0,0,0-.48.36.7.7,0,0,0,0,.16V8.49h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.56c0,.14,0,.29,0,.53V8.21a1.12,1.12,0,0,1-.28.89,1,1,0,0,1-.7.23,1.26,1.26,0,0,1-.64-.16l.08-.27a1.11,1.11,0,0,0,.57.15.59.59,0,0,0,.63-.67V8.16h0a.7.7,0,0,1-.62.33.87.87,0,0,1-.82-1,.94.94,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.29Zm-.37.76a.41.41,0,0,0,0-.16.5.5,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.7.58.7a.51.51,0,0,0,.48-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M63.53,8.49V7.78H62.32V7.55l1.16-1.66h.38V7.51h.37v.27h-.37v.71Zm0-1V6.64c0-.13,0-.27,0-.41h0c-.08.16-.14.27-.21.39l-.64.88h.85Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M66.05,6.19h-1l-.1.67.21,0a1.16,1.16,0,0,1,.56.14.75.75,0,0,1,.37.67.9.9,0,0,1-1,.89,1.31,1.31,0,0,1-.65-.16l.09-.27a1.23,1.23,0,0,0,.56.14.57.57,0,0,0,.61-.56c0-.34-.22-.58-.74-.58a2.87,2.87,0,0,0-.36,0l.16-1.25h1.25Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M67.72,6.63c0,.54-.29.81-.62.81s-.61-.25-.61-.78.28-.81.63-.81S67.72,6.13,67.72,6.63Zm-1,0c0,.33.11.58.33.58s.34-.24.34-.59-.09-.58-.34-.58S66.77,6.32,66.77,6.65Zm.3,1.89L68.6,5.85h.22L67.3,8.54Zm2.34-.84c0,.55-.29.82-.62.82s-.6-.26-.61-.78.29-.81.63-.81S69.41,7.21,69.41,7.7Zm-1,0c0,.33.12.58.34.58s.34-.25.34-.59-.1-.58-.34-.58S68.46,7.4,68.46,7.73Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "10.86", width: "22.15", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "27.62", y: "10.86", width: "41.92", height: "4" })) }, { name: "layout-2", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-2"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-2"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "space-between" }, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "70%" } } }, progressCount: { options: { position: "afterLabel", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, progressLabel: { options: { tag: "div", text: "Digital Marketing", position: "", class: "" }, styles: { color: {}, fontSize: {}, order: { Desktop: "10" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M41,5.83a5.27,5.27,0,0,1,.74,0,1.53,1.53,0,0,1,1.09.33,1.26,1.26,0,0,1,.38,1,1.4,1.4,0,0,1-.39,1.05,1.65,1.65,0,0,1-1.19.39,5.41,5.41,0,0,1-.63,0Zm.35,2.39.35,0a1,1,0,0,0,1.15-1.15,1,1,0,0,0-1.09-1,1.93,1.93,0,0,0-.41,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M44,6a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,44,6Zm-.39,2.48V6.56H44V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M46.22,6.56c0,.14,0,.29,0,.53V8.21a1.12,1.12,0,0,1-.28.89,1,1,0,0,1-.7.23,1.26,1.26,0,0,1-.64-.16l.09-.27a1,1,0,0,0,.56.15.59.59,0,0,0,.63-.67V8.16h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.29Zm-.37.76a.41.41,0,0,0,0-.16.5.5,0,0,0-.49-.37c-.34,0-.57.28-.57.73s.19.7.57.7a.51.51,0,0,0,.48-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M47.15,6a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,47.15,6Zm-.39,2.48V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M48.12,6v.56h.5v.26h-.5v1c0,.24.07.37.26.37l.21,0v.26a.76.76,0,0,1-.31,0,.49.49,0,0,1-.38-.15.7.7,0,0,1-.13-.5V6.82h-.3V6.56h.3V6.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M50.09,8.49l0-.24h0a.72.72,0,0,1-.59.29A.55.55,0,0,1,48.87,8c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15L49,6.69a1.14,1.14,0,0,1,.63-.18c.6,0,.74.41.74.79V8a3.13,3.13,0,0,0,0,.46ZM50,7.5c-.38,0-.82.06-.82.44a.31.31,0,0,0,.33.34A.49.49,0,0,0,50,8a.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M51,5.65h.35V8.49H51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M55,7.31c0-.38,0-.83,0-1.16h0c-.09.31-.2.65-.34,1l-.47,1.31h-.27l-.43-1.29a10.44,10.44,0,0,1-.31-1h0c0,.33,0,.78-.06,1.19L53,8.49h-.33l.19-2.69h.44l.46,1.3A8.89,8.89,0,0,1,54,8h0a8.19,8.19,0,0,1,.28-.91l.48-1.3h.44l.17,2.69h-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M57.05,8.49l0-.24h0a.72.72,0,0,1-.59.29A.55.55,0,0,1,55.83,8c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15L56,6.69a1.14,1.14,0,0,1,.63-.18c.6,0,.74.41.74.79V8a3.13,3.13,0,0,0,0,.46Zm0-1c-.38,0-.82.06-.82.44a.31.31,0,0,0,.33.34A.49.49,0,0,0,57,8a.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M57.91,7.16c0-.23,0-.42,0-.6h.31v.38h0a.59.59,0,0,1,.53-.43l.1,0v.33l-.12,0a.5.5,0,0,0-.47.46.76.76,0,0,0,0,.16v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M59.58,7.44h0l.17-.22.57-.66h.42L60,7.35l.86,1.14h-.43l-.67-.93-.18.2v.73h-.35V5.65h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M61.3,7.59a.63.63,0,0,0,.67.67,1.18,1.18,0,0,0,.53-.1l.06.25a1.46,1.46,0,0,1-.64.12.89.89,0,0,1-1-1,.94.94,0,0,1,.91-1,.82.82,0,0,1,.8.91.65.65,0,0,1,0,.17Zm1-.25a.51.51,0,0,0-.49-.58.58.58,0,0,0-.54.58Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M63.54,6v.56H64v.26h-.5v1c0,.24.06.37.26.37l.2,0,0,.26a.83.83,0,0,1-.31,0,.46.46,0,0,1-.38-.15.7.7,0,0,1-.14-.5V6.82h-.3V6.56h.3V6.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M64.83,6a.22.22,0,0,1-.23.22A.22.22,0,1,1,64.83,6Zm-.39,2.48V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M65.37,7.08c0-.2,0-.36,0-.52h.31l0,.32h0a.7.7,0,0,1,.64-.37c.26,0,.68.16.68.83V8.49h-.35V7.38c0-.31-.12-.58-.45-.58a.51.51,0,0,0-.47.36.47.47,0,0,0,0,.17V8.49h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M69.26,6.56c0,.14,0,.29,0,.53V8.21A1.12,1.12,0,0,1,69,9.1a1.06,1.06,0,0,1-.71.23,1.29,1.29,0,0,1-.64-.16l.09-.27a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.67V8.16h0a.68.68,0,0,1-.61.32.86.86,0,0,1-.83-.94.93.93,0,0,1,.87-1,.66.66,0,0,1,.61.34h0V6.56Zm-.36.76a.78.78,0,0,0,0-.16.52.52,0,0,0-.5-.37c-.33,0-.57.28-.57.73s.19.7.57.7a.52.52,0,0,0,.49-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M6.73,8.49V7.78H5.52V7.55L6.68,5.89h.38V7.51h.37v.27H7.06v.71Zm0-1V6.64c0-.14,0-.27,0-.41h0a3.39,3.39,0,0,1-.22.39l-.63.88h.85Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M9.25,6.19h-1l-.1.67.22,0A1.06,1.06,0,0,1,8.93,7a.75.75,0,0,1,.37.67.91.91,0,0,1-1,.89,1.31,1.31,0,0,1-.65-.16l.09-.27a1.23,1.23,0,0,0,.56.14.57.57,0,0,0,.61-.56c0-.34-.23-.58-.75-.58a3.25,3.25,0,0,0-.36,0L8,5.89H9.25Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M10.92,6.62c0,.55-.29.82-.63.82s-.6-.26-.6-.78.28-.81.62-.81S10.92,6.13,10.92,6.62Zm-.95,0c0,.33.11.58.33.58s.34-.24.34-.59-.09-.58-.34-.58S10,6.32,10,6.65Zm.3,1.89L11.8,5.85H12L10.49,8.54Zm2.34-.84c0,.55-.29.82-.62.82s-.6-.26-.61-.78.29-.82.63-.82S12.61,7.2,12.61,7.7Zm-.95,0c0,.34.12.59.34.59s.33-.25.33-.59-.09-.58-.33-.58S11.66,7.4,11.66,7.72Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "10.86", width: "46.76", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "52.22", y: "10.86", width: "17.32", height: "4" })) }, { name: "layout-3", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-3"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-3"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: { Desktop: "0px 100px 0px 0px" }, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "afterBar" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "space-between" }, paddingTop: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "60%" } } }, progressCount: { options: { position: "afterLabel", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M41,11.45a5.27,5.27,0,0,1,.74,0,1.53,1.53,0,0,1,1.09.33,1.26,1.26,0,0,1,.38,1,1.4,1.4,0,0,1-.39,1.05,1.65,1.65,0,0,1-1.19.39,5.41,5.41,0,0,1-.63,0Zm.35,2.39.35,0a1,1,0,0,0,1.15-1.15,1,1,0,0,0-1.09-1,1.93,1.93,0,0,0-.41,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M44,11.63a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,44,11.63Zm-.39,2.48V12.18H44v1.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M46.22,12.18c0,.14,0,.29,0,.53v1.12a1.12,1.12,0,0,1-.28.89,1,1,0,0,1-.7.23,1.26,1.26,0,0,1-.64-.16l.09-.27a1,1,0,0,0,.56.15.59.59,0,0,0,.63-.67v-.22h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.29Zm-.37.76a.41.41,0,0,0,0-.16.5.5,0,0,0-.49-.37c-.34,0-.57.28-.57.73s.19.7.57.7a.51.51,0,0,0,.48-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M47.15,11.63a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,47.15,11.63Zm-.39,2.48V12.18h.35v1.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M48.12,11.62v.56h.5v.27h-.5v1c0,.24.07.37.26.37l.21,0v.26a.76.76,0,0,1-.31.05.49.49,0,0,1-.38-.15.7.7,0,0,1-.13-.5V12.45h-.3v-.27h.3v-.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M50.09,14.11l0-.24h0a.72.72,0,0,1-.59.29.55.55,0,0,1-.59-.56c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15L49,12.31a1.14,1.14,0,0,1,.63-.18c.6,0,.74.41.74.79v.73a3.13,3.13,0,0,0,0,.46Zm-.05-1c-.38,0-.82.06-.82.44a.31.31,0,0,0,.33.34.49.49,0,0,0,.47-.33.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M51,11.27h.35v2.84H51Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M55,12.93c0-.38,0-.83,0-1.16h0c-.09.31-.2.65-.34,1l-.47,1.31h-.27l-.43-1.29a10.44,10.44,0,0,1-.31-1h0c0,.33,0,.78-.06,1.19L53,14.11h-.33l.19-2.69h.44l.46,1.3a8.89,8.89,0,0,1,.27.91h0a8.19,8.19,0,0,1,.28-.91l.48-1.3h.44l.17,2.69h-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M57.05,14.11l0-.24h0a.72.72,0,0,1-.59.29.55.55,0,0,1-.59-.56c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15L56,12.31a1.14,1.14,0,0,1,.63-.18c.6,0,.74.41.74.79v.73a3.13,3.13,0,0,0,0,.46Zm0-1c-.38,0-.82.06-.82.44a.31.31,0,0,0,.33.34.49.49,0,0,0,.47-.33.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M57.91,12.78c0-.23,0-.42,0-.6h.31v.38h0a.59.59,0,0,1,.53-.43l.1,0v.33l-.12,0a.5.5,0,0,0-.47.46.76.76,0,0,0,0,.16v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M59.58,13.06h0l.17-.22.57-.66h.42L60,13l.86,1.14h-.43l-.67-.93-.18.2v.73h-.35V11.27h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M61.3,13.21a.63.63,0,0,0,.67.67,1.18,1.18,0,0,0,.53-.1l.06.25a1.46,1.46,0,0,1-.64.12.89.89,0,0,1-1-1,.94.94,0,0,1,.91-1,.82.82,0,0,1,.8.91.65.65,0,0,1,0,.17Zm1-.25a.51.51,0,0,0-.49-.58.58.58,0,0,0-.54.58Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M63.54,11.62v.56H64v.27h-.5v1c0,.24.06.37.26.37l.2,0,0,.26a.83.83,0,0,1-.31.05.46.46,0,0,1-.38-.15.7.7,0,0,1-.14-.5V12.45h-.3v-.27h.3v-.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M64.83,11.63a.22.22,0,0,1-.23.22.22.22,0,1,1,.23-.22Zm-.39,2.48V12.18h.35v1.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M65.37,12.7c0-.2,0-.36,0-.52h.31l0,.32h0a.7.7,0,0,1,.64-.37c.26,0,.68.16.68.83v1.15h-.35V13c0-.31-.12-.58-.45-.58a.51.51,0,0,0-.47.36.47.47,0,0,0,0,.17v1.16h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M69.26,12.18c0,.14,0,.29,0,.53v1.12a1.12,1.12,0,0,1-.27.89,1.06,1.06,0,0,1-.71.23,1.29,1.29,0,0,1-.64-.16l.09-.27a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.67v-.22h0a.68.68,0,0,1-.61.32.86.86,0,0,1-.83-.94.93.93,0,0,1,.87-1,.66.66,0,0,1,.61.34h0v-.29Zm-.36.76a.78.78,0,0,0,0-.16.52.52,0,0,0-.5-.37c-.33,0-.57.28-.57.73s.19.7.57.7a.52.52,0,0,0,.49-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M6.73,14.11V13.4H5.52v-.23l1.16-1.66h.38v1.62h.37v.27H7.06v.71Zm0-1v-.87c0-.14,0-.27,0-.41h0a3.39,3.39,0,0,1-.22.39l-.63.88h.85Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M9.25,11.81h-1l-.1.67.22,0a1.06,1.06,0,0,1,.56.14.75.75,0,0,1,.37.67.91.91,0,0,1-1,.89A1.31,1.31,0,0,1,7.68,14l.09-.27a1.23,1.23,0,0,0,.56.14.57.57,0,0,0,.61-.56c0-.34-.23-.58-.75-.58a3.25,3.25,0,0,0-.36,0L8,11.51H9.25Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M10.92,12.24c0,.55-.29.82-.63.82s-.6-.26-.6-.78.28-.81.62-.81S10.92,11.75,10.92,12.24Zm-.95,0c0,.33.11.58.33.58s.34-.24.34-.59-.09-.58-.34-.58S10,11.94,10,12.27Zm.3,1.89,1.53-2.69H12l-1.53,2.69Zm2.34-.84c0,.55-.29.82-.62.82s-.6-.26-.61-.78.29-.82.63-.82S12.61,12.83,12.61,13.32Zm-.95,0c0,.34.12.59.34.59s.33-.25.33-.59-.09-.58-.33-.58S11.66,13,11.66,13.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "4.89", width: "32.64", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "38.1", y: "4.89", width: "31.43", height: "4" })) }, { name: "layout-4", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-4"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-4"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "afterBar" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "space-between" }, paddingTop: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "80%" } } }, progressCount: { options: { position: "afterLabel", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, progressLabel: { options: { tag: "div", text: "Digital Marketing", position: "", class: "" }, styles: { color: {}, fontSize: {}, order: { Desktop: "10" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M6.16,11.45a5.27,5.27,0,0,1,.74,0A1.53,1.53,0,0,1,8,11.73a1.26,1.26,0,0,1,.38,1A1.4,1.4,0,0,1,8,13.75a1.65,1.65,0,0,1-1.19.39c-.25,0-.45,0-.63,0Zm.35,2.39.35,0A1,1,0,0,0,8,12.71a1,1,0,0,0-1.09-1,1.93,1.93,0,0,0-.41,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M9.2,11.63a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,9.2,11.63Zm-.39,2.48V12.18h.35v1.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11.42,12.18c0,.14,0,.29,0,.53v1.12a1.12,1.12,0,0,1-.28.89,1,1,0,0,1-.7.23,1.26,1.26,0,0,1-.64-.16l.08-.27a1.11,1.11,0,0,0,.57.15.58.58,0,0,0,.63-.67v-.22h0a.7.7,0,0,1-.62.33.87.87,0,0,1-.82-.95.94.94,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.29Zm-.37.76a.41.41,0,0,0,0-.16.5.5,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.7.58.7a.51.51,0,0,0,.48-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.35,11.63a.2.2,0,0,1-.22.22.21.21,0,0,1-.21-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,12.35,11.63ZM12,14.11V12.18h.35v1.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M13.32,11.62v.56h.5v.27h-.5v1c0,.24.07.38.26.38a.86.86,0,0,0,.21,0v.27a1.05,1.05,0,0,1-.31,0,.49.49,0,0,1-.38-.15.7.7,0,0,1-.13-.5V12.45h-.3v-.27H13v-.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.29,14.11l0-.24h0a.72.72,0,0,1-.59.29.55.55,0,0,1-.59-.56c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15l-.08-.23a1.14,1.14,0,0,1,.63-.18c.6,0,.74.41.74.8v.72a3.13,3.13,0,0,0,0,.46Zm0-1c-.38,0-.82.06-.82.43a.31.31,0,0,0,.33.34.49.49,0,0,0,.47-.33.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M16.15,11.27h.35v2.84h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M20.22,12.93c0-.38,0-.83,0-1.16h0c-.09.31-.2.65-.34,1l-.47,1.31h-.27l-.43-1.29c-.13-.38-.24-.72-.32-1h0c0,.33,0,.78-.06,1.19l-.07,1.15h-.33l.19-2.69h.44l.46,1.3a8.89,8.89,0,0,1,.27.91h0a8.19,8.19,0,0,1,.28-.91l.48-1.3h.44l.17,2.69h-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.25,14.11l0-.24h0a.72.72,0,0,1-.59.29A.55.55,0,0,1,21,13.6c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15l-.08-.23a1.14,1.14,0,0,1,.63-.18c.6,0,.74.41.74.8v.72a3.13,3.13,0,0,0,0,.46Zm-.05-1c-.38,0-.82.06-.82.43a.31.31,0,0,0,.33.34.49.49,0,0,0,.47-.33.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M23.11,12.78c0-.23,0-.42,0-.6h.31v.38h0a.59.59,0,0,1,.53-.43l.1,0v.33h-.12a.49.49,0,0,0-.47.45.81.81,0,0,0,0,.16v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.78,13.07h0a1.84,1.84,0,0,1,.17-.22l.57-.67H26L25.2,13l.86,1.14h-.43L25,13.19l-.18.2v.72h-.35V11.27h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.5,13.21a.62.62,0,0,0,.67.67,1.18,1.18,0,0,0,.53-.1l.06.25a1.46,1.46,0,0,1-.64.12.89.89,0,0,1-.95-1,.94.94,0,0,1,.91-1,.83.83,0,0,1,.8.92.63.63,0,0,1,0,.16Zm1-.25a.5.5,0,0,0-.49-.57.58.58,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.74,11.62v.56h.5v.27h-.5v1c0,.24.06.38.26.38a.77.77,0,0,0,.2,0l0,.27a1.17,1.17,0,0,1-.31,0,.46.46,0,0,1-.38-.15.7.7,0,0,1-.14-.5V12.45h-.3v-.27h.3v-.47Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30,11.63a.22.22,0,0,1-.23.22.22.22,0,1,1,.23-.22Zm-.39,2.48V12.18H30v1.93Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.57,12.7c0-.2,0-.36,0-.52h.31l0,.32h0a.7.7,0,0,1,.64-.37c.26,0,.68.16.68.83v1.15h-.35V13c0-.31-.12-.57-.45-.57a.49.49,0,0,0-.47.36.38.38,0,0,0,0,.16v1.16h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.46,12.18c0,.14,0,.29,0,.53v1.12a1.15,1.15,0,0,1-.27.89,1.06,1.06,0,0,1-.71.23,1.29,1.29,0,0,1-.64-.16l.09-.27a1.11,1.11,0,0,0,.57.15c.36,0,.62-.18.62-.67v-.22h0a.69.69,0,0,1-.61.33.87.87,0,0,1-.83-.95.94.94,0,0,1,.87-1,.66.66,0,0,1,.61.34h0v-.29Zm-.36.76a.78.78,0,0,0,0-.16.52.52,0,0,0-.5-.37c-.33,0-.57.28-.57.73s.19.7.57.7a.52.52,0,0,0,.49-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M63.53,14.11v-.7H62.32v-.24l1.16-1.66h.38v1.62h.37v.28h-.37v.7Zm0-1v-.87c0-.13,0-.27,0-.41h0c-.08.16-.14.27-.21.39l-.64.88h.85Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M66.05,11.81h-1l-.1.67.21,0a1.16,1.16,0,0,1,.56.14.75.75,0,0,1,.37.67.9.9,0,0,1-1,.89,1.31,1.31,0,0,1-.65-.16l.09-.27a1.23,1.23,0,0,0,.56.14.57.57,0,0,0,.61-.56c0-.34-.22-.58-.74-.58a2.87,2.87,0,0,0-.36,0l.16-1.25h1.25Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M67.72,12.25c0,.54-.29.82-.62.82s-.61-.26-.61-.79.28-.81.63-.81S67.72,11.75,67.72,12.25Zm-1,0c0,.33.11.58.33.58s.34-.24.34-.59-.09-.58-.34-.58S66.77,11.94,66.77,12.27Zm.3,1.89,1.53-2.69h.22L67.3,14.16Zm2.34-.84c0,.55-.29.82-.62.82s-.6-.26-.61-.78.29-.81.63-.81S69.41,12.83,69.41,13.32Zm-1,0c0,.33.12.58.34.58s.34-.25.34-.59-.1-.58-.34-.58S68.46,13,68.46,13.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "4.89", width: "39.33", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "44.79", y: "4.89", width: "24.75", height: "4" })) }, { name: "layout-5", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-5"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-5"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: {}, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "50%" }, paddingBottom: {} } }, progressCount: { options: { tag: "div", position: "insideFill", class: "" }, styles: { color: { Desktop: "#ffffff" }, fontSize: {}, padding: { Desktop: "10px 10px 10px 10px" }, backgroundColor: {} } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.83a5.27,5.27,0,0,1,.74,0,1.54,1.54,0,0,1,1.09.33,1.26,1.26,0,0,1,.38,1,1.44,1.44,0,0,1-.39,1.05,1.67,1.67,0,0,1-1.19.39c-.25,0-.46,0-.63,0Zm.35,2.39.35,0A1,1,0,0,0,7.61,7.09a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,6a.21.21,0,0,1-.22.22A.21.21,0,0,1,8.38,6a.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,6ZM8.42,8.49V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.56c0,.14,0,.29,0,.53V8.21a1.12,1.12,0,0,1-.28.89,1.05,1.05,0,0,1-.7.23,1.3,1.3,0,0,1-.65-.16l.09-.27a1.11,1.11,0,0,0,.57.15c.36,0,.62-.18.62-.67V8.16h0a.67.67,0,0,1-.61.33.87.87,0,0,1-.82-1,.93.93,0,0,1,.87-1,.64.64,0,0,1,.6.34h0V6.56Zm-.36.76a.78.78,0,0,0,0-.16.52.52,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.7.57.7a.52.52,0,0,0,.49-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,6a.21.21,0,0,1-.22.22A.22.22,0,0,1,11.52,6a.22.22,0,0,1,.22-.22A.21.21,0,0,1,12,6Zm-.39,2.48V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,6v.56h.5v.27h-.5v1c0,.24.07.38.26.38a1,1,0,0,0,.21,0v.27a1.17,1.17,0,0,1-.31,0,.48.48,0,0,1-.38-.15.7.7,0,0,1-.14-.5v-1h-.3V6.56h.3V6.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.49l0-.24h0a.74.74,0,0,1-.59.29A.55.55,0,0,1,13.68,8c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45.92.92,0,0,0-.5.15l-.09-.23a1.2,1.2,0,0,1,.64-.18c.59,0,.74.41.74.8V8a2.17,2.17,0,0,0,0,.46Zm-.05-1c-.39,0-.82.06-.82.43a.31.31,0,0,0,.33.34A.49.49,0,0,0,14.83,8a.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.65h.35V8.49h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.31c0-.38,0-.83,0-1.16h0c-.09.31-.21.65-.34,1L19,8.48H18.7l-.44-1.29c-.13-.38-.23-.72-.31-1h0c0,.33,0,.78-.05,1.19l-.07,1.15h-.33l.19-2.69h.44l.46,1.3c.11.33.2.63.27.91h0c.07-.27.17-.57.29-.91l.48-1.3h.44l.17,2.69H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.49l0-.24h0a.74.74,0,0,1-.59.29A.55.55,0,0,1,20.64,8c0-.47.41-.72,1.16-.72v0a.4.4,0,0,0-.44-.45,1,1,0,0,0-.51.15l-.08-.23a1.2,1.2,0,0,1,.64-.18c.59,0,.74.41.74.8V8a2.17,2.17,0,0,0,0,.46Zm-.05-1c-.39,0-.82.06-.82.43a.31.31,0,0,0,.33.34A.49.49,0,0,0,21.79,8a.36.36,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.71,7.16c0-.23,0-.42,0-.6H23v.38h0a.59.59,0,0,1,.54-.43l.1,0v.33h-.12a.49.49,0,0,0-.47.45.78.78,0,0,0,0,.16v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.45h0a1.92,1.92,0,0,1,.18-.22l.56-.67h.43l-.75.79.85,1.14h-.43l-.66-.92-.18.2v.72H24V5.65h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.59a.62.62,0,0,0,.66.67,1.2,1.2,0,0,0,.54-.1l.06.25a1.5,1.5,0,0,1-.64.12.9.9,0,0,1-1-1,1,1,0,0,1,.91-1,.83.83,0,0,1,.8.92c0,.07,0,.12,0,.16Zm1-.25a.49.49,0,0,0-.49-.57.58.58,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,6v.56h.51v.27h-.51v1c0,.24.07.38.27.38a.77.77,0,0,0,.2,0l0,.27a1.19,1.19,0,0,1-.32,0,.49.49,0,0,1-.38-.15.7.7,0,0,1-.13-.5v-1h-.3V6.56H28V6.09Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,6a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,6Zm-.39,2.48V6.56h.35V8.49Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7.08c0-.2,0-.36,0-.52h.31l0,.32h0a.71.71,0,0,1,.64-.37c.27,0,.69.16.69.83V8.49h-.36V7.38c0-.31-.11-.57-.44-.57a.5.5,0,0,0-.48.36.7.7,0,0,0,0,.16V8.49h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.56c0,.14,0,.29,0,.53V8.21a1.12,1.12,0,0,1-.28.89,1,1,0,0,1-.7.23,1.26,1.26,0,0,1-.64-.16l.08-.27a1.11,1.11,0,0,0,.57.15.58.58,0,0,0,.63-.67V8.16h0a.7.7,0,0,1-.62.33.87.87,0,0,1-.82-1,.94.94,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.29Zm-.37.76a.41.41,0,0,0,0-.16.5.5,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.7.58.7a.51.51,0,0,0,.48-.36.63.63,0,0,0,0-.19Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "10.86", width: "39.33", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "44.79", y: "10.86", width: "24.75", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M7.79,13.45v-.31H7.26V13l.51-.72h.16V13h.16v.12H7.93v.31Zm0-.43v-.56h0l-.1.17L7.42,13h.37Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M8.88,12.45H8.45l0,.29H8.5a.51.51,0,0,1,.25.06.34.34,0,0,1,.16.29.4.4,0,0,1-.42.39.64.64,0,0,1-.29-.07l0-.12a.5.5,0,0,0,.24.06.25.25,0,0,0,.27-.24c0-.15-.1-.25-.32-.25H8.27l.07-.54h.54Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#fff", d: "M9.61,12.63c0,.24-.12.36-.27.36s-.26-.11-.26-.34.12-.35.27-.35S9.61,12.42,9.61,12.63Zm-.41,0c0,.14.05.25.15.25s.14-.11.14-.26,0-.25-.14-.25S9.2,12.5,9.2,12.65Zm.13.82L10,12.3h.09l-.66,1.17Zm1-.37c0,.24-.12.36-.27.36s-.26-.11-.26-.34.12-.35.27-.35S10.35,12.89,10.35,13.1Zm-.41,0c0,.15.05.26.14.26s.15-.11.15-.26,0-.25-.15-.25S9.94,13,9.94,13.11Z" })) }, { name: "layout-6", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-6"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-6"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: {}, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "50%" }, paddingBottom: {}, position: { Desktop: "relative" } } }, progressCount: { options: { tag: "div", position: "insideFill", class: "" }, styles: { color: { Desktop: "#ffffff" }, fontSize: {}, padding: { Desktop: "5px 8px 5px 8px" }, backgroundColor: { Desktop: "#A084CF" }, position: { Desktop: "absolute" }, right: { Desktop: "0px" }, top: { Desktop: "50%" }, transform: { Desktop: "translateY(-50%) " } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.72a5.15,5.15,0,0,1,.74-.06A1.55,1.55,0,0,1,7.6,6,1.24,1.24,0,0,1,8,7a1.4,1.4,0,0,1-.39,1A1.62,1.62,0,0,1,6.4,8.4a5.53,5.53,0,0,1-.63,0ZM6.12,8.1a1.73,1.73,0,0,0,.35,0A1,1,0,0,0,7.61,7a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,5.9a.21.21,0,0,1-.22.22.21.21,0,0,1-.21-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,5.9ZM8.42,8.38V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.21,1.21,0,0,1-.65-.16l.09-.26a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.68V8.05h0a.67.67,0,0,1-.61.32.86.86,0,0,1-.82-.94.92.92,0,0,1,.87-1,.64.64,0,0,1,.6.34h0v-.3Zm-.36.77a.78.78,0,0,0,0-.16.51.51,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.69.57.69a.51.51,0,0,0,.49-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,5.9a.22.22,0,0,1-.44,0,.22.22,0,0,1,.22-.22A.22.22,0,0,1,12,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,5.89v.55h.5v.27h-.5v1c0,.24.06.38.26.38l.2,0,0,.26a.83.83,0,0,1-.31.05.46.46,0,0,1-.38-.15.71.71,0,0,1-.14-.5V6.71h-.3V6.44h.3V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.54h.35V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.2c0-.38,0-.83,0-1.17h0c-.09.32-.21.65-.34,1L19,8.36H18.7l-.44-1.28C18.13,6.7,18,6.35,18,6h0c0,.34,0,.79-.05,1.19l-.07,1.16h-.33l.19-2.7h.44L18.58,7c.11.33.2.63.27.91h0c.07-.28.17-.57.29-.91l.48-1.31h.44l.17,2.7H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.71,7.05c0-.23,0-.43,0-.61H23v.38h0a.58.58,0,0,1,.54-.42h.1v.33h-.12a.49.49,0,0,0-.47.45.88.88,0,0,0,0,.17v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.33h0l.18-.22.56-.67h.43l-.75.8.85,1.14h-.43l-.66-.93-.18.2v.73H24V5.54h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.48a.62.62,0,0,0,.66.67,1.36,1.36,0,0,0,.54-.1l.06.25a1.67,1.67,0,0,1-.64.12.9.9,0,0,1-1-1,.94.94,0,0,1,.91-1,.82.82,0,0,1,.8.91c0,.07,0,.13,0,.17Zm1-.26a.5.5,0,0,0-.49-.57.59.59,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,5.89v.55h.51v.27h-.51v1c0,.24.07.38.27.38l.2,0,0,.26a.85.85,0,0,1-.32.05.49.49,0,0,1-.38-.15.71.71,0,0,1-.13-.5V6.71h-.3V6.44H28V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,5.9a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7c0-.2,0-.37,0-.53h.31l0,.32h0a.72.72,0,0,1,.64-.36c.27,0,.69.16.69.82V8.38h-.36V7.26c0-.31-.11-.57-.44-.57a.51.51,0,0,0-.48.36.88.88,0,0,0,0,.17V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.17,1.17,0,0,1-.64-.16l.08-.26a1.11,1.11,0,0,0,.57.15c.36,0,.63-.19.63-.68V8.05h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.3Zm-.37.77a.41.41,0,0,0,0-.16.49.49,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.69.58.69a.5.5,0,0,0,.48-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "10.97", width: "39.33", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "44.79", y: "10.97", width: "24.75", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", x: "41.13", y: "11.74", width: "3.66", height: "2.45" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M41.92,13.48v-.31H41.4v-.1l.5-.72h.17v.7h.16v.12h-.16v.31Zm0-.43v-.37c0-.06,0-.12,0-.18h0l-.09.17-.28.38h.37Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M43,12.48h-.43l0,.29h.09a.48.48,0,0,1,.24.06.32.32,0,0,1,.16.29.39.39,0,0,1-.42.39.52.52,0,0,1-.28-.07l0-.12a.49.49,0,0,0,.24.07.25.25,0,0,0,.27-.25c0-.14-.1-.25-.33-.25h-.15l.07-.54H43Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M43.75,12.67c0,.24-.12.36-.27.36s-.26-.12-.26-.35.12-.35.27-.35S43.75,12.45,43.75,12.67Zm-.41,0c0,.14,0,.25.14.25s.15-.11.15-.25,0-.26-.15-.26S43.34,12.54,43.34,12.68Zm.13.82.67-1.17h.09l-.66,1.17Zm1-.36c0,.23-.13.35-.27.35s-.26-.11-.27-.34.13-.35.28-.35S44.49,12.92,44.49,13.14Zm-.42,0c0,.14.06.25.15.25s.15-.11.15-.26,0-.25-.15-.25S44.07,13,44.07,13.15Z" })) }, { name: "layout-7", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-7"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-7"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: {}, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "75%" }, paddingBottom: {}, position: { Desktop: "relative" } } }, progressCount: { options: { tag: "div", position: "insideFill", class: "" }, styles: { color: { Desktop: "#ffffff" }, fontSize: {}, padding: { Desktop: "4px 8px 4px 8px" }, backgroundColor: { Desktop: "#774360" }, position: { Desktop: "absolute" }, right: { Desktop: "-14px" }, top: { Desktop: "50%" }, transform: { Desktop: "translateY(-50%) " }, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.72a5.15,5.15,0,0,1,.74-.06A1.55,1.55,0,0,1,7.6,6,1.24,1.24,0,0,1,8,7a1.4,1.4,0,0,1-.39,1A1.62,1.62,0,0,1,6.4,8.4a5.53,5.53,0,0,1-.63,0ZM6.12,8.1a1.73,1.73,0,0,0,.35,0A1,1,0,0,0,7.61,7a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,5.9a.21.21,0,0,1-.22.22.21.21,0,0,1-.21-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,5.9ZM8.42,8.38V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.21,1.21,0,0,1-.65-.16l.09-.26a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.68V8.05h0a.67.67,0,0,1-.61.32.86.86,0,0,1-.82-.94.92.92,0,0,1,.87-1,.64.64,0,0,1,.6.34h0v-.3Zm-.36.77a.78.78,0,0,0,0-.16.51.51,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.69.57.69a.51.51,0,0,0,.49-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,5.9a.22.22,0,0,1-.44,0,.22.22,0,0,1,.22-.22A.22.22,0,0,1,12,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,5.89v.55h.5v.27h-.5v1c0,.24.06.38.26.38l.2,0,0,.26a.83.83,0,0,1-.31.05.46.46,0,0,1-.38-.15.71.71,0,0,1-.14-.5V6.71h-.3V6.44h.3V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.54h.35V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.2c0-.38,0-.83,0-1.17h0c-.09.32-.21.65-.34,1L19,8.36H18.7l-.44-1.28C18.13,6.7,18,6.35,18,6h0c0,.34,0,.79-.05,1.19l-.07,1.16h-.33l.19-2.7h.44L18.58,7c.11.33.2.63.27.91h0c.07-.28.17-.57.29-.91l.48-1.31h.44l.17,2.7H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.71,7.05c0-.23,0-.43,0-.61H23v.38h0a.58.58,0,0,1,.54-.42h.1v.33h-.12a.49.49,0,0,0-.47.45.88.88,0,0,0,0,.17v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.33h0l.18-.22.56-.67h.43l-.75.8.85,1.14h-.43l-.66-.93-.18.2v.73H24V5.54h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.48a.62.62,0,0,0,.66.67,1.36,1.36,0,0,0,.54-.1l.06.25a1.67,1.67,0,0,1-.64.12.9.9,0,0,1-1-1,.94.94,0,0,1,.91-1,.82.82,0,0,1,.8.91c0,.07,0,.13,0,.17Zm1-.26a.5.5,0,0,0-.49-.57.59.59,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,5.89v.55h.51v.27h-.51v1c0,.24.07.38.27.38l.2,0,0,.26a.85.85,0,0,1-.32.05.49.49,0,0,1-.38-.15.71.71,0,0,1-.13-.5V6.71h-.3V6.44H28V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,5.9a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7c0-.2,0-.37,0-.53h.31l0,.32h0a.72.72,0,0,1,.64-.36c.27,0,.69.16.69.82V8.38h-.36V7.26c0-.31-.11-.57-.44-.57a.51.51,0,0,0-.48.36.88.88,0,0,0,0,.17V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.17,1.17,0,0,1-.64-.16l.08-.26a1.11,1.11,0,0,0,.57.15c.36,0,.63-.19.63-.68V8.05h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.3Zm-.37.77a.41.41,0,0,0,0-.16.49.49,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.69.58.69a.5.5,0,0,0,.48-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c4c9b", x: "5.46", y: "10.97", width: "39.33", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "44.79", y: "10.97", width: "24.75", height: "4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", x: "42.81", y: "11.81", width: "3.96", height: "2.32", rx: "1.07" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M43.75,13.48v-.31h-.52v-.1l.5-.72h.17v.7h.16v.12H43.9v.31Zm0-.43v-.37c0-.06,0-.12,0-.18h0l-.09.17-.28.38h.37Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M44.85,12.48h-.43l0,.29h.09a.48.48,0,0,1,.24.06.32.32,0,0,1,.16.29.39.39,0,0,1-.42.39.52.52,0,0,1-.28-.07l0-.12a.49.49,0,0,0,.24.07.25.25,0,0,0,.27-.25c0-.14-.1-.25-.33-.25h-.15l.07-.54h.54Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M45.58,12.67c0,.24-.12.36-.27.36s-.26-.12-.26-.35.12-.35.27-.35S45.58,12.45,45.58,12.67Zm-.41,0c0,.14,0,.25.15.25s.14-.1.14-.25,0-.26-.14-.26S45.17,12.54,45.17,12.68Zm.13.82L46,12.33h.09L45.4,13.5Zm1-.36c0,.23-.13.35-.27.35s-.26-.11-.27-.34.13-.35.28-.35S46.32,12.92,46.32,13.14Zm-.42,0c0,.14.06.25.15.25s.15-.11.15-.26,0-.25-.15-.25S45.9,13,45.9,13.15Z" })) }, { name: "layout-8", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-8"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-8"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: {}, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" }, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "75%" }, paddingBottom: {}, position: { Desktop: "relative" }, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressCount: { options: { tag: "div", position: "insideFill", class: "" }, styles: { color: { Desktop: "#ffffff" }, fontSize: {}, padding: { Desktop: "4px 8px 4px 8px" }, backgroundColor: { Desktop: "#774360" }, position: { Desktop: "absolute" }, right: { Desktop: "10px" }, top: { Desktop: "50%" }, transform: { Desktop: "translateY(-50%) " }, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.72a5.15,5.15,0,0,1,.74-.06A1.55,1.55,0,0,1,7.6,6,1.24,1.24,0,0,1,8,7a1.4,1.4,0,0,1-.39,1A1.62,1.62,0,0,1,6.4,8.4a5.53,5.53,0,0,1-.63,0ZM6.12,8.1a1.73,1.73,0,0,0,.35,0A1,1,0,0,0,7.61,7a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,5.9a.21.21,0,0,1-.22.22.21.21,0,0,1-.21-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,5.9ZM8.42,8.38V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.21,1.21,0,0,1-.65-.16l.09-.26a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.68V8.05h0a.67.67,0,0,1-.61.32.86.86,0,0,1-.82-.94.92.92,0,0,1,.87-1,.64.64,0,0,1,.6.34h0v-.3Zm-.36.77a.78.78,0,0,0,0-.16.51.51,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.69.57.69a.51.51,0,0,0,.49-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,5.9a.22.22,0,0,1-.44,0,.22.22,0,0,1,.22-.22A.22.22,0,0,1,12,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,5.89v.55h.5v.27h-.5v1c0,.24.06.38.26.38l.2,0,0,.26a.83.83,0,0,1-.31.05.46.46,0,0,1-.38-.15.71.71,0,0,1-.14-.5V6.71h-.3V6.44h.3V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.54h.35V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.2c0-.38,0-.83,0-1.17h0c-.09.32-.21.65-.34,1L19,8.36H18.7l-.44-1.28C18.13,6.7,18,6.35,18,6h0c0,.34,0,.79-.05,1.19l-.07,1.16h-.33l.19-2.7h.44L18.58,7c.11.33.2.63.27.91h0c.07-.28.17-.57.29-.91l.48-1.31h.44l.17,2.7H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.71,7.05c0-.23,0-.43,0-.61H23v.38h0a.58.58,0,0,1,.54-.42h.1v.33h-.12a.49.49,0,0,0-.47.45.88.88,0,0,0,0,.17v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.33h0l.18-.22.56-.67h.43l-.75.8.85,1.14h-.43l-.66-.93-.18.2v.73H24V5.54h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.48a.62.62,0,0,0,.66.67,1.36,1.36,0,0,0,.54-.1l.06.25a1.67,1.67,0,0,1-.64.12.9.9,0,0,1-1-1,.94.94,0,0,1,.91-1,.82.82,0,0,1,.8.91c0,.07,0,.13,0,.17Zm1-.26a.5.5,0,0,0-.49-.57.59.59,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,5.89v.55h.51v.27h-.51v1c0,.24.07.38.27.38l.2,0,0,.26a.85.85,0,0,1-.32.05.49.49,0,0,1-.38-.15.71.71,0,0,1-.13-.5V6.71h-.3V6.44H28V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,5.9a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7c0-.2,0-.37,0-.53h.31l0,.32h0a.72.72,0,0,1,.64-.36c.27,0,.69.16.69.82V8.38h-.36V7.26c0-.31-.11-.57-.44-.57a.51.51,0,0,0-.48.36.88.88,0,0,0,0,.17V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.17,1.17,0,0,1-.64-.16l.08-.26a1.11,1.11,0,0,0,.57.15c.36,0,.63-.19.63-.68V8.05h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.3Zm-.37.77a.41.41,0,0,0,0-.16.49.49,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.69.58.69a.5.5,0,0,0,.48-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c4c9b", d: "M38.09,11H67.54a2,2,0,0,1,2,2v0a2,2,0,0,1-2,2H38.09a0,0,0,0,1,0,0V11A0,0,0,0,1,38.09,11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "5.46", y: "10.97", width: "39.33", height: "4", rx: "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", x: "39.94", y: "11.81", width: "3.96", height: "2.32", rx: "1.07" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M40.88,13.48v-.31h-.53v-.1l.51-.72H41v.7h.16v.12H41v.31Zm0-.43V12.5h0l-.1.17-.27.38h.37Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M42,12.48h-.44l0,.29h.09a.51.51,0,0,1,.25.06.32.32,0,0,1,.16.29.4.4,0,0,1-.42.39.47.47,0,0,1-.28-.07l0-.12a.5.5,0,0,0,.25.07.25.25,0,0,0,.26-.25c0-.14-.1-.25-.32-.25h-.16l.08-.54H42Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M42.71,12.67c0,.24-.13.36-.27.36s-.27-.12-.27-.35.12-.35.27-.35S42.71,12.45,42.71,12.67Zm-.42,0c0,.14.05.25.15.25s.15-.1.15-.25,0-.26-.15-.26S42.29,12.54,42.29,12.68Zm.14.82.66-1.17h.1l-.67,1.17Zm1-.36c0,.23-.12.35-.27.35s-.26-.11-.26-.34.12-.35.27-.35S43.44,12.92,43.44,13.14Zm-.41,0c0,.14,0,.25.15.25s.14-.11.14-.26,0-.25-.14-.25S43,13,43,13.15Z" })) }, { name: "layout-9", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-9"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-9"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: {}, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, position: { Desktop: "relative" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "75%" }, paddingBottom: {}, position: {}, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressCount: { options: { tag: "div", position: "afterFill", class: "" }, styles: { color: { Desktop: "#ffffff" }, fontSize: {}, padding: { Desktop: "4px 8px 4px 8px" }, backgroundColor: { Desktop: "#774360" }, position: { Desktop: "absolute" }, right: { Desktop: "10px" }, top: { Desktop: "50%" }, transform: { Desktop: "translateY(-50%) " }, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.72a5.15,5.15,0,0,1,.74-.06A1.55,1.55,0,0,1,7.6,6,1.24,1.24,0,0,1,8,7a1.4,1.4,0,0,1-.39,1A1.62,1.62,0,0,1,6.4,8.4a5.53,5.53,0,0,1-.63,0ZM6.12,8.1a1.73,1.73,0,0,0,.35,0A1,1,0,0,0,7.61,7a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,5.9a.2.2,0,0,1-.22.22.21.21,0,0,1-.21-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,5.9ZM8.42,8.38V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.23,1.23,0,0,1-.65-.16l.09-.26a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.68V8.05h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.92.92,0,0,1,.87-1,.64.64,0,0,1,.6.34h0v-.3Zm-.36.77a.41.41,0,0,0,0-.16.5.5,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.69.57.69a.5.5,0,0,0,.49-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,5.9a.21.21,0,0,1-.22.22.22.22,0,0,1-.22-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,12,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,5.89v.55h.5v.27h-.5v1c0,.25.07.38.26.38l.21,0v.26a.8.8,0,0,1-.31.05.48.48,0,0,1-.38-.15.7.7,0,0,1-.14-.5V6.71h-.3V6.44h.3V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.38l0-.25h0a.71.71,0,0,1-.59.29.55.55,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1,1,0,0,0-.5.14l-.08-.23a1.23,1.23,0,0,1,.63-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.54h.35V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.2c0-.38,0-.83,0-1.17h0c-.09.32-.21.65-.34,1L19,8.36H18.7l-.44-1.28C18.14,6.7,18,6.35,18,6h0c0,.34,0,.79-.05,1.19l-.07,1.16h-.33l.19-2.7h.44L18.58,7c.11.33.2.63.27.91h0c.07-.28.17-.57.29-.91l.48-1.31h.44l.17,2.7H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.38l0-.25h0a.71.71,0,0,1-.59.29.55.55,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1,1,0,0,0-.5.14l-.08-.23a1.23,1.23,0,0,1,.63-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.72,7.05c0-.23,0-.43,0-.61H23v.38h0a.56.56,0,0,1,.53-.42h.1v.33h-.12a.49.49,0,0,0-.47.45.88.88,0,0,0,0,.17v1h-.34Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.33h0l.18-.22.56-.67h.43l-.75.8.85,1.14h-.43l-.66-.93-.18.2v.73H24V5.54h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.48a.62.62,0,0,0,.66.67,1.36,1.36,0,0,0,.54-.1l.06.25a1.67,1.67,0,0,1-.64.12.9.9,0,0,1-.95-1,.93.93,0,0,1,.9-1,.82.82,0,0,1,.8.91c0,.07,0,.13,0,.17Zm1-.26a.5.5,0,0,0-.49-.57.57.57,0,0,0-.53.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,5.89v.55h.51v.27h-.51v1c0,.25.07.38.27.38l.2,0,0,.26a.83.83,0,0,1-.31.05.46.46,0,0,1-.38-.15.7.7,0,0,1-.14-.5V6.71h-.3V6.44H28V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,5.9a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7c0-.2,0-.37,0-.53h.31l0,.32h0a.72.72,0,0,1,.64-.36c.27,0,.69.16.69.82V8.38h-.36V7.26c0-.31-.11-.57-.44-.57a.51.51,0,0,0-.48.36.88.88,0,0,0,0,.17V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.17,1.17,0,0,1-.64-.16l.09-.26a1,1,0,0,0,.56.15c.36,0,.63-.19.63-.68V8.05h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.63.63,0,0,1,.6.34h0l0-.3Zm-.37.77a.41.41,0,0,0,0-.16.49.49,0,0,0-.49-.37c-.34,0-.57.28-.57.73s.19.69.57.69a.5.5,0,0,0,.48-.36.57.57,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c4c9b", d: "M38.09,11H67.54a2,2,0,0,1,2,2v0a2,2,0,0,1-2,2H38.09a0,0,0,0,1,0,0V11A0,0,0,0,1,38.09,11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "5.46", y: "10.97", width: "39.33", height: "4", rx: "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", x: "64.56", y: "11.81", width: "3.96", height: "2.32", rx: "1.07" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M65.5,13.48v-.31H65v-.1l.51-.72h.16v.7h.16v.12h-.16v.31Zm0-.43V12.5h0l-.1.17-.27.38h.37Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M66.6,12.48h-.44l0,.29h.09a.51.51,0,0,1,.25.06.32.32,0,0,1,.16.29.4.4,0,0,1-.42.39.47.47,0,0,1-.28-.07l0-.12a.5.5,0,0,0,.25.07.25.25,0,0,0,.26-.25c0-.14-.09-.25-.32-.25H66l.08-.54h.54Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M67.33,12.67c0,.24-.13.36-.27.36s-.27-.12-.27-.35.12-.35.27-.35S67.33,12.45,67.33,12.67Zm-.42,0c0,.14,0,.25.15.25s.15-.1.15-.25,0-.26-.15-.26S66.91,12.54,66.91,12.68Zm.14.82.66-1.17h.1l-.67,1.17Zm1-.36c0,.23-.12.35-.27.35s-.26-.11-.26-.34.12-.35.27-.35S68.06,12.92,68.06,13.14Zm-.41,0c0,.14,0,.25.15.25s.14-.11.14-.26,0-.25-.14-.25S67.65,13,67.65,13.15Z" })) }, { name: "layout-10", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-10"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("layout-10"), isPro: false, //isPro: !isProFeature ? false : true, atts: { wrapper: { options: { tag: "div", class: "" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, margin: {}, paddingBottom: { Desktop: "50px" } } }, progressData: { type: "horizontal", animate: "onVisible", animateDuration: 1, animateIteration: 2, animateDelay: 2, fill: 45, unit: "%" }, progressInfo: { options: { tag: "div", class: "", position: "beforeBar" }, styles: { display: {}, paddingBottom: { Desktop: "10px" } } }, progressBar: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#9DD6DF" }, borderRadius: { Desktop: "50px 50px 50px 50px" }, position: { Desktop: "relative !important" } } }, progressFill: { options: { tag: "div", class: "" }, styles: { color: {}, fontSize: {}, height: { Desktop: "50px" }, backgroundColor: { Desktop: "#18978F" }, width: { Desktop: "75%" }, paddingBottom: {}, position: { Desktop: "relative" }, borderRadius: { Desktop: "50px 50px 50px 50px" } } }, progressCount: { options: { tag: "div", position: "insideFill", class: "" }, styles: { color: { Desktop: "#ffffff" }, fontSize: {}, padding: { Desktop: "4px 8px 4px 8px" }, backgroundColor: { Desktop: "#774360" }, position: { Desktop: "absolute" }, right: {}, top: { Desktop: "50%" }, transform: { Desktop: "translateY(-50%) " }, borderRadius: { Desktop: "50px 50px 50px 50px" }, left: { Desktop: "8px" } } }, progressLabel: { options: { text: "Digital Marketing", position: "", class: "" }, styles: { color: { Desktop: "" }, fontSize: { Desktop: "" } } }, icon: { options: { library: "fontAwesome", position: "beforeprogressCount", srcType: "class", iconSrc: "far fa-calendar-alt", class: "number-count-icon" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, fontSize: { Desktop: "" } } }, circleMask: {}, circleOverlay: {}, blockId: "", blockCssY: { items: {} } }, scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { id: "Layer_1", "data-name": "Layer 1", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 75 20" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M5.77,5.72a5.15,5.15,0,0,1,.74-.06A1.55,1.55,0,0,1,7.6,6,1.24,1.24,0,0,1,8,7a1.4,1.4,0,0,1-.39,1A1.62,1.62,0,0,1,6.4,8.4a5.53,5.53,0,0,1-.63,0ZM6.12,8.1a1.73,1.73,0,0,0,.35,0A1,1,0,0,0,7.61,7a1,1,0,0,0-1.09-1,1.82,1.82,0,0,0-.4,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.81,5.9a.21.21,0,0,1-.22.22.21.21,0,0,1-.21-.22.22.22,0,0,1,.22-.22A.21.21,0,0,1,8.81,5.9ZM8.42,8.38V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M11,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.21,1.21,0,0,1-.65-.16l.09-.26a1.11,1.11,0,0,0,.57.15c.36,0,.62-.19.62-.68V8.05h0a.67.67,0,0,1-.61.32.86.86,0,0,1-.82-.94.92.92,0,0,1,.87-1,.65.65,0,0,1,.6.33h0V6.44Zm-.36.77a.78.78,0,0,0,0-.16.51.51,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.19.69.57.69a.51.51,0,0,0,.49-.36.62.62,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12,5.9a.22.22,0,0,1-.44,0,.22.22,0,0,1,.22-.22A.22.22,0,0,1,12,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M12.93,5.89v.55h.5v.27h-.5v1c0,.24.06.38.26.38l.2,0,0,.26a.83.83,0,0,1-.31.05.46.46,0,0,1-.38-.15.71.71,0,0,1-.14-.5V6.71h-.3V6.44h.3V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M14.9,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M15.76,5.54h.35V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M19.83,7.19c0-.37,0-.82,0-1.16h0c-.09.32-.21.65-.34,1L19,8.36H18.7l-.44-1.28C18.13,6.7,18,6.35,18,6h0c0,.34,0,.79-.05,1.19l-.07,1.16h-.33l.19-2.7h.44L18.58,7c.11.33.2.62.27.91h0c.07-.28.17-.57.29-.91l.48-1.31h.44l.17,2.7H19.9Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M21.86,8.38l0-.25h0a.71.71,0,0,1-.59.29.54.54,0,0,1-.59-.55c0-.47.41-.73,1.16-.72v0a.4.4,0,0,0-.44-.45,1.08,1.08,0,0,0-.51.14l-.08-.23a1.27,1.27,0,0,1,.64-.17c.59,0,.74.4.74.79v.72a2.27,2.27,0,0,0,0,.47Zm-.05-1c-.39,0-.82.06-.82.44a.31.31,0,0,0,.33.33.49.49,0,0,0,.47-.32.52.52,0,0,0,0-.11Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M22.71,7.05c0-.23,0-.43,0-.61H23v.38h0a.58.58,0,0,1,.54-.42h.1v.33h-.12a.49.49,0,0,0-.47.45.88.88,0,0,0,0,.17v1h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M24.39,7.33h0l.18-.22.56-.67h.43l-.75.8.85,1.14h-.43l-.66-.93-.18.2v.73H24V5.54h.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M26.11,7.48a.62.62,0,0,0,.66.67,1.36,1.36,0,0,0,.54-.1l.06.25a1.67,1.67,0,0,1-.64.12.9.9,0,0,1-1-1,.94.94,0,0,1,.91-1,.82.82,0,0,1,.8.91c0,.07,0,.13,0,.17Zm1-.26a.5.5,0,0,0-.49-.57.59.59,0,0,0-.54.57Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M28.34,5.89v.55h.51v.27h-.51v1c0,.24.07.38.27.38l.2,0,0,.26a.85.85,0,0,1-.32.05.49.49,0,0,1-.38-.15.71.71,0,0,1-.13-.5V6.71h-.3V6.44H28V6Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M29.63,5.9a.2.2,0,0,1-.22.22.22.22,0,0,1,0-.44A.21.21,0,0,1,29.63,5.9Zm-.39,2.48V6.44h.35V8.38Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M30.18,7c0-.2,0-.37,0-.53h.31l0,.32h0a.72.72,0,0,1,.64-.36c.27,0,.69.16.69.82V8.38h-.36V7.26c0-.31-.11-.57-.44-.57a.51.51,0,0,0-.48.36.79.79,0,0,0,0,.17V8.38h-.35Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M34.07,6.44c0,.14,0,.3,0,.54V8.1a1.1,1.1,0,0,1-.28.88,1,1,0,0,1-.7.23,1.17,1.17,0,0,1-.64-.16l.08-.26a1.11,1.11,0,0,0,.57.15c.36,0,.63-.19.63-.68V8.05h0a.7.7,0,0,1-.62.32.86.86,0,0,1-.82-.94.93.93,0,0,1,.87-1,.64.64,0,0,1,.6.33h0l0-.29Zm-.37.77a.41.41,0,0,0,0-.16.49.49,0,0,0-.49-.37c-.34,0-.58.28-.58.73s.2.69.58.69a.5.5,0,0,0,.48-.36.62.62,0,0,0,0-.18Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c4c9b", d: "M38.09,11H67.54a2,2,0,0,1,2,2v0a2,2,0,0,1-2,2H38.09a0,0,0,0,1,0,0V11a0,0,0,0,1,0,0Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#7480b8", x: "5.46", y: "10.97", width: "39.33", height: "4", rx: "2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#fff", x: "6.45", y: "11.81", width: "3.96", height: "2.32", rx: "1.07" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M7.4,13.48v-.31H6.87v-.1l.51-.72h.16v.7H7.7v.12H7.54v.31Zm0-.43V12.5h0l-.1.17L7,13.05H7.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M8.49,12.48H8.06l0,.29h.09a.45.45,0,0,1,.24.06.33.33,0,0,1,.17.29.4.4,0,0,1-.42.39.54.54,0,0,1-.29-.07l0-.12a.49.49,0,0,0,.24.07.25.25,0,0,0,.27-.25c0-.15-.1-.25-.32-.25H7.88L8,12.35h.54Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d1d1b", d: "M9.22,12.67c0,.24-.12.36-.27.36s-.26-.12-.26-.35.12-.35.27-.35S9.22,12.45,9.22,12.67Zm-.41,0c0,.14,0,.25.15.25s.14-.11.14-.25,0-.26-.14-.26S8.81,12.54,8.81,12.68Zm.13.82.67-1.17H9.7L9,13.5Zm1-.36c0,.23-.12.35-.27.35s-.26-.11-.26-.34.12-.35.27-.35S10,12.92,10,13.14Zm-.41,0c0,.14,0,.25.14.25s.15-.11.15-.26,0-.25-.15-.25S9.55,13,9.55,13.15Z" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/read-more/index.js": /*!***************************************!*\ !*** ./src/blocks/read-more/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/read-more/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.1765 52H4.70588C3.4578 52 2.26085 52.4958 1.37832 53.3783C0.495798 54.2608 0 55.4578 0 56.7059V103.765C0 105.013 0.495798 106.21 1.37832 107.092C2.26085 107.975 3.4578 108.471 4.70588 108.471H61.1765C62.4246 108.471 63.6215 107.975 64.504 107.092C65.3866 106.21 65.8824 105.013 65.8824 103.765V56.7059C65.8824 55.4578 65.3866 54.2608 64.504 53.3783C63.6215 52.4958 62.4246 52 61.1765 52ZM56.4706 99.0588H9.41177V61.4118H56.4706V99.0588Z", fill: "url(#paint0_linear_61_409)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 57H84.7061V66.4118H160V57Z", fill: "url(#paint1_linear_61_409)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 75.8823H85V84.8823H160V75.8823Z", fill: "url(#paint2_linear_61_409)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131 94.8823H85V103.882H131V94.8823Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M36.8446 69L27.097 84.7233L23.2135 78.5059L13 95H20.7281H33.4661H53L36.8446 69Z", fill: "url(#paint3_linear_61_409)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_409", x1: "0", y1: "80.2353", x2: "65.8824", y2: "80.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_409", x1: "84.7061", y1: "61.7059", x2: "160", y2: "61.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_409", x1: "85", y1: "80.3823", x2: "160", y2: "80.3823", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_409", x1: "13", y1: "82", x2: "53", y2: "82", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/read-more"], transform: attributes => { var content = attributes.content; var linkTarget = attributes.linkTarget; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/read-more", { readMore: { options: { text: content, linkTarget: linkTarget, linkTo: "postUrl", linkAttr: [] } } }); } }], to: [{ type: "block", blocks: ["core/read-more"], transform: attributes => { var content = attributes.readMore; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/read-more", { content: content.options.text, linkTarget: content.options.linkTarget }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var readMore = attributes.readMore; var icon = attributes.icon; var linkAttr = attributes.linkAttr; var prefix = attributes.prefix; var postfix = attributes.postfix; var utmTracking = attributes.utmTracking; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [currentPostContent, setCurrentpostContent] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "content", postId); const [customFields, setCustomFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var redmoreSelector = blockClass + " .readmore"; if (readMore.options.linkTo.length == 0) { var redmoreSelector = blockClass + " .text"; } else { var redmoreSelector = blockClass + " .readmore"; } const iconSelector = blockClass + " .readmore-icon"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[redmoreSelector] = readMore; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("linkToArgs", linkToArgsBasic); function setFieldLinkTo(option, index) { var options = { ...readMore.options, linkTo: option.value }; setAttributes({ readMore: { ...readMore, options: options } }); } function getMetaField(metaKey) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_meta", method: "POST", data: { postId: postId, meta_key: metaKey } }).then(res => { if (res["meta_value"] != undefined && res["meta_value"].length > 0) { customFields[metaKey] = res["meta_value"]; setCustomFields({}); setCustomFields(customFields); } }); } const [linkPickerExcerpt, setLinkPickerExcerpt] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerReadmore, setLinkPickerReadmore] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var readMoreX = attributes.readMore; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (readMoreX != undefined) { var readMoreY = { ...readMoreX, options: readMore.options }; setAttributes({ readMore: readMoreY }); blockCssObj[readMoreSelector] = readMoreY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryReadMore(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; readMore[sudoScource] = sudoScourceArgs; }); var readMoreX = Object.assign({}, readMore); setAttributes({ readMore: readMoreX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, redmoreSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleReadmore(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, readMore); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ readMore: object }); var elementSelector = myStore.getElementSelector(sudoScource, redmoreSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleReadmore(sudoScource, key) { var object = myStore.deletePropertyDeep(readMore, [sudoScource, key, breakPointX]); setAttributes({ readMore: object }); var elementSelector = myStore.getElementSelector(sudoScource, redmoreSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleReadmore(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, readMore); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ readMore: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddReadmore(sudoScource, cssObj) { let obj = Object.assign({}, readMore); obj[sudoScource] = cssObj; setAttributes({ readMore: obj }); var selector = myStore.getElementSelector(sudoScource, redmoreSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. var [linkAttrItemsReadmore, setlinkAttrItemsReadmore] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; readMore.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItemsReadmore(sdsd); }, [readMore]); var postUrl = readMore.options.customUrl != undefined && readMore.options.customUrl.length > 0 ? readMore.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Read More", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Read More Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: readMore.options.text, onChange: newVal => { var options = { ...readMore.options, text: newVal }; setAttributes({ readMore: { ...readMore, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: readMore.options.linkTo == undefined || readMore.options.linkTo.length == 0 ? "Choose" : linkToArgs[readMore.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), readMore.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, readMore.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: readMore.options.linkToAuthorMeta, onChange: newVal => { var options = { ...readMore.options, linkToAuthorMeta: newVal }; setAttributes({ readMore: { ...readMore, options: options } }); } })), readMore.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: readMore.options.linkToAuthorMeta, onChange: newVal => { var options = { ...readMore.options, linkToAuthorMeta: newVal }; setAttributes({ readMore: { ...readMore, options: options } }); } })), readMore.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), readMore.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...readMore.options, customUrl: "" }; setAttributes({ readMore: { ...readMore, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: readMore.options.customUrl, onChange: newVal => { var options = { ...readMore.options, customUrl: newVal.url }; setAttributes({ readMore: { ...readMore, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", readMore.options.customUrl.length != 0 ? readMore.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: readMore.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...readMore.options, linkTarget: newVal }; setAttributes({ readMore: { ...readMore, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = readMore.options.linkAttr.concat({ id: "", val: "" }); var options = { ...readMore.options, linkAttr: sdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }, "Add")), readMore.options.linkAttr != undefined && readMore.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: readMore.options.linkAttr[i].id, onChange: newVal => { readMore.options.linkAttr[i].id = newVal; var ssdsd = readMore.options.linkAttr.concat([]); var options = { ...readMore.options, linkAttr: ssdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { readMore.options.linkAttr[i].val = newVal; var ssdsd = readMore.options.linkAttr.concat([]); var options = { ...readMore.options, linkAttr: ssdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { readMore.options.linkAttr.splice(i, 1); var ssdsd = readMore.options.linkAttr.concat([]); var options = { ...readMore.options, linkAttr: ssdsd }; setAttributes({ readMore: { ...readMore, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: readMore, onChange: onChangeStyleReadmore, onAdd: onAddStyleReadmore, onRemove: onRemoveStyleReadmore, onBulkAdd: onBulkAddReadmore })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: readMore, onChange: onPickCssLibraryReadMore })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Icon"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Readmore Text", value: "beforeReadmore" }, { label: "After Readmore Text", value: "afterReadmore" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "read-more", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockReadMore", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "read-more" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), readMore.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "readmore", onClick: handleLinkClick }, linkAttrItemsReadmore, { target: readMore.options.linkTarget, href: postUrl }), icon.options.position == "beforeReadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: readMore.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...readMore.options, text: content }; setAttributes({ readMore: { ...readMore, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }), icon.options.position == "afterReadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), readMore.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: readMore.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...readMore.options, text: content }; setAttributes({ readMore: { ...readMore, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, readMore.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { className: "readmore", onClick: handleLinkClick }, linkAttrItemsReadmore, { target: readMore.options.linkTarget, href: postUrl }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeReadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: readMore.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...readMore.options, text: content }; setAttributes({ readMore: { ...readMore, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }), icon.options.position == "afterReadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), readMore.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { className: "readmore", onClick: handleLinkClick }, linkAttrItemsReadmore, { target: readMore.options.linkTarget, href: postUrl }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeReadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: "text", tagName: "span", value: readMore.options.text, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...readMore.options, text: content }; setAttributes({ readMore: { ...readMore, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }), icon.options.position == "afterReadmore" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/shortcode/index.js": /*!***************************************!*\ !*** ./src/blocks/shortcode/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./block.json */ "./src/blocks/shortcode/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_4__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_15__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M24.4929 127H0V32H24.4929V40.5H8.46296V118.4H24.4929V127Z", fill: "url(#paint0_linear_61_901)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 127H135.407V118.4H151.437V40.5H135.407V32H160V127Z", fill: "url(#paint1_linear_61_901)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M19 83.0644V77.0896L42.899 66.5659V73.4403L26.5363 80.0091L26.757 79.6527V80.5013L26.5363 80.1449L42.899 86.7137V93.5881L19 83.0644Z", fill: "url(#paint2_linear_61_901)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M56.2912 86.8156V86.2385C56.3026 84.2582 56.478 82.6796 56.8174 81.5028C57.1682 80.326 57.6774 79.3754 58.3451 78.6512C59.0127 77.927 59.8161 77.2707 60.7553 76.6823C61.4569 76.2296 62.0849 75.76 62.6394 75.2734C63.1939 74.7869 63.6352 74.2494 63.9634 73.6609C64.2915 73.0612 64.4556 72.3936 64.4556 71.658C64.4556 70.8773 64.2689 70.1926 63.8955 69.6042C63.5221 69.0158 63.0185 68.5632 62.3848 68.2463C61.7624 67.9295 61.0722 67.7711 60.314 67.7711C59.5785 67.7711 58.8826 67.9351 58.2262 68.2633C57.5699 68.5801 57.0324 69.0554 56.6137 69.6891C56.1951 70.3115 55.9687 71.0866 55.9348 72.0145H49.0095C49.0661 69.7513 49.6093 67.8842 50.639 66.4132C51.6687 64.9308 53.0323 63.8275 54.7297 63.1033C56.427 62.3678 58.2998 62 60.348 62C62.5998 62 64.5914 62.3734 66.3227 63.1203C68.054 63.8558 69.4119 64.9251 70.3964 66.3283C71.3809 67.7315 71.8731 69.4232 71.8731 71.4034C71.8731 72.7274 71.6525 73.9042 71.2111 74.934C70.7811 75.9524 70.1757 76.8577 69.395 77.6498C68.6142 78.4306 67.6919 79.1378 66.6282 79.7715C65.7343 80.3033 64.9988 80.8578 64.4217 81.4349C63.8559 82.012 63.4315 82.6796 63.1486 83.4378C62.877 84.196 62.7356 85.1295 62.7243 86.2385V86.8156H56.2912ZM59.652 97.6787C58.5205 97.6787 57.553 97.2827 56.7495 96.4906C55.9574 95.6872 55.567 94.7253 55.5784 93.6051C55.567 92.4961 55.9574 91.5456 56.7495 90.7535C57.553 89.9614 58.5205 89.5653 59.652 89.5653C60.727 89.5653 61.6719 89.9614 62.4867 90.7535C63.3014 91.5456 63.7144 92.4961 63.7257 93.6051C63.7144 94.3519 63.5164 95.0365 63.1317 95.6589C62.7582 96.2699 62.266 96.7622 61.6549 97.1356C61.0439 97.4977 60.3763 97.6787 59.652 97.6787Z", fill: "url(#paint3_linear_61_901)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M94.2402 86.8156V86.2385C94.2515 84.2582 94.4269 82.6796 94.7664 81.5028C95.1172 80.326 95.6264 79.3754 96.2941 78.6512C96.9617 77.927 97.7651 77.2707 98.7043 76.6823C99.4059 76.2296 100.034 75.76 100.588 75.2734C101.143 74.7869 101.584 74.2494 101.912 73.6609C102.241 73.0612 102.405 72.3936 102.405 71.658C102.405 70.8773 102.218 70.1926 101.844 69.6042C101.471 69.0158 100.967 68.5632 100.334 68.2463C99.7114 67.9295 99.0212 67.7711 98.263 67.7711C97.5275 67.7711 96.8315 67.9351 96.1752 68.2633C95.5189 68.5801 94.9814 69.0554 94.5627 69.6891C94.144 70.3115 93.9177 71.0866 93.8838 72.0145H86.9585C87.0151 69.7513 87.5582 67.8842 88.588 66.4132C89.6177 64.9308 90.9813 63.8275 92.6786 63.1033C94.376 62.3678 96.2488 62 98.2969 62C100.549 62 102.54 62.3734 104.272 63.1203C106.003 63.8558 107.361 64.9251 108.345 66.3283C109.33 67.7315 109.822 69.4232 109.822 71.4034C109.822 72.7274 109.601 73.9042 109.16 74.934C108.73 75.9524 108.125 76.8577 107.344 77.6498C106.563 78.4306 105.641 79.1378 104.577 79.7715C103.683 80.3033 102.948 80.8578 102.371 81.4349C101.805 82.012 101.381 82.6796 101.098 83.4378C100.826 84.196 100.685 85.1295 100.673 86.2385V86.8156H94.2402ZM97.601 97.6787C96.4694 97.6787 95.5019 97.2827 94.6985 96.4906C93.9064 95.6872 93.516 94.7253 93.5273 93.6051C93.516 92.4961 93.9064 91.5456 94.6985 90.7535C95.5019 89.9614 96.4694 89.5653 97.601 89.5653C98.676 89.5653 99.6209 89.9614 100.436 90.7535C101.25 91.5456 101.663 92.4961 101.675 93.6051C101.663 94.3519 101.465 95.0365 101.081 95.6589C100.707 96.2699 100.215 96.7622 99.6039 97.1356C98.9929 97.4977 98.3252 97.6787 97.601 97.6787Z", fill: "url(#paint4_linear_61_901)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M140.222 83.0644L116.323 93.5881V86.7137L132.686 80.1449L132.465 80.5013V79.6527L132.686 80.0091L116.323 73.4403V66.5659L140.222 77.0896V83.0644Z", fill: "url(#paint5_linear_61_901)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_901", x1: "0", y1: "79.5", x2: "24.4929", y2: "79.5", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_901", x1: "135.407", y1: "79.5", x2: "160", y2: "79.5", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_901", x1: "19", y1: "79.8394", x2: "140.222", y2: "79.8394", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_901", x1: "19", y1: "79.8394", x2: "140.222", y2: "79.8394", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_901", x1: "19", y1: "79.8394", x2: "140.222", y2: "79.8394", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_901", x1: "19", y1: "79.8394", x2: "140.222", y2: "79.8394", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/shortcode"], transform: attributes => { // var content = attributes.content; // var linkTarget = attributes.linkTarget; console.log(attributes); // return createBlock("post-grid/read-more", { // readMore: { // options: { // text: content, // linkTarget: linkTarget, // linkTo: "postUrl", // linkAttr: [], // }, // }, // }); } }], to: [{ type: "block", blocks: ["core/read-more"], transform: attributes => { // var content = attributes.readMore; console.log(attributes); // return createBlock("core/read-more", { // content: content.options.text, // linkTarget: content.options.linkTarget, // }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var shortcode = attributes.shortcode; var shortcodeClassic = attributes.shortcodeClassic; var wrapper = attributes.wrapper; var items = attributes.items; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [metaValue, setMetaValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); const [metaHtml, setMetaHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [metaArgs, setMetaArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); const [linkPickerText, setLinkPickerText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [shortcodePrams, setShortcodePrams] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ id: "", label: "", val: "" }); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const itemSelector = blockClass + " .item"; const postCountSelector = blockClass + " .postCount"; const [shortcodes, setshortcodes] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ yith_wcwl_add_to_wishlist: { label: "YITH - Add to Wishlist", value: "yith_wcwl_add_to_wishlist", args: [{ id: "product_id", label: "Product Id", val: "{currentPostId}" }] }, yasr_overall_rating: { label: "YASR- overall rating", value: "yasr_overall_rating", args: [{ id: "size", label: "Size", val: "15" }, { label: "Post Id", val: "{currentPostId}" }] }, yasr_visitor_votes: { label: "YASR - visitor votes", value: "yasr_visitor_votes", args: [{ id: "size", label: "Size", val: "15" }, { label: "Post Id", val: "{currentPostId}" }] }, wp_postviews: { label: "WP-PostViews", value: "views", args: [{ id: "id", label: "Post Id", val: "{currentPostId}" }] }, wp_postratings: { label: "WP-PostRatings", value: "wp_postratings", args: [{ id: "id", label: "Post Id", val: "{currentPostId}" }] }, site_reviews_summary: { label: "Site Reviews - Summary", value: "site_reviews_summary", args: [{ id: "hide", label: "Hide", val: "" }, { id: "assigned_to", label: "Assigned To", val: "" }, { id: "class", label: "Class", val: "" }] }, ratingwidget: { label: "Rating-Widget", value: "ratingwidget", args: [{ id: "post_id", label: "Post Id", val: "{currentPostId}" }] }, ratemypostresult: { label: "Rate my Post - Result", value: "ratemypost-result", args: [{ id: "post_id", label: "Post Id", val: "{currentPostId}" }] }, ratemypost: { label: "Rate my Post", value: "ratemypost", args: [{ id: "id", label: "Post Id", val: "{currentPostId}" }] }, postviews: { label: "Post Views Counter", value: "post-views", args: [{ id: "id", label: "Post Id", val: "{currentPostId}" }] }, pvcp_1: { label: "Page Visit Counter", value: "pvcp_1", args: [{ id: "postid", label: "Post Id", val: "{currentPostId}" }] }, pvc_stats: { label: "Page Views Count", value: "pvc_stats", args: [{ id: "postid", label: "Post Id", val: "{currentPostId}" }] }, mr_rating_result: { label: "Multi Rating - Result", value: "mr_rating_result", args: [{ id: "post_id", label: "Post Id", val: "{currentPostId}" }] }, mr_rating_form: { label: "Multi Rating", value: "mr_rating_form", args: [{ id: "post_id", label: "Post Id", val: "{currentPostId}" }] }, likebtn: { label: "Like Button Rating", value: "likebtn", args: {} }, kkratings: { label: "KK Star Ratings", value: "kkratings", args: [{ id: "size", label: "Size", val: "15" }, { id: "id", label: "Post Id", val: "{currentPostId}" }] } }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_1___default()({ path: "/post-grid/v2/get_shortcode", method: "POST", data: { postId: postId, meta_key: shortcode.options.key, prams: shortcode.options.prams } }).then(res => { setMetaHtml(res.html); //setMetaArgs(res.args); }); }, [shortcode]); // var breakPointList = []; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var shortcodeClassicX = attributes.shortcodeClassic; var shortcodeX = attributes.shortcode; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (shortcodeX != undefined) { var shortcodeY = { ...shortcodeX, options: shortcode.options }; setAttributes({ shortcode: shortcodeY }); blockCssObj[shortcodeSelector] = shortcodeY; } if (shortcodeClassicX != undefined) { var shortcodeClassicY = { ...shortcodeClassicX, options: shortcodeClassic.options }; setAttributes({ shortcodeClassic: shortcodeClassicY }); blockCssObj[shortcodeClassicSelector] = shortcodeClassicY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [items]); const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_6__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_2__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Shortcode Key", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { className: "mb-3" }, "Choose Shortcode "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_10__["default"], { position: "bottom right", variant: "secondary", options: shortcodes, buttonTitle: "Choose", onChange: (option, index) => { var options = { ...shortcode.options, id: option.id, key: option.value, prams: option.args }; setAttributes({ shortcode: { ...shortcode, options: options } }); }, values: "", value: shortcode.options.key }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Shortcode Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { placeholder: "Shortcode key", value: shortcode.options.key, onChange: newVal => { let result = newVal.includes("["); if (result) { var shortcodeStr = newVal.replace("[", ""); shortcodeStr = shortcodeStr.replace("]", ""); var shortcodeArr = shortcodeStr.split(" "); var shortcodeKey = shortcodeArr[0]; newVal = shortcodeKey; shortcodeArr.shift(); var attsGroups = []; var options = { ...shortcode.options }; shortcodeArr.map(x => { var shortcodePrams = {}; var attrArr = x.split("="); shortcodePrams.id = attrArr[0] == undefined ? "" : attrArr[0]; shortcodePrams.label = attrArr[0] == undefined ? "" : attrArr[0]; shortcodePrams.val = attrArr[1] == undefined ? "" : attrArr[1].replaceAll('"', ""); options.prams.push(shortcodePrams); }); setAttributes({ shortcode: { ...shortcode, options: options } }); } var options = { ...shortcode.options, key: newVal }; setAttributes({ shortcode: { ...shortcode, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "You can paste the shortcode, please use following format when pasting"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "[shortcode attr1=\"value1\" attr2=\"value2\"]"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Parameters"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { className: linkPickerText ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], onClick: ev => { setLinkPickerText(prev => !prev); } }, "Add"), linkPickerText && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Popover, { position: "bottom right " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-3 w-60" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: shortcodePrams.id, onChange: newVal => { setShortcodePrams({ ...shortcodePrams, id: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: shortcodePrams.label, onChange: newVal => { setShortcodePrams({ ...shortcodePrams, label: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: shortcodePrams.val, onChange: newVal => { setShortcodePrams({ ...shortcodePrams, val: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.Button, { variant: "secondary", onClick: ev => { var optionsX = { ...shortcode.options }; var pramsX = [...shortcode.options.prams]; pramsX.push(shortcodePrams); var optionsX = { ...optionsX, prams: pramsX }; setAttributes({ shortcode: { ...shortcode, options: optionsX } }); // shortcodePrams.id = ''; // shortcodePrams.label = ''; // shortcodePrams.val = ''; } }, "Add Parameter")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, shortcode.options.prams != undefined && shortcode.options.prams.map((arg, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 bg-gray-300" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-gray-500 px-3 text-white" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, arg.label, " (", arg.id, ")"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var options = { ...shortcode.options }; options.prams.splice(index, 1); setAttributes({ shortcode: { ...shortcode, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", width: "24", height: "24", "aria-hidden": "true", focusable: "false" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M13 11.8l6.1-6.3-1-1-6.1 6.2-6.1-6.2-1 1 6.1 6.3-6.5 6.7 1 1 6.5-6.6 6.5 6.6 1-1z" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: arg.val, onChange: newVal => { var options = { ...shortcode.options }; options.prams[index].val = newVal; setAttributes({ shortcode: { ...shortcode, options: options } }); } }))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_12__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_17__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_7__.__experimentalInputControl, { value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_13__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_14__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_18__["default"], { slug: "shortcode" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, shortcode.options.key.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_10__["default"], { position: "bottom right", variant: "secondary", options: shortcodes, buttonTitle: "Choose", onChange: (option, index) => { var options = { ...shortcode.options, key: option.value }; setAttributes({ shortcode: { ...shortcode, options: options } }); }, values: "", value: shortcode.options.key }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RawHTML, null, metaHtml)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/social-share/index.js": /*!******************************************!*\ !*** ./src/blocks/social-share/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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 react_sortablejs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_icon_toggle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-toggle */ "./src/components/icon-toggle/index.js"); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./block.json */ "./src/blocks/social-share/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_22__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M64.898 116.493H7.332c-.109 0-.219-.11-.437-.11-3.94-.66-6.895-4.18-6.895-8.25V52.36C0 47.74 3.83 44 8.317 44h55.486c3.065 0 5.472 1.43 7.114 4.07.657.99.985 2.2 1.314 3.3v57.863c0 .11-.11.22-.11.44-.438 2.53-1.86 4.51-4.159 5.83-.875.44-1.97.66-3.064.99Zm-17.182-5.61h15.321c2.408 0 3.503-1.1 3.503-3.41V53.13c0-2.31-1.095-3.41-3.393-3.41H8.974c-2.298 0-3.393 1.1-3.393 3.41v54.563c0 2.2 1.095 3.41 3.283 3.41h29.221c.219 0 .547.11.766-.11V88.002h-8.427v-8.8h8.427v-.99c.11-2.31-.11-4.62.11-6.93.766-6.271 6.238-11.111 12.476-11.221h5.581c.22 0 .329-.11.547.11v8.69h-5.472c-2.736 0-4.487 1.76-4.487 4.62v5.72h10.178c-.438 2.97-.984 5.83-1.422 8.8h-8.646v22.882Z", fill: "url(#a)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M120.901 71.157c.876-9.02 11.163-13.53 18.386-7.7 1.752-.22 3.502-.33 5.253-1.1a2.194 2.194 0 0 1 2.299.33c.766.66.985 1.43.766 2.42-.438 2.09-1.095 4.07-2.408 5.72-1.313 1.65-1.97 3.63-2.298 5.83-.985 7.7-4.815 13.971-11.054 18.591-3.72 2.75-7.989 4.29-12.695 4.73-4.925.55-9.74-.11-14.336-2.09-1.204-.55-2.408-1.21-3.612-1.87-.985-.66-1.422-1.76-1.094-2.86a2.548 2.548 0 0 1 2.407-1.65c2.408.11 4.816 0 7.224-.88.328-.11.656-.22 1.094-.55-1.423-1.1-2.736-2.2-3.94-3.41-2.298-2.42-4.159-5.17-4.815-8.47-.438-2.2-.329-4.51-.219-6.71.109-2.2.328-4.29.985-6.38.109-.441.219-.881.437-1.321.767-1.43 2.518-1.76 3.722-.55.766.77 1.532 1.65 2.407 2.42 3.174 2.97 7.004 4.73 11.163 5.61.11 0 .219-.11.328-.11Zm20.466-3.08c-.438 0-.766 0-1.204.11-1.423.33-2.736.33-3.831-.88-.656-.77-1.532-1.1-2.517-1.32-4.596-1.32-8.974 2.75-7.989 7.48.329 1.43-.438 2.53-1.751 2.86-.547.11-1.094 0-1.641 0-5.363-.44-10.178-2.31-14.447-5.61-.328-.22-.656-.66-1.204-.77-.218 1.54-.218 3.08-.328 4.62-.218 3.41 1.204 6.16 3.393 8.58 1.97 2.09 4.159 3.74 6.676 5.171 1.641.99 1.751 2.97.109 4.07-1.313.99-2.736 1.76-4.268 2.42-.109.11-.438 0-.438.33 1.314.22 2.518.33 3.831.33 1.313 0 2.517-.11 3.83-.33 4.706-.66 8.755-2.64 12.039-5.94 4.158-4.29 6.457-9.46 6.785-15.51 0-.99.328-1.87.875-2.64.767-.99 1.314-1.98 2.08-2.97Z", fill: "url(#b)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M93.179 46.5h61.01a3.31 3.31 0 0 1 3.311 3.31v61.011a3.311 3.311 0 0 1-3.311 3.311h-61.01a3.311 3.311 0 0 1-3.31-3.311v-61.01a3.31 3.31 0 0 1 3.31-3.311Z", stroke: "url(#c)", "stroke-width": "5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "a", x1: "0", y1: "80.246", x2: "72.231", y2: "80.246", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "b", x1: "100", y1: "80.504", x2: "147.685", y2: "80.504", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "c", x1: "85.916", y1: "80.025", x2: "160", y2: "80.025", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var elements = attributes.elements; var icon = attributes.icon; var label = attributes.label; var count = attributes.count; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var wrapperSelector = blockClass; // Wrapper CSS Class Selectors var itemSelector = blockClass + " .media-item"; var iconSelector = blockClass + " .media-item .icon"; var labelSelector = blockClass + " .media-item .media-label"; var countSelector = blockClass + " .media-item .media-count"; var [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.getBreakPoint()); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); var [loading, setLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // blockCssY.items[itemSelector] = { // ...blockCssY.items[itemSelector], // "font-size": { Desktop: "30px" }, // }; // blockCssY.items[itemSelector] = { // ...blockCssY.items[itemSelector], // "margin-top": { Desktop: "10px" }, // }; // blockCssY.items[itemSelector] = { // ...blockCssY.items[itemSelector], // "margin-right": { Desktop: "10px" }, // }; // blockCssY.items[itemSelector] = { // ...blockCssY.items[itemSelector], // "margin-bottom": { Desktop: "10px" }, // }; // blockCssY.items[itemSelector] = { // ...blockCssY.items[itemSelector], // "margin-left": { Desktop: "10px" }, // }; myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; // blockCssObj[itemSelector] = elements; blockCssObj[iconSelector] = icon; blockCssObj[labelSelector] = label; blockCssObj[countSelector] = count; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { elements.items.map((x, index) => { var styles = x.styles; Object.entries(styles).map(y => { var attrId = y[0]; var attrVal = y[1]; if (Object.keys(attrVal).length != 0) { var attrIdX = ""; if (attrId == "backgroundColor") { attrIdX = "background-color"; } else if (attrId == "textAlign") { attrIdX = "text-align"; } else { attrIdX = attrId; } if (blockCssY.items[itemSelector + ".item-" + index] == undefined) { blockCssY.items[itemSelector + ".item-" + index] = {}; blockCssY.items[itemSelector + ".item-" + index][attrIdX] = attrVal; } else { blockCssY.items[itemSelector + ".item-" + index][attrIdX] = attrVal; } setAttributes({ blockCssY: { items: blockCssY.items } }); } }); }); setTimeout(x => { //setAttributes({ blockCssY: { items: newValuesObjX } }); }, 2000); }, [elements]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var iconX = attributes.icon; var labelX = attributes.label; var countX = attributes.count; var elementsX = attributes.elements; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (elementsX != undefined) { var elementsY = { ...elementsX, options: elements.options }; setAttributes({ elements: elementsY }); blockCssObj[itemSelector] = elementsY; } if (countX != undefined) { var countY = { ...countX, options: count.options }; setAttributes({ count: countY }); blockCssObj[countSelector] = countY; } if (labelX != undefined) { var labelY = { ...labelX, options: label.options }; setAttributes({ label: labelY }); blockCssObj[labelSelector] = labelY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var mediaSites = [{ id: "email", label: "Mail", count: 125, url: "mailto:?subject={TITLE}&body={URL}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fas fa-envelope" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "skype", label: "Skype", count: 125, url: "https://web.skype.com/share?url={URL}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-skype" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "whatsapp", label: "WhatsApp", count: 125, url: "https://api.whatsapp.com/send?text={URL} - {TITLE}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-whatsapp-square" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "tumblr", label: "Tumblr", count: 125, url: "https://www.tumblr.com/share/link?url={URL}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-tumblr-square" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "viber", label: "Viber", count: 125, url: "viber://chat?number=12345678", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-viber" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, // { // id: 'instagram', label: 'Instagram', count: 125, url: 'https://www.facebook.com/sharer.php?u={URL}', siteIcon: { library: 'fontAwesome', srcType: "class", /*class, html, img, svg */ iconSrc: 'fab fa-square-instagram', }, // styles: { // // color: { Desktop: '' }, // backgroundColor: {}, // padding: { Desktop: '' }, // margin: { Desktop: '' }, // display: {}, // }, // }, { id: "reddit", label: "Reddit", count: 125, url: "http://www.reddit.com/submit?title={TITLE}&url={URL}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-reddit-square" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "facebook", label: "Facebook", count: 125, url: "https://www.facebook.com/sharer.php?u={URL}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-facebook-square" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "twitter", label: "Twitter", count: 125, url: "https://twitter.com/intent/tweet?url={URL}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-twitter-square" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "linkedin", label: "Linkedin", count: 125, url: "https://www.linkedin.com/shareArticle?mini=true&url={URL}&title={TITLE}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-linkedin" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "pinterest", label: "Pinterest", count: 125, url: "https://www.pinterest.com/pin/create/button/?url={URL}&media={IMAGE}", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "fab fa-pinterest-square" }, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }]; function addMedia(option, index) { //var isExist = elements.items.find(x => x.label === option.label); var elementsX = elements.items.push(option); setAttributes({ elements: { ...elements, items: elements.items } }); } var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleElements(sudoScource, newVal, attr) { var sudoScourceX = { ...elements[sudoScource] }; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); sudoScourceX[attr][breakPointX] = newVal; let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } Object.entries(sudoScourceX).map(args => { var argAttr = myStore.cssAttrParse(args[0]); var argAttrVal = args[1]; blockCssY.items[elementSelector][argAttr] = argAttrVal; }); setAttributes({ blockCssY: { items: blockCssY.items } }); setAttributes({ elements: { ...elements } }); } function onRemoveStyleElements(sudoScource, key) { var object = myStore.deletePropertyDeep(elements, [sudoScource, key, breakPointX]); setAttributes({ elements: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleElements(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, elements); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ elements: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, label); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(label, [sudoScource, key, breakPointX]); setAttributes({ label: object }); var elementSelector = myStore.getElementSelector(sudoScource, labelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, label); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ label: object }); } function onChangeStyleCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, count); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ count: object }); var elementSelector = myStore.getElementSelector(sudoScource, countSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCount(sudoScource, key) { var object = myStore.deletePropertyDeep(count, [sudoScource, key, breakPointX]); setAttributes({ count: object }); var elementSelector = myStore.getElementSelector(sudoScource, countSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, count); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ count: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, elements); obj[sudoScource] = cssObj; setAttributes({ elements: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddLabel(sudoScource, cssObj) { let obj = Object.assign({}, label); obj[sudoScource] = cssObj; setAttributes({ label: obj }); var selector = myStore.getElementSelector(sudoScource, labelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCount(sudoScource, cssObj) { let obj = Object.assign({}, count); obj[sudoScource] = cssObj; setAttributes({ count: obj }); var selector = myStore.getElementSelector(sudoScource, countSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); function onChangeBreakPoint(x, index) { var asdsdsd = wp.data.dispatch("postgrid-shop").setBreakPoint(x.value); asdsdsd.then(res => { setBreakPointX(res.breakpoint); myStore.generateBlockCss(blockCssY.items, blockId); }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var index = extra.index; console.log("first"); var path = [sudoScource, attr, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.updatePropertyDeep(objX, path, newVal); var elementsX = { ...elements }; elementsX.items[index] = object; setAttributes({ elements: elementsX }); //setAttributes({ obj: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(attr); // let itemsX = Object.assign({}, blockCssY.items); // if (itemsX[elementSelector] == undefined) { // itemsX[elementSelector] = {}; // } // var cssPath = [elementSelector, cssPropty, breakPointX] // const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal) // setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var object = myStore.deletePropertyDeep(obj, [sudoScource, key, breakPointX]); var elementsX = { ...elements }; elementsX.items[index] = object; setAttributes({ elements: elementsX }); //setAttributes({ items: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(key); // var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); // setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var path = [sudoScource, key, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.addPropertyDeep(objX, path, ""); var elementsX = { ...elements }; elementsX.items[index] = object; setAttributes({ elements: elementsX }); //setAttributes({ items: object }); // setAttributes({ items: itemsX }); } // function onBulkAddItem(sudoScource, cssObj) { // let obj = Object.assign({}, items); // obj[sudoScource] = cssObj; // setAttributes({ items: obj }); // var selector = myStore.getElementSelector(sudoScource, itemSelector); // var stylesObj = {}; // Object.entries(cssObj).map((args) => { // var attr = args[0]; // var cssPropty = myStore.cssAttrParse(attr); // if (stylesObj[selector] == undefined) { // stylesObj[selector] = {}; // } // if (stylesObj[selector][cssPropty] == undefined) { // stylesObj[selector][cssPropty] = {}; // } // stylesObj[selector][cssPropty] = args[1]; // }); // var cssItems = { ...blockCssY.items }; // var cssItemsX = { ...cssItems, ...stylesObj }; // setAttributes({ blockCssY: { items: cssItemsX } }); // } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_23__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_24__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add Media"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: mediaSites, buttonTitle: "Choose", onChange: addMedia, values: "" })), elements.items.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-red-400 text-white my-3 px-3 py-2 text-center" }, "No media added"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__.ReactSortable, { list: elements.items, handle: ".handle", setList: item => { setAttributes({ elements: { ...elements, items: item } }); } }, elements.items.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var elementsX = elements.items.splice(index, 1); setAttributes({ elements: { ...elements, items: elements.items } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, item.label)), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Label"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.label, onChange: newVal => { elements.items[index].label = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.url, onChange: newVal => { elements.items[index].url = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.count, onChange: newVal => { elements.items[index].count = newVal; setAttributes({ elements: { ...elements, items: elements.items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_17__["default"], { library: item.siteIcon.library, srcType: item.siteIcon.srcType, iconSrc: item.siteIcon.iconSrc, onChange: arg => { //var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; //setAttributes({ icon: { ...icon, options: options } }); elements.items[index].siteIcon = { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ elements: { ...elements, items: elements.items } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: item, extra: { index: index }, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem // onBulkAdd={onBulkAddItem} })))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: elements, onChange: onChangeStyleElements, onAdd: onAddStyleElements, onBulkAdd: onBulkAddItems, onRemove: onRemoveStyleElements })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Label", value: "beforeLabel" }, { label: "After Label", value: "afterLabel" } // { label: 'Before Count', value: 'beforeCount' }, // { label: 'After Count', value: 'afterCount' }, ], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { className: "my-3", label: "Display icon?", help: elements.options.showIcon ? "Icon is displaying" : "Icon is hidden", checked: elements.options.showIcon ? true : false, onChange: e => { var options = { ...elements.options, showIcon: elements.options.showIcon ? false : true }; setAttributes({ elements: { ...elements, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: icon, onChange: onChangeStyleIcon, onBulkAdd: onBulkAddIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Label" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Label"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { className: "my-3", label: "Display label?", help: elements.options.showLabel ? "Label is displaying" : "Label is hidden", checked: elements.options.showLabel ? true : false, onChange: e => { var options = { ...elements.options, showLabel: elements.options.showLabel ? false : true }; setAttributes({ elements: { ...elements, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: label, onChange: onChangeStyleLabel, onAdd: onAddStyleLabel, onBulkAdd: onBulkAddLabel, onRemove: onRemoveStyleLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Count" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Count"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_19__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { className: "my-3", label: "Display count?", help: elements.options.showCount ? "Count is displaying" : "Count is hidden", checked: elements.options.showCount ? true : false, onChange: e => { var options = { ...elements.options, showCount: elements.options.showCount ? false : true }; setAttributes({ elements: { ...elements, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_20__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_21__["default"], { obj: count, onChange: onChangeStyleCount, onAdd: onAddStyleCount, onBulkAdd: onBulkAddCount, onRemove: onRemoveStyleCount })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_18__["default"], { blockName: "social-share", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_15__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_16__["default"], { utm: { utm_source: "BlockPostExcerpt", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_25__["default"], { slug: "social-share" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, elements.items.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { onClick: handleLinkClick, className: "media-item item-" + index, href: x.url }, elements.options.showLabel && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "media-label" }, x.label), elements.options.showIcon && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), elements.options.showCount && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "media-count" }, "(", x.count, ")")); }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/star-rate/index.js": /*!***************************************!*\ !*** ./src/blocks/star-rate/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/star-rate/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 87.0728H0V97.0728H160V87.0728Z", fill: "url(#paint0_linear_61_612)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M141 106.073H20V115.073H141V106.073Z", fill: "url(#paint1_linear_61_612)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M80.1098 44C80.3364 44 80.4875 44 80.7141 44C81.4695 44.2275 81.9227 44.7582 82.2248 45.4406C82.4514 45.9713 82.678 46.4262 82.9046 46.957C83.6599 48.625 84.4909 50.293 85.2462 51.9611C85.5484 52.4918 85.926 52.8709 86.5303 52.9467C87.059 53.0225 87.5877 53.0984 88.041 53.1742C89.9293 53.4775 91.8177 53.7807 93.706 54.0082C94.4614 54.084 94.9902 54.5389 95.2923 55.2213C95.5945 55.9795 95.4434 56.6619 94.9147 57.1926C94.7636 57.4201 94.537 57.5717 94.3104 57.7992C92.7241 59.3914 91.1379 60.9836 89.6273 62.5758C89.174 63.0307 89.023 63.5615 89.0985 64.168C89.4762 66.7459 89.9293 69.2479 90.307 71.8258C90.4581 72.584 90.2315 73.2664 89.5516 73.7213C88.9474 74.1762 88.2677 74.1762 87.5879 73.7971C85.5484 72.6598 83.5089 71.5225 81.4695 70.3852C80.7141 69.9303 80.0344 69.9303 79.2791 70.3852C77.2396 71.5225 75.1245 72.6598 73.0851 73.7971C72.4053 74.1762 71.8011 74.1762 71.1213 73.7213C70.517 73.2664 70.2149 72.6598 70.366 71.9016C70.7436 69.4754 71.1212 67.0492 71.5744 64.5471C71.7255 63.7889 71.65 63.1065 71.1213 62.5C69.5351 60.9078 67.9488 59.3155 66.3626 57.6475C65.9094 57.1926 65.4562 56.7377 65.3052 56.0553C65.3052 55.8279 65.3052 55.6004 65.3052 55.3729C65.3052 55.2971 65.3806 55.2971 65.3806 55.2213C65.6072 54.4631 66.1359 53.9324 66.8913 53.7807C67.1179 53.7049 67.3445 53.7049 67.4956 53.7049C69.535 53.4016 71.5745 53.0226 73.614 52.7951C74.5959 52.6435 75.2757 52.2643 75.6534 51.3545C76.5598 49.3074 77.5418 47.2603 78.5237 45.2131C78.9014 44.834 79.3545 44.2275 80.1098 44Z", fill: "url(#paint2_linear_61_612)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M34.8048 44C35.0314 44 35.1824 44 35.409 44C36.1643 44.2275 36.6175 44.7582 36.9197 45.4406C37.1463 45.9713 37.373 46.4262 37.5996 46.957C38.3549 48.625 39.1857 50.293 39.941 51.9611C40.2432 52.4918 40.621 52.8709 41.2253 52.9467C41.754 53.0225 42.2828 53.0984 42.736 53.1742C44.6243 53.4775 46.5127 53.7807 48.4011 54.0082C49.1564 54.084 49.685 54.5389 49.9872 55.2213C50.2893 55.9795 50.1382 56.6619 49.6095 57.1926C49.4584 57.4201 49.2318 57.5717 49.0052 57.7992C47.419 59.3914 45.8328 60.9836 44.3221 62.5758C43.8689 63.0307 43.7178 63.5615 43.7934 64.168C44.171 66.7459 44.6243 69.2479 45.002 71.8258C45.1531 72.584 44.9265 73.2664 44.2467 73.7213C43.6424 74.1762 42.9625 74.1762 42.2827 73.7971C40.2433 72.6598 38.2037 71.5225 36.1643 70.3852C35.409 69.9303 34.7292 69.9303 33.9739 70.3852C31.9345 71.5225 29.8195 72.6598 27.7801 73.7971C27.1003 74.1762 26.4959 74.1762 25.8161 73.7213C25.2118 73.2664 24.9097 72.6598 25.0608 71.9016C25.4384 69.4754 25.8162 67.0492 26.2694 64.5471C26.4205 63.7889 26.3449 63.1065 25.8161 62.5C24.2299 60.9078 22.6436 59.3155 21.0574 57.6475C20.6042 57.1926 20.1511 56.7377 20 56.0553C20 55.8279 20 55.6004 20 55.3729C20 55.2971 20.0756 55.2971 20.0756 55.2213C20.3022 54.4631 20.831 53.9324 21.5863 53.7807C21.8129 53.7049 22.0394 53.7049 22.1904 53.7049C24.2299 53.4016 26.2694 53.0226 28.3088 52.7951C29.2907 52.6435 29.9705 52.2643 30.3482 51.3545C31.2546 49.3074 32.2366 47.2603 33.2185 45.2131C33.5962 44.834 33.974 44.2275 34.8048 44Z", fill: "url(#paint3_linear_61_612)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M125.415 44C125.641 44 125.792 44 126.019 44C126.774 44.2275 127.227 44.7582 127.53 45.4406C127.756 45.9713 127.983 46.4262 128.209 46.957C128.965 48.625 129.796 50.293 130.551 51.9611C130.853 52.4918 131.231 52.8709 131.835 52.9467C132.364 53.0225 132.892 53.0984 133.346 53.1742C135.234 53.4775 137.122 53.7807 139.011 54.0082C139.766 54.084 140.295 54.5389 140.597 55.2213C140.899 55.9795 140.748 56.6619 140.219 57.1926C140.068 57.4201 139.842 57.5717 139.615 57.7992C138.029 59.3914 136.443 60.9836 134.932 62.5758C134.479 63.0307 134.328 63.5615 134.403 64.168C134.781 66.7459 135.234 69.2479 135.612 71.8258C135.763 72.584 135.536 73.2664 134.856 73.7213C134.252 74.1762 133.572 74.1762 132.893 73.7971C130.853 72.6598 128.814 71.5225 126.774 70.3852C126.019 69.9303 125.339 69.9303 124.584 70.3852C122.544 71.5225 120.429 72.6598 118.39 73.7971C117.71 74.1762 117.106 74.1762 116.426 73.7213C115.822 73.2664 115.52 72.6598 115.671 71.9016C116.048 69.4754 116.426 67.0492 116.879 64.5471C117.03 63.7889 116.955 63.1065 116.426 62.5C114.84 60.9078 113.253 59.3155 111.667 57.6475C111.214 57.1926 110.761 56.7377 110.61 56.0553C110.61 55.8279 110.61 55.6004 110.61 55.3729C110.61 55.2971 110.685 55.2971 110.685 55.2213C110.912 54.4631 111.441 53.9324 112.196 53.7807C112.423 53.7049 112.649 53.7049 112.8 53.7049C114.84 53.4016 116.879 53.0226 118.919 52.7951C119.901 52.6435 120.58 52.2643 120.958 51.3545C121.864 49.3074 122.846 47.2603 123.828 45.2131C124.206 44.834 124.659 44.2275 125.415 44Z", fill: "url(#paint4_linear_61_612)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_612", x1: "0", y1: "92.0728", x2: "160", y2: "92.0727", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_612", x1: "20", y1: "110.573", x2: "141", y2: "110.573", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_612", x1: "65.3052", y1: "59.0363", x2: "95.4463", y2: "59.0363", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_612", x1: "20", y1: "59.0363", x2: "50.1412", y2: "59.0363", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_612", x1: "110.61", y1: "59.0363", x2: "140.751", y2: "59.0363", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var icon = attributes.icon; var iconsIdle = attributes.iconsIdle; var iconsFilled = attributes.iconsFilled; var summary = attributes.summary; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__.applyFilters)("isProFeature", true); const [isVisible, setIsVisible] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [currentPostContent, setCurrentpostContent] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "content", postId); const [customFields, setCustomFields] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const textSelector = blockClass + " .text"; const iconSelector = blockClass + " .text-icon"; const iconsFilledSelector = blockClass + " .icons-filled"; const iconsIdleSelector = blockClass + " .icons-idle"; const summarySelector = blockClass + " .summary"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; var map = { "{rating_count}": "", // "{review_count}": "", "{average_rating}": "" // "{product_title}": "", }; const [ratingMap, setratingMap] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(map); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var map = { "{rating_count}": summary.options.rating_count, // "{review_count}": res.review_count, "{average_rating}": summary.options.avg_rating // "{product_title}": res.post_title, }; setratingMap(map); }, [summary.options.rating_count, summary.options.avg_rating]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[iconSelector] = icon; blockCssObj[iconsIdleSelector] = iconsIdle; blockCssObj[iconsFilledSelector] = iconsFilled; blockCssObj[summarySelector] = summary; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function replaceAll(str, correction) { Object.keys(correction).forEach(key => { str = str.replaceAll(key, correction[key]); }); return str; } function getMetaField(metaKey) { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_meta", method: "POST", data: { postId: postId, meta_key: metaKey } }).then(res => { if (res["meta_value"] != undefined && res["meta_value"].length > 0) { customFields[metaKey] = res["meta_value"]; setCustomFields({}); setCustomFields(customFields); } }); } var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_11__.applyFilters)("linkToArgs", linkToArgsBasic); const [linkPickerExcerpt, setLinkPickerExcerpt] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [linkPickerText, setLinkPickerText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var iconX = attributes.icon; var iconsIdleX = attributes.iconsIdle; var iconsFilledX = attributes.iconsFilled; var summaryX = attributes.summary; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (summaryX != undefined) { var summaryY = { ...summaryX, options: summary.options }; setAttributes({ summary: summaryY }); blockCssObj[summarySelector] = summaryY; } if (iconsFilledX != undefined) { var iconsFilledY = { ...iconsFilledX, options: iconsFilled.options }; setAttributes({ iconsFilled: iconsFilledY }); blockCssObj[iconsFilledSelector] = iconsFilledY; } if (iconsIdleX != undefined) { var iconsIdleY = { ...iconsIdleX, options: iconsIdle.options }; setAttributes({ iconsIdle: iconsIdleY }); blockCssObj[iconsIdleSelector] = iconsIdleY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function setFieldLinkTo(option, index) { var options = { ...icon.options, linkTo: option.value }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleIconsIdle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconsIdle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconsIdle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconsIdle(sudoScource, key) { var object = myStore.deletePropertyDeep(iconsIdle, [sudoScource, key, breakPointX]); setAttributes({ iconsIdle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconsIdle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconsIdle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconsIdle: object }); } ///// function onChangeStyleIconsFilled(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconsFilled); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconsFilled: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconsFilled(sudoScource, key) { var object = myStore.deletePropertyDeep(iconsFilled, [sudoScource, key, breakPointX]); setAttributes({ iconsFilled: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconsFilled(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconsFilled); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconsFilled: object }); } ///// function onChangeStyleSummary(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, summary); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ summary: object }); var elementSelector = myStore.getElementSelector(sudoScource, summarySelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSummary(sudoScource, key) { var object = myStore.deletePropertyDeep(summary, [sudoScource, key, breakPointX]); setAttributes({ summary: object }); var elementSelector = myStore.getElementSelector(sudoScource, summarySelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSummary(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, summary); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ summary: object }); } function onBulkAddSummary(sudoScource, cssObj) { let obj = Object.assign({}, summary); obj[sudoScource] = cssObj; setAttributes({ summary: obj }); var selector = myStore.getElementSelector(sudoScource, summarySelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetSummary(sudoScources) { let obj = Object.assign({}, summary); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, summarySelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ summary: obj }); } function onBulkAddIconsIdle(sudoScource, cssObj) { let obj = Object.assign({}, iconsIdle); obj[sudoScource] = cssObj; setAttributes({ iconsIdle: obj }); var selector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIconsIdle(sudoScources) { let obj = Object.assign({}, iconsIdle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ iconsIdle: obj }); } function onBulkAddIconsFilled(sudoScource, cssObj) { let obj = Object.assign({}, iconsFilled); obj[sudoScource] = cssObj; setAttributes({ iconsFilled: obj }); var selector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIconsFilled(sudoScources) { let obj = Object.assign({}, iconsFilled); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ iconsFilled: obj }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var [linkAttrItemsText, setlinkAttrItemsText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. var [wrapAttrItems, setwrapAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; icon.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItemsText(sdsd); }, [icon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var sdsd = {}; if (wrapper.options.attr != undefined) { wrapper.options.attr.map(x => { if (x.val) sdsd[x.id] = x.val; }); } setwrapAttrItems(sdsd); }, [wrapper]); var postUrl = icon.options.customUrl != undefined && icon.options.customUrl.length > 0 ? icon.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { htmlFor: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ` ${isVisible ? "pb-6" : ""} transition-all duration-200 w-full flex justify-between items-center relative` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { if (wrapper.options.attr == undefined) { wrapper.options.attr = {}; } var sdsd = wrapper.options.attr.concat({ id: "", val: "" }); if (isProFeature) { setIsVisible(!isVisible); } if (!isProFeature) { var options = { ...wrapper.options, attr: sdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } } }, "Add"), isProFeature && isVisible && // <div className="absolute bottom-2 right-0 pg-bg-color text-white no-underline px-2 rounded-sm py-1 "> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { href: "https://getpostgrid.com/pricing/", target: "_blank", className: "absolute bottom-2 right-0 pg-bg-color text-white hover:text-white no-underline px-2 rounded-sm py-1 " }, "Subscribe to use") // </div> )), wrapper.options.attr != undefined && !isProFeature && wrapper.options.attr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: wrapper.options.attr[i].id, onChange: newVal => { wrapper.options.attr[i].id = newVal; var ssdsd = wrapper.options.attr.concat([]); var options = { ...wrapper.options, attr: ssdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { wrapper.options.attr[i].val = newVal; var ssdsd = wrapper.options.attr.concat([]); var options = { ...wrapper.options, attr: ssdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { wrapper.options.attr.splice(i, 1); var ssdsd = wrapper.options.attr.concat([]); var options = { ...wrapper.options, attr: ssdsd }; setAttributes({ wrapper: { ...wrapper, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Rating?"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { type: "number", step: "0.01", value: summary.options.avg_rating, onChange: newVal => { var options = { ...summary.options, avg_rating: newVal }; setAttributes({ summary: { ...summary, options: options } }); onChangeStyleIconsFilled("styles", parseFloat(newVal) * 20 + "%", "width"); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Rating Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { type: "number", value: summary.options.rating_count, onChange: newVal => { var options = { ...summary.options, rating_count: newVal }; setAttributes({ summary: { ...summary, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, { className: "pb-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.ToggleControl, { label: "Linked to URL?", help: icon.options.isLink ? "Linked to URL?" : "Not Linked.", checked: icon.options.isLink ? true : false, onChange: e => { var options = { ...icon.options, isLink: icon.options.isLink ? false : true }; setAttributes({ icon: { ...icon, options: options } }); } }), icon.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_15__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs // buttonTitle="Choose" , buttonTitle: linkToArgs[icon.options.linkTo] != undefined ? linkToArgs[icon.options.linkTo].label : "Choose", onChange: setFieldLinkTo, values: [] })), icon.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: icon.options.linkToAuthorMeta, onChange: newVal => { var options = { ...icon.options, linkToAuthorMeta: newVal }; setAttributes({ icon: { ...icon, options: options } }); } })), icon.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: icon.options.linkToAuthorMeta, onChange: newVal => { var options = { ...icon.options, linkToAuthorMeta: newVal }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: icon.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...icon.options, linkTarget: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), icon.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: linkPickerText ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], onClick: ev => { setLinkPickerText(prev => !prev); } }), icon.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], onClick: ev => { var options = { ...icon.options, customUrl: "" }; setAttributes({ icon: { ...icon, options: options } }); } }), linkPickerText && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.__experimentalLinkControl, { settings: [], value: icon.options.customUrl, onChange: newVal => { var options = { ...icon.options, customUrl: newVal.url }; setAttributes({ icon: { ...icon, options: options } }); //setLinkPickerText(false) } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", icon.options.customUrl.length != 0 ? icon.options.customUrl : "No link", " ")))), icon.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: ` ${isVisible ? "pb-6" : ""} transition-all duration-200 w-full flex justify-between items-center relative` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = icon.options.linkAttr.concat({ id: "", val: "" }); if (isProFeature) { setIsVisible(!isVisible); } if (!isProFeature) { var options = { ...icon.options, linkAttr: sdsd }; setAttributes({ icon: { ...icon, options: options } }); } } }, "Add"), isProFeature && isVisible && // <div className="absolute bottom-2 right-0 pg-bg-color text-white no-underline px-2 rounded-sm py-1 "> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { href: "https://getpostgrid.com/pricing/", target: "_blank", className: "absolute bottom-2 right-0 pg-bg-color text-white hover:text-white no-underline px-2 rounded-sm py-1 " }, "Subscribe to use") // </div> )), icon.options.linkAttr != undefined && !isProFeature && icon.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: icon.options.linkAttr[i].id, onChange: newVal => { icon.options.linkAttr[i].id = newVal; var ssdsd = icon.options.linkAttr.concat([]); var options = { ...icon.options, linkAttr: ssdsd }; setAttributes({ icon: { ...icon, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { icon.options.linkAttr[i].val = newVal; var ssdsd = icon.options.linkAttr.concat([]); var options = { ...icon.options, linkAttr: ssdsd }; setAttributes({ icon: { ...icon, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { icon.options.linkAttr.splice(i, 1); var ssdsd = icon.options.linkAttr.concat([]); var options = { ...icon.options, linkAttr: ssdsd }; setAttributes({ icon: { ...icon, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons Idle", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: iconsIdle, onChange: onChangeStyleIconsIdle, onAdd: onAddStyleIconsIdle, onRemove: onRemoveStyleIconsIdle, onBulkAdd: onBulkAddIconsIdle, onReset: onResetIconsIdle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons Filled", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: iconsFilled, onChange: onChangeStyleIconsFilled, onAdd: onAddStyleIconsFilled, onRemove: onRemoveStyleIconsFilled, onBulkAdd: onBulkAddIconsFilled, onReset: onResetIconsFilled })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Summary", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.RadioControl, { label: "Summary Type", selected: summary.options.type, options: [{ label: "None", value: "" }, { label: "123 customer reviews", value: "{rating_count} customer reviews" }, { label: "4.50/5.00", value: "{average_rating}/5.00" }, { label: "4.50 out of 5.00", value: "{average_rating} out of 5.00" }, { label: "4.50(123 reviews)", value: "{average_rating}({rating_count} reviews)" }], onChange: value => { var options = { ...summary.options, type: value }; setAttributes({ summary: { ...summary, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Summary", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: summary.options.typeCustom, placeholder: "{average_rating} out of 5.00", onChange: newVal => { var options = { ...summary.options, typeCustom: newVal }; setAttributes({ summary: { ...summary, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", null, "Please use following tags:"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("ul", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("code", null, "{rating_count}")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("code", null, "{average_rating}")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: summary, onChange: onChangeStyleSummary, onAdd: onAddStyleSummary, onRemove: onRemoveStyleSummary, onBulkAdd: onBulkAddSummary, onReset: onResetSummary })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "star-rate", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockReadMore", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "star-rate" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, wrapAttrItems), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: icon.options.class, onClick: handleLinkClick }, linkAttrItemsText, { target: icon.options.linkTarget, href: postUrl }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "icons-idle" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "icons-filled" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }))))), !icon.options.isLink && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-icon" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icons-idle" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "icons-filled" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className={icon.options.class} dangerouslySetInnerHTML: { __html: iconHtml } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "summary" }, summary.options.typeCustom.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, replaceAll(summary.options.type, ratingMap)), summary.options.typeCustom.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, replaceAll(summary.options.typeCustom, ratingMap))), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfix.options.text)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/tabs-nested-item/index.js": /*!**********************************************!*\ !*** ./src/blocks/tabs-nested-item/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./block.json */ "./src/blocks/tabs-nested-item/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_18__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M47.5917 48H0V64.2H47.5917V48Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M8.66189 54C8.76145 54 8.96097 54.1 9.06054 54.2L11.8481 57.5C12.0473 57.7 11.9476 58 11.7485 58.2C11.5494 58.4 11.251 58.3 11.0518 58.1L8.56271 55.2L6.0736 58.1C5.87447 58.3 5.57558 58.3 5.37645 58.2C5.17732 58.1 5.17722 57.7 5.27679 57.5L8.06489 54.2C8.36358 54.1 8.46276 54 8.66189 54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M40.8216 54H15.4326V58.3H40.8216V54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M103.846 48H56.2539V64.2H103.846V48Z", fill: "url(#paint0_linear_61_761)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M64.8167 58.3002C64.7172 58.3002 64.5177 58.2002 64.4181 58.1002L61.6305 54.8002C61.4314 54.6002 61.531 54.3002 61.7301 54.1002C61.9293 53.9002 62.2277 54.0002 62.4268 54.2002L64.9159 57.1002L67.405 54.2002C67.6042 54.0002 67.9031 54.0002 68.1022 54.1002C68.3013 54.3002 68.3014 54.6002 68.2018 54.8002L65.4137 58.1002C65.115 58.2002 64.9163 58.3002 64.8167 58.3002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M96.9759 54H71.5869V58.3H96.9759V54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 48H112.408V64.2H160V48Z", fill: "url(#paint1_linear_61_761)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M120.971 58.3002C120.871 58.3002 120.672 58.2002 120.573 58.1002L117.785 54.8002C117.586 54.6002 117.685 54.3002 117.884 54.1002C118.084 53.9002 118.382 54.0002 118.582 54.2002L121.071 57.1002L123.56 54.2002C123.759 54.0002 124.057 54.0002 124.256 54.1002C124.456 54.3002 124.456 54.6002 124.356 54.8002L121.569 58.1002C121.27 58.2002 121.17 58.3002 120.971 58.3002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M153.13 54H127.741V58.3H153.13V54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M159 74H1V113H159V74Z", fill: "#C15940", stroke: "#8E240B", "stroke-width": "2", "stroke-dasharray": "6 6" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_761", x1: "56.2539", y1: "56.1", x2: "103.846", y2: "56.1", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_761", x1: "112.408", y1: "56.1", x2: "160", y2: "56.1", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var activeTab = context["activeTab"] == undefined ? "" : context["activeTab"]; var uid = attributes.uid; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var navItem = attributes.navItem; var panelWrap = attributes.panelWrap; var icon = attributes.icon; var blockCssY = attributes.blockCssY; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("isProFeature", true); var breakPointX = myStore.getBreakPoint(); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var panelWrapSelector = "." + blockId + "-pg-tabs-panel"; var navItemSelector = "." + blockId + "-nav-item"; var iconSelector = "." + blockId + "-nav-icon"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); if (uid == null || uid.length == 0) { setAttributes({ uid: blockIdX }); } myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; // blockCssObj[wrapperSelector] = wrapper; blockCssObj[panelWrapSelector] = panelWrap; blockCssObj[navItemSelector] = navItem; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); //setAttributes({ uid: clientId }); }, [blockId]); function onChangeStyleNavItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, navItem); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ navItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNavItem(sudoScource, key) { var object = myStore.deletePropertyDeep(navItem, [sudoScource, key, breakPointX]); setAttributes({ navItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNavItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, navItem); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ navItem: object }); } function onChangeStylePanelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, panelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ panelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePanelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(panelWrap, [sudoScource, key, breakPointX]); setAttributes({ panelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePanelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, panelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ panelWrap: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onPickCssLibraryNavItem(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; navItem[sudoScource] = sudoScourceArgs; }); var navItemX = Object.assign({}, navItem); setAttributes({ navItem: navItemX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPanelWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; panelWrap[sudoScource] = sudoScourceArgs; }); var panelWrapX = Object.assign({}, panelWrap); setAttributes({ panelWrap: panelWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; //console.log(iconHtml); setIconHtml(iconHtml); }, [icon]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)(); // useEffect(() => { // if (!uid) { // setAttributes({ uid: clientId }); // } // }, []); //const display = activeTab === uid ? "block" : "none"; const display = activeTab === uid ? "block" : "none"; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Nav Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: navItem.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...navItem.options, tag: newVal }; setAttributes({ navItem: { ...navItem, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: navItem, onChange: onChangeStyleNavItem, onAdd: onAddStyleNavItem, onRemove: onRemoveStyleNavItem })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: navItem, onChange: onPickCssLibraryNavItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Content Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: panelWrap.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...panelWrap.options, tag: newVal }; setAttributes({ panelWrap: { ...panelWrap, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: panelWrap, onChange: onChangeStylePanelWrap, onAdd: onAddStylePanelWrap, onRemove: onRemoveStylePanelWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: panelWrap, onChange: onPickCssLibraryPanelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_22__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: arg => { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Left", value: "left" }, { label: "Right", value: "right" }, { label: "Before", value: "before" }, { label: "After", value: "after" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_17__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: `pg-tabs-panel ${blockId}-pg-tabs-panel ${activeTab === uid ? "pg-tabs-panel-active" : ""}`, "data-tab-id": uid, style: { display } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks, { renderAppender: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.ButtonBlockAppender, null) }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; //const blockProps = useBlockProps.save({}); //const { children, ...innerBlocksProps } = useInnerBlocksProps.save(blockProps); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/tabs-nested/index.js": /*!*****************************************!*\ !*** ./src/blocks/tabs-nested/index.js ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _variations__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./variations */ "./src/blocks/tabs-nested/variations.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/tabs-nested/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); /* harmony import */ var _components_block_variations_picker__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/block-variations-picker */ "./src/components/block-variations-picker/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M47.5917 48H0V64.2H47.5917V48Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M8.66189 54C8.76145 54 8.96097 54.1 9.06053 54.2L11.8481 57.5C12.0473 57.7 11.9476 58 11.7485 58.2C11.5494 58.4 11.251 58.3 11.0518 58.1L8.56271 55.2L6.0736 58.1C5.87447 58.3 5.57558 58.3 5.37645 58.2C5.17732 58.1 5.17722 57.7 5.27679 57.5L8.06489 54.2C8.36358 54.1 8.46276 54 8.66189 54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M40.8216 54H15.4326V58.3H40.8216V54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M103.846 48H56.2539V64.2H103.846V48Z", fill: "url(#paint0_linear_61_760)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M64.8167 58.3002C64.7172 58.3002 64.5177 58.2002 64.4181 58.1002L61.6305 54.8002C61.4314 54.6002 61.531 54.3002 61.7301 54.1002C61.9293 53.9002 62.2277 54.0002 62.4268 54.2002L64.9159 57.1002L67.405 54.2002C67.6042 54.0002 67.9031 54.0002 68.1022 54.1002C68.3013 54.3002 68.3014 54.6002 68.2018 54.8002L65.4137 58.1002C65.115 58.2002 64.9163 58.3002 64.8167 58.3002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M96.9759 54H71.5869V58.3H96.9759V54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 48H112.408V64.2H160V48Z", fill: "url(#paint1_linear_61_760)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M120.971 58.3002C120.871 58.3002 120.672 58.2002 120.573 58.1002L117.785 54.8002C117.586 54.6002 117.685 54.3002 117.884 54.1002C118.084 53.9002 118.382 54.0002 118.582 54.2002L121.071 57.1002L123.56 54.2002C123.759 54.0002 124.057 54.0002 124.256 54.1002C124.456 54.3002 124.456 54.6002 124.356 54.8002L121.569 58.1002C121.27 58.2002 121.17 58.3002 120.971 58.3002Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M153.13 54H127.741V58.3H153.13V54Z", fill: "white" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 74.1001H0V112.8H160V74.1001Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_760", x1: "56.2539", y1: "56.1", x2: "103.846", y2: "56.1", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_760", x1: "112.408", y1: "56.1", x2: "160", y2: "56.1", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var tabs = attributes.tabs; var activeTab = attributes.activeTab; var icon = attributes.icon; var iconToggle = attributes.iconToggle; if (!iconToggle || !iconToggle.options) { // Set default values for iconToggle.options iconToggle = { options: { library: "fontAwesome", srcType: "class", iconSrc: "", class: "icon-toggle" }, styles: {} }; } var navsWrap = attributes.navsWrap; var navItem = attributes.navItem; var activeNavItem = attributes.activeNavItem; var navLabel = attributes.navLabel; var panelWrap = attributes.panelWrap; var blockCssY = attributes.blockCssY; var childBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.select)("core/block-editor").getBlocksByClientId(clientId)[0].innerBlocks; let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); var breakPointX = myStore.getBreakPoint(); const [iconPickerIndex, setIconPickerIndex] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(99); const [iconPickerEnable, setIconPickerEnable] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var navsWrapSelector = blockClass + " .navs-wrapper"; var navItemSelector = blockClass + " .nav-item"; var activeNavItemSelector = blockClass + " .nav-item-active"; var navLabelSelector = blockClass + " .nav-label"; var panelWrapSelector = blockClass + " .panels-wrap"; var navIconSelector = blockClass + " .nav-icon"; var iconToggleSelector = blockClass + " .nav-icon-toggle"; const { replaceInnerBlocks } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useDispatch)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store); const hasInnerBlocks = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.useSelect)(select => select(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.store).getBlocks(clientId).length > 0, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[activeNavItemSelector] = activeNavItem; blockCssObj[navsWrapSelector] = navsWrap; blockCssObj[navItemSelector] = navItem; blockCssObj[navLabelSelector] = navLabel; blockCssObj[panelWrapSelector] = panelWrap; blockCssObj[navIconSelector] = icon; blockCssObj[iconToggleSelector] = iconToggle; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); setTimeout(() => { var tabsX = [...tabs]; childBlocks.map((item, index) => { //tabsX[index].uid = item.clientId; tabsX[index].uid = item.attributes.uid; }); setAttributes({ tabs: tabsX }); }, 1000); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var tabsX = [...tabs]; childBlocks.map((item, index) => { //tabsX[index].uid = item.clientId; tabsX[index].uid = item.attributes.uid; }); setAttributes({ tabs: tabsX }); if (tabsX[0] != undefined && activeTab.length == 0) { setActiveTab(tabsX[0].uid); } }, [childBlocks]); function bulkCssGenerate(cssObj) { var stylesObj = {}; Object.entries(cssObj).map(args => { var selector = args[0]; Object.entries(args[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = x[1]; }); }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onPickBlockVariation(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var itemsX = attributes.items; var navsWrapX = attributes.navsWrap; var navItemX = attributes.navItem; var activeNavItemX = attributes.activeNavItem; var navLabelX = attributes.navLabel; var iconX = attributes.icon; var iconToggleX = attributes.iconToggle; var panelWrapX = attributes.panelWrap; var tabsX = attributes.tabs; var activeTabX = attributes.activeTab; var wrapperX = attributes.wrapper; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemsSelector] = itemsY; } if (navsWrapX != undefined) { var navsWrapY = { ...navsWrapX, options: navsWrap.options }; setAttributes({ navsWrap: navsWrapY }); blockCssObj[navsWrapSelector] = navsWrapY; } if (activeNavItemX != undefined) { var activeNavItemY = { ...activeNavItemX, options: activeNavItem.options }; setAttributes({ activeNavItem: activeNavItemY }); blockCssObj[activeNavItemSelector] = activeNavItemY; } if (navItemX != undefined) { var navItemY = { ...navItemX, options: navItem.options }; setAttributes({ navItem: navItemY }); blockCssObj[navItemSelector] = navItemY; } if (navLabelX != undefined) { var navLabelY = { ...navLabelX, options: navLabel.options }; setAttributes({ navLabel: navLabelY }); blockCssObj[navLabelSelector] = navLabelY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (iconToggleX != undefined) { var iconToggleY = { ...iconToggleX, options: iconToggle.options }; setAttributes({ iconToggle: iconToggleY }); blockCssObj[iconToggleSelector] = iconToggleY; } if (panelWrapX != undefined) { var panelWrapY = { ...panelWrapX, options: panelWrap.options }; setAttributes({ panelWrap: panelWrapY }); blockCssObj[panelWrapSelector] = panelWrapY; } if (tabsX != undefined) { var tabsY = { ...tabsX, options: tabs.options }; setAttributes({ tabs: tabsY }); blockCssObj[tabsSelector] = tabsY; } if (activeTabX != undefined) { var activeTabY = { ...activeTabX, options: activeTab.options }; setAttributes({ activeTab: activeTabY }); blockCssObj[activeTabSelector] = activeTabY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleNavLabel(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, navLabel); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ navLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, navLabelSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNavLabel(sudoScource, key) { var object = myStore.deletePropertyDeep(navLabel, [sudoScource, key, breakPointX]); setAttributes({ navLabel: object }); var elementSelector = myStore.getElementSelector(sudoScource, navLabelSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNavLabel(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, navLabel); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ navLabel: object }); } function onPickCssLibraryNavLabel(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; navLabel[sudoScource] = sudoScourceArgs; }); var navLabelX = Object.assign({}, navLabel); setAttributes({ navLabel: navLabelX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, navLabelSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStylepanelWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, panelWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ panelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylepanelWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(panelWrap, [sudoScource, key, breakPointX]); setAttributes({ panelWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylepanelWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, panelWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ panelWrap: object }); } function onPickCssLibrarypanelWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; panelWrap[sudoScource] = sudoScourceArgs; }); var panelWrapX = Object.assign({}, panelWrap); setAttributes({ panelWrap: panelWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, navIconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, navIconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, navIconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleNavsWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, navsWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ navsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, navsWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNavsWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(navsWrap, [sudoScource, key, breakPointX]); setAttributes({ navsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, navsWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNavsWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, navsWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ navsWrap: object }); } function onPickCssLibraryNavsWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; navsWrap[sudoScource] = sudoScourceArgs; }); var navsWrapX = Object.assign({}, navsWrap); setAttributes({ navsWrap: navsWrapX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, navsWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleNavItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, navItem); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ navItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleNavItem(sudoScource, key) { var object = myStore.deletePropertyDeep(navItem, [sudoScource, key, breakPointX]); setAttributes({ navItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleNavItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, navItem); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ navItem: object }); } function onPickCssLibraryNavItem(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; navItem[sudoScource] = sudoScourceArgs; }); var navItemX = Object.assign({}, navItem); setAttributes({ navItem: navItemX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleActiveNavItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, activeNavItem); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ activeNavItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, activeNavItemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleActiveNavItem(sudoScource, key) { var object = myStore.deletePropertyDeep(activeNavItem, [sudoScource, key, breakPointX]); setAttributes({ activeNavItem: object }); var elementSelector = myStore.getElementSelector(sudoScource, activeNavItemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleActiveNavItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, activeNavItem); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ activeNavItem: object }); } function onPickCssLibraryActiveNavItem(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; activeNavItem[sudoScource] = sudoScourceArgs; }); var activeNavItemX = Object.assign({}, activeNavItem); setAttributes({ activeNavItem: activeNavItemX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, activeNavItemSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } // add bulk style start function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddNavsWrap(sudoScource, cssObj) { let obj = Object.assign({}, navsWrap); obj[sudoScource] = cssObj; setAttributes({ navsWrap: obj }); var selector = myStore.getElementSelector(sudoScource, navsWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddNavItem(sudoScource, cssObj) { let obj = Object.assign({}, navItem); obj[sudoScource] = cssObj; setAttributes({ navItem: obj }); var selector = myStore.getElementSelector(sudoScource, navItemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddActiveNavItem(sudoScource, cssObj) { let obj = Object.assign({}, activeNavItem); obj[sudoScource] = cssObj; setAttributes({ activeNavItem: obj }); var selector = myStore.getElementSelector(sudoScource, activeNavItemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddNavLabel(sudoScource, cssObj) { let obj = Object.assign({}, navLabel); obj[sudoScource] = cssObj; setAttributes({ navLabel: obj }); var selector = myStore.getElementSelector(sudoScource, navLabelSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPanelWrap(sudoScource, cssObj) { let obj = Object.assign({}, panelWrap); obj[sudoScource] = cssObj; setAttributes({ panelWrap: obj }); var selector = myStore.getElementSelector(sudoScource, panelWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // add bulk style end // reset bulk style start function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetNavsWrap(sudoScources) { let obj = Object.assign({}, navsWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, navsWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ navsWrap: obj }); } function onResetNavItem(sudoScources) { let obj = Object.assign({}, navItem); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, navItemSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ navItem: obj }); } function onResetActiveNavItem(sudoScources) { let obj = Object.assign({}, activeNavItem); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, activeNavItemSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ activeNavItem: obj }); } function onResetNavLabel(sudoScources) { let obj = Object.assign({}, navLabel); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, navLabelSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ navLabel: obj }); } function onResetPanelWrap(sudoScources) { let obj = Object.assign({}, panelWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, panelWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ panelWrap: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, navIconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } // reset bulk style end const ALLOWED_BLOCKS = ["post-grid/tabs-nested-item"]; const MY_TEMPLATE = [["post-grid/tabs-nested-item", {}], ["post-grid/tabs-nested-item", {}]]; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class} ` }); const innerBlocksProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useInnerBlocksProps)(blockProps, { allowedBlocks: ALLOWED_BLOCKS, __experimentalDirectInsert: true, //template: MY_TEMPLATE, templateInsertUpdatesSelection: true }); const setActiveTab = uid => { setAttributes({ activeTab: uid }); //const parentBlock = select("core/block-editor").getBlock(clientId); // parentBlock.innerBlocks.forEach((innerBlock) => { // dispatch("core/block-editor").updateBlockAttributes( // innerBlock.clientId, // { // activeTab: uid, // } // ); // }); }; const addNewTab = () => { const tab = (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/tabs-nested-item"); const position = tabs.length; (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").insertBlock(tab, position, clientId); wp.data.dispatch("core/block-editor").selectBlock(clientId); setAttributes({ tabs: [...tabs, { uid: tab.clientId, title: `Tab ${tabs.length + 1}`, icon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" } }] }); //setActiveTab(now); }; const tabTitleChange = newValue => { setAttributes({ tabs: [...tabs.map(t => { return t.uid === activeTab ? { ...t, title: newValue } : t; })] }); }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (tabs.length && !activeTab) { //setActiveTab(tabs[0].uid); } }, [tabs]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 mx-3" // className="bg-blue-600 mx-3 my-2 cursor-pointer hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded" , onClick: ev => { addNewTab(); } }, "Add Item"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Navs Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: navsWrap, onChange: onChangeStyleNavsWrap, onAdd: onAddStyleNavsWrap, onRemove: onRemoveStyleNavsWrap, onBulkAdd: onBulkAddNavsWrap, onReset: onResetNavsWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: navsWrap, onChange: onPickCssLibraryNavsWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Nav Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: navItem, onChange: onChangeStyleNavItem, onAdd: onAddStyleNavItem, onRemove: onRemoveStyleNavItem, onBulkAdd: onBulkAddNavItem, onReset: onResetNavItem })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: navItem, onChange: onPickCssLibraryNavItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Active Nav Item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: activeNavItem, onChange: onChangeStyleActiveNavItem, onAdd: onAddStyleActiveNavItem, onRemove: onRemoveStyleActiveNavItem, onBulkAdd: onBulkAddActiveNavItem, onReset: onResetActiveNavItem })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: activeNavItem, onChange: onPickCssLibraryActiveNavItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Nav Label", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: navLabel, onChange: onChangeStyleNavLabel, onAdd: onAddStyleNavLabel, onRemove: onRemoveStyleNavLabel, onBulkAdd: onBulkAddNavLabel, onReset: onResetNavLabel })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: navLabel, onChange: onPickCssLibraryNavLabel })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Content Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: panelWrap, onChange: onChangeStylepanelWrap, onAdd: onAddStylepanelWrap, onRemove: onRemoveStylepanelWrap, onBulkAdd: onBulkAddPanelWrap, onReset: onResetPanelWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: panelWrap, onChange: onPickCssLibrarypanelWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Nav Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: arg => { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Toggled Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: iconToggle.options.library, srcType: iconToggle.options.srcType, iconSrc: iconToggle.options.iconSrc, onChange: arg => { var options = { ...iconToggle.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ iconToggle: { ...iconToggle, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before", value: "before" }, { label: "After", value: "after" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "tabs-nested", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "tabs-nested" })))), !hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, innerBlocksProps, { className: "flex justify-center my-4" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border border-solid border-gray-300 w-[95%] rounded-md p-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xl rounded-sm" }, "Click to pick a variation"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-bg-color rounded-sm px-4 py-1 font-semibold text-lg text-white cursor-pointer", onClick: ev => { replaceInnerBlocks(clientId, (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlocksFromInnerBlocksTemplate)([["post-grid/tabs-nested-item", {}]]), true); } }, "Skip")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_block_variations_picker__WEBPACK_IMPORTED_MODULE_25__["default"], { blockName: "tabs-nested", blockId: blockId, clientId: clientId, onChange: onPickBlockVariation })))), hasInnerBlocks && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", innerBlocksProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " navs-wrapper " }, tabs.map((tab, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { key: tab.uid, className: ` ${tab.uid === activeTab ? " nav-item-active nav-item " : `nav-item pg${tab.uid.split("-").pop()}-nav-item`}`, role: "tab", tabIndex: index, onClick: () => setActiveTab(tab.uid) }, icon.options.position == "before" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, tab.uid == activeTab ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (tab.iconToggle?.iconSrc != undefined || tab.iconToggle?.iconSrc.length != 0) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-icon", onClick: ev => { setIconPickerIndex(index); setIconPickerEnable(!iconPickerEnable); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: iconToggle.options?.iconSrc }))) : (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (tab.icon.iconSrc != undefined || tab.icon.iconSrc.length != 0) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-icon", onClick: ev => { setIconPickerIndex(index); setIconPickerEnable(!iconPickerEnable); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.iconSrc }))), iconPickerEnable && iconPickerIndex != index && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-icon", onClick: ev => { setIconPickerIndex(index); setIconPickerEnable(!iconPickerEnable); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: tab.icon.iconSrc })), iconPickerIndex == index && iconPickerEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: tab.icon.library, srcType: tab.icon.srcType, iconSrc: tab.icon.iconSrc, onChange: arg => { tabs[index].icon = { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ tabs: tabs }); setIconPickerEnable(!iconPickerEnable); setIconPickerIndex(99); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, { className: " nav-label", tagName: "div", value: tab.title, onChange: tabTitleChange }), icon.options.position == "after" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, tab.icon.iconSrc == undefined || tab.icon.iconSrc.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-icon", onClick: ev => { setIconPickerIndex(index); setIconPickerEnable(!iconPickerEnable); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.iconSrc })), iconPickerEnable && iconPickerIndex != index && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-icon", onClick: ev => { setIconPickerIndex(index); setIconPickerEnable(!iconPickerEnable); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: tab.icon.iconSrc })), iconPickerIndex == index && iconPickerEnable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: tab.icon.library, srcType: tab.icon.srcType, iconSrc: tab.icon.iconSrc, onChange: arg => { tabs[index].icon = { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ tabs: tabs }); setIconPickerEnable(!iconPickerEnable); setIconPickerIndex(99); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { fill: "red", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], onClick: ev => { var tabX = [...tabs]; tabX.splice(index, 1); setAttributes({ tabs: tabX }); (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_4__.dispatch)("core/block-editor").removeBlock(tabs[index].uid); setActiveTab(tabX[0].uid); } })); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-item ", onClick: addNewTab }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "nav-icon" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], { fill: "#ddd", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "panels-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks, { allowedBlocks: ["post-grid/tabs-nested-item"], renderAppender: false })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file var attributes = props.attributes; var blockId = attributes.blockId; var wrapper = attributes.wrapper; const blockProps = _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps.save({ className: ` ${blockId} {wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InnerBlocks.Content, null); //return null; } }); /***/ }), /***/ "./src/blocks/tabs-nested/variations.js": /*!**********************************************!*\ !*** ./src/blocks/tabs-nested/variations.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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__); /** * WordPress dependencies */ /** * Template option choices for predefined columns layouts. */ const variations = [{ name: "preset-1", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-1"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "start" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 5px 0px 0px" }, justifyContent: {}, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 5px 0px 0px" }, alignItems: { Desktop: "center" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-right", position: "before", class: "nav-icon nav-icon-idle" }, styles: { fontSize: { Desktop: "20px" } } }, iconToggle: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "nav-icon-toggle nav-icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 169.7" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M19.71,13.65a1.07,1.07,0,0,1,.82.38L27,21.61a1.08,1.08,0,0,1-.11,1.52A1.09,1.09,0,0,1,25.39,23l-5.68-6.63L14,23a1.09,1.09,0,0,1-1.53.11,1.07,1.07,0,0,1-.12-1.52L18.89,14A1.08,1.08,0,0,1,19.71,13.65Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "35.26", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "128.7", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M148.41,23.4a1.1,1.1,0,0,1-.82-.38l-6.5-7.58A1.09,1.09,0,0,1,142.74,14l5.67,6.62L154.09,14a1.08,1.08,0,1,1,1.64,1.41L149.23,23A1.07,1.07,0,0,1,148.41,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "163.96", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "257.4", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M277.11,23.4a1.1,1.1,0,0,1-.82-.38l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L282.79,14a1.08,1.08,0,1,1,1.64,1.41L277.93,23A1.07,1.07,0,0,1,277.11,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "292.66", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "37.04", width: "500", height: "132.66" })) }, { name: "preset-2", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-2"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-2"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "center" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 5px 0px 0px" }, justifyContent: {}, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 5px 0px 0px" }, alignItems: { Desktop: "center" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 169.7" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "66.75", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M86.46,13.65a1.07,1.07,0,0,1,.82.38l6.5,7.58a1.08,1.08,0,0,1-.11,1.52A1.09,1.09,0,0,1,92.14,23l-5.68-6.63L80.78,23a1.08,1.08,0,0,1-1.64-1.41L85.64,14A1.07,1.07,0,0,1,86.46,13.65Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "102.01", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "195.45", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M215.16,23.4a1.08,1.08,0,0,1-.82-.38l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L220.84,14a1.08,1.08,0,1,1,1.64,1.41L216,23A1.07,1.07,0,0,1,215.16,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "230.71", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "324.15", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M343.86,23.4A1.08,1.08,0,0,1,343,23l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L349.54,14a1.08,1.08,0,1,1,1.64,1.41L344.68,23A1.07,1.07,0,0,1,343.86,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "359.41", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "37.04", width: "500", height: "132.66" })) }, { name: "preset-3", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-3"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-3"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "end" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 5px 0px 0px" }, justifyContent: {}, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 5px 0px 0px" }, alignItems: { Desktop: "center" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 169.7" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "133.5", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M153.21,13.65A1.07,1.07,0,0,1,154,14l6.5,7.58A1.08,1.08,0,0,1,158.89,23l-5.68-6.63L147.53,23a1.08,1.08,0,0,1-1.64-1.41l6.5-7.58A1.07,1.07,0,0,1,153.21,13.65Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "168.76", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "262.2", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M281.91,23.4a1.07,1.07,0,0,1-.82-.38l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L287.59,14a1.07,1.07,0,0,1,1.52-.12,1.08,1.08,0,0,1,.12,1.53L282.73,23A1.07,1.07,0,0,1,281.91,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "297.46", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "390.9", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M410.61,23.4a1.07,1.07,0,0,1-.82-.38l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L416.29,14a1.07,1.07,0,0,1,1.52-.12,1.08,1.08,0,0,1,.12,1.53L411.43,23A1.07,1.07,0,0,1,410.61,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "426.16", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "37.04", width: "500", height: "132.66" })) }, { name: "preset-4", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-4"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-4"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "space-between" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 5px 0px 0px" }, justifyContent: {}, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 5px 0px 0px" }, alignItems: { Desktop: "center" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 169.7" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "37.04", width: "500", height: "132.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M19.71,13.65a1.07,1.07,0,0,1,.82.38L27,21.61a1.08,1.08,0,0,1-.11,1.52A1.09,1.09,0,0,1,25.39,23l-5.68-6.63L14,23a1.09,1.09,0,0,1-1.53.11,1.07,1.07,0,0,1-.12-1.52L18.89,14A1.08,1.08,0,0,1,19.71,13.65Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "35.26", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "195.45", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M215.16,23.4a1.08,1.08,0,0,1-.82-.38l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L220.84,14a1.08,1.08,0,1,1,1.64,1.41L216,23A1.07,1.07,0,0,1,215.16,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "230.71", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "390.9", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M410.61,23.4a1.07,1.07,0,0,1-.82-.38l-6.5-7.58a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L416.29,14a1.07,1.07,0,0,1,1.52-.12,1.08,1.08,0,0,1,.12,1.53L411.43,23A1.07,1.07,0,0,1,410.61,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "426.16", y: "13.65", width: "58.16", height: "9.75" })) }, { name: "preset-5", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-5"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-5"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "flex" }, justifyContent: { Desktop: "space-around" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 5px 0px 0px" }, justifyContent: {}, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 5px 0px 0px" }, alignItems: { Desktop: "center" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 169.7" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", y: "37.04", width: "500", height: "132.66" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "24.4", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M44.11,13.65a1.07,1.07,0,0,1,.82.38l6.5,7.58A1.08,1.08,0,0,1,49.79,23l-5.68-6.63L38.43,23a1.08,1.08,0,0,1-1.64-1.41L43.29,14A1.07,1.07,0,0,1,44.11,13.65Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "59.66", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "198", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M217.71,23.4a1.1,1.1,0,0,1-.82-.38l-6.5-7.58A1.09,1.09,0,0,1,212,14l5.67,6.62L223.39,14A1.09,1.09,0,1,1,225,15.44L218.54,23A1.1,1.1,0,0,1,217.71,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "233.26", y: "13.65", width: "58.16", height: "9.75" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "371.61", width: "109.1", height: "37.04" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M391.32,23.4a1.07,1.07,0,0,1-.82-.38L384,15.44a1.08,1.08,0,0,1,.12-1.53,1.07,1.07,0,0,1,1.52.12l5.68,6.62L397,14a1.07,1.07,0,0,1,1.52-.12,1.08,1.08,0,0,1,.12,1.53L392.14,23A1.07,1.07,0,0,1,391.32,23.4Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "406.87", y: "13.65", width: "58.16", height: "9.75" })) }, { name: "preset-6", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-6"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-6"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: { display: { Desktop: "flex" } } }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "block" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 0px 0px 0px" }, width: { Desktop: "250px" }, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 0px 0px 0px" }, alignItems: { Desktop: "center" }, width: { Desktop: "250px" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { width: { Desktop: "100%" }, backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 132.66" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", width: "152.68", height: "34.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M18.17,12.58a1,1,0,0,1,.76.35l6,7a1,1,0,1,1-1.51,1.3l-5.24-6.1-5.23,6.1a1,1,0,1,1-1.52-1.3l6-7A1,1,0,0,1,18.17,12.58Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "32.51", y: "12.58", width: "53.63", height: "8.99" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "49.17", width: "152.68", height: "34.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M18.17,70.75a1,1,0,0,1-.75-.35l-6-7a1,1,0,1,1,1.52-1.3l5.23,6.1,5.24-6.1a1,1,0,1,1,1.51,1.3l-6,7A1,1,0,0,1,18.17,70.75Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "32.51", y: "61.76", width: "53.63", height: "8.99" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", y: "98.35", width: "152.68", height: "34.15" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M18.17,119.92a1,1,0,0,1-.75-.35l-6-7a1,1,0,1,1,1.52-1.3l5.23,6.11,5.24-6.11a1,1,0,1,1,1.51,1.3l-6,7A1,1,0,0,1,18.17,119.92Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "32.51", y: "110.93", width: "53.63", height: "8.99" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "131.21", width: "368.79", height: "132.66" })) }, { name: "preset-7", title: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-7"), description: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_1__.__)("preset-7"), isPro: false, atts: { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: { display: { Desktop: "flex" } } }, navsWrap: { options: { class: "" }, styles: { display: { Desktop: "block" }, order: { Desktop: "10" } } }, navItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { display: { Desktop: "flex" }, color: { Desktop: "#ffffff" }, padding: { Desktop: "5px 15px 5px 15px" }, backgroundColor: { Desktop: "#3236ff" }, margin: { Desktop: "0px 0px 0px 0px" }, width: { Desktop: "250px" }, alignItems: { Desktop: "center" }, cursor: { Desktop: "pointer" } } }, activeNavItem: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { backgroundColor: { Desktop: "#afb1ff" }, display: { Desktop: "flex" }, padding: { Desktop: "5px 15px 5px 15px" }, margin: { Desktop: "0px 0px 0px 0px" }, alignItems: { Desktop: "center" }, width: { Desktop: "250px" } } }, navLabel: { options: { viewType: "horizontal", position: "left", class: "", activeTab: "" }, styles: { padding: { Desktop: "0px 10px 0px 10px" } } }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: { fontSize: { Desktop: "20px" } } }, panelWrap: { options: { class: "" }, styles: { width: { Desktop: "100%" }, backgroundColor: { Desktop: "#afb1ff" }, padding: { Desktop: "10px 10px 10px 10px" }, margin: { Desktop: "0px 0px 0px 0px" } } } }, innerBlocks: [["post-grid/tabs-nested-item", { wrapper: { options: { tag: "div", class: "pg-tabs" }, styles: {} }, content: { options: { tag: "div", class: "" }, styles: {} }, header: { options: { text: "Accordion Header", tag: "div", class: "" }, styles: {} }, icon: { options: { library: "fontAwesome", srcType: "class", iconSrc: "fas fa-angle-down", position: "before", class: "icon" }, styles: {} }, title: "Tab 1" }]], scope: ["block"], icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 500 132.66" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "347.29", width: "152.69", height: "34.15", transform: "translate(847.27 34.15) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#3c3c3b", d: "M481.8,12.58a1,1,0,0,0-.76.35l-6,7a1,1,0,1,0,1.52,1.3l5.23-6.1,5.24,6.1a1,1,0,0,0,1.4.11,1,1,0,0,0,.11-1.41l-6-7A1,1,0,0,0,481.8,12.58Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "413.84", y: "12.58", width: "53.63", height: "8.99", transform: "translate(881.31 34.15) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "347.29", y: "49.18", width: "152.69", height: "34.15", transform: "translate(847.27 132.51) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M481.8,70.75a1,1,0,0,0,.76-.35l6-7a1,1,0,0,0-.11-1.41,1,1,0,0,0-1.4.11l-5.24,6.1-5.23-6.1a1,1,0,1,0-1.52,1.3l6,7A1,1,0,0,0,481.8,70.75Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "413.84", y: "61.76", width: "53.63", height: "8.99", transform: "translate(881.31 132.51) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#3c3c3b", x: "347.29", y: "98.35", width: "152.69", height: "34.15", transform: "translate(847.27 230.86) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#ffffff", d: "M481.8,119.92a1,1,0,0,0,.76-.34l6-7a1,1,0,0,0-.11-1.41,1,1,0,0,0-1.4.11l-5.24,6.1-5.23-6.1a1,1,0,1,0-1.52,1.3l6,7A1,1,0,0,0,481.8,119.92Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "413.84", y: "110.94", width: "53.63", height: "8.99", transform: "translate(881.31 230.86) rotate(-180)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#ffffff", x: "0.02", width: "368.8", height: "132.66" })) }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (variations); /***/ }), /***/ "./src/blocks/tabs/index.js": /*!**********************************!*\ !*** ./src/blocks/tabs/index.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./block.json */ "./src/blocks/tabs/block.json"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_17__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M19.3872 3.62674H3.62677C2.66363 3.62674 1.87561 4.41476 1.87561 5.3779V17.636C1.87561 18.5991 2.66363 19.3872 3.62677 19.3872H19.3872C20.3503 19.3872 21.1383 18.5991 21.1383 17.636V5.3779C21.1383 4.41476 20.3503 3.62674 19.3872 3.62674ZM18.5116 17.636H4.50235C4.02078 17.636 3.62677 17.242 3.62677 16.7604V6.25348C3.62677 5.77191 4.02078 5.3779 4.50235 5.3779H12.3826V8.00463C12.3826 8.4862 12.7766 8.88021 13.2581 8.88021H19.3872V16.7604C19.3872 17.242 18.9932 17.636 18.5116 17.636Z" })) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var items = attributes.items; var wrapper = attributes.wrapper; var headerWrap = attributes.headerWrap; var header = attributes.header; var headerActive = attributes.headerActive; var content = attributes.content; var icon = attributes.icon; var iconToggle = attributes.iconToggle; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [isOpen, setisOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors var wrapperSelector = blockClass; var headerWrapSelector = blockClass + " .tabs-navs"; var headerSelector = blockClass + " .tab-nav"; var headerActiveSelector = blockClass + " .tab-nav.active"; var contentSelector = blockClass + " .pg-accordion-content"; const iconSelector = blockClass + " .icon-wrap"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [iconToggleHtml, setIconToggleHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = iconToggle.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconToggleHtml(iconHtml); }, [iconToggle]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeIconToggle(arg) { var options = { ...iconToggle.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ iconToggle: { ...iconToggle, options: options } }); } function onPickCssLibraryHeader(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; header[sudoScource] = sudoScourceArgs; }); var headerX = Object.assign({}, header); setAttributes({ header: headerX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryContent(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; content[sudoScource] = sudoScourceArgs; }); var contentX = Object.assign({}, content); setAttributes({ content: contentX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleHeaderWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, headerWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ headerWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeaderWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(headerWrap, [sudoScource, key, breakPointX]); setAttributes({ headerWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeaderWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, headerWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ headerWrap: object }); } function onChangeStyleHeader(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, header); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeader(sudoScource, key) { var object = myStore.deletePropertyDeep(header, [sudoScource, key, breakPointX]); setAttributes({ header: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeader(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, header); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ header: object }); } function onChangeStyleContent(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, content); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleContent(sudoScource, key) { var object = myStore.deletePropertyDeep(content, [sudoScource, key, breakPointX]); setAttributes({ content: object }); var elementSelector = myStore.getElementSelector(sudoScource, contentSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleContent(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, content); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ content: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleHeaderActive(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, headerActive); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ headerActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleHeaderActive(sudoScource, key) { var object = myStore.deletePropertyDeep(headerActive, [sudoScource, key, breakPointX]); setAttributes({ headerActive: object }); var elementSelector = myStore.getElementSelector(sudoScource, headerActiveSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleHeaderActive(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, headerActive); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ headerActive: object }); } function onBulkAddHeaderWrap(sudoScource, cssObj) { let obj = Object.assign({}, headerWrap); obj[sudoScource] = cssObj; setAttributes({ headerWrap: obj }); var selector = myStore.getElementSelector(sudoScource, headerWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} pg-tabs` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.BlockControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.AlignmentToolbar, { value: wrapper.styles.textAlign, onChange: newVal => { var newValuesObj = {}; if (Object.keys(wrapper.styles.textAlign).length == 0) { newValuesObj[breakPointX] = newVal; } else { newValuesObj = wrapper.styles.textAlign; newValuesObj[breakPointX] = newVal; } var styles = { ...wrapper.styles, textAlign: newValuesObj }; setAttributes({ wrapper: { ...wrapper, styles: styles } }); var itemsX = { ...blockCssY.items }; itemsX[wrapperSelector] = { ...blockCssY.items[wrapperSelector], "text-align": newValuesObj }; setAttributes({ blockCssY: { items: itemsX } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text", title: "header", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Navs Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: headerWrap, onChange: onChangeStyleHeaderWrap, onAdd: onAddStyleHeaderWrap, onBulkAdd: onBulkAddHeaderWrap, onRemove: onRemoveStyleHeaderWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Navs", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: header.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...header.options, tag: newVal }; setAttributes({ header: { ...header, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: header, onChange: onChangeStyleHeader, onAdd: onAddStyleHeader, onRemove: onRemoveStyleHeader })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: header, onChange: onPickCssLibraryHeader })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Navs - Active", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: headerActive, onChange: onChangeStyleHeaderActive, onAdd: onAddStyleHeaderActive, onRemove: onRemoveStyleHeaderActive })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Content", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: content.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...content.options, tag: newVal }; setAttributes({ content: { ...content, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: content, onChange: onChangeStyleContent, onAdd: onAddStyleContent, onRemove: onRemoveStyleContent })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: content, onChange: onPickCssLibraryContent })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_13__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Toggled Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_12__["default"], { library: iconToggle.options.library, srcType: iconToggle.options.srcType, iconSrc: iconToggle.options.iconSrc, onChange: onChangeIconToggle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Header Text", value: "beforeHeader" }, { label: "After Header Text", value: "afterHeader" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Enable Icon Toggle"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_5__.SelectControl, { label: "", value: icon.options.enableToggle, options: [{ label: "Yes", value: "yes" }, { label: "No", value: "no" }], onChange: newVal => { var options = { ...icon.options, enableToggle: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_15__["default"], { obj: wrapper, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_14__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_10__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_11__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_18__["default"], { slug: "tabs" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 p-2 px-5 text-white text-center my-4 cursor-pointer", onClick: ev => { var itemx = items.concat({ isActive: false, headerText: "What is Lorem Ipsum?", content: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.", icon: "", iconToggle: "", styles: {} }); setAttributes({ items: itemx }); } }, "Add"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: headerWrap.options.class }, items.map((item, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `inline-block cursor-pointer ${headerActive.options.activeIndex == i ? "active" : ""} ${header.options.class}`, onClick: ev => { var options = { ...headerActive.options, activeIndex: i }; setAttributes({ headerActive: { ...headerActive, options: options } }); } }, icon.options.position == "beforeHeader" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, icon.options.enableToggle == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, headerActive.options.activeIndex != i && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap ", dangerouslySetInnerHTML: { __html: iconHtml } }), headerActive.options.activeIndex == i && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap ", dangerouslySetInnerHTML: { __html: iconToggleHtml } })), icon.options.enableToggle == "no" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap ", dangerouslySetInnerHTML: { __html: iconHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.RichText, { tagName: "span", value: item.headerText, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { items[i].headerText = content; var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Start Writing...") }), icon.options.position == "afterHeader" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, icon.options.enableToggle == "yes" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, headerActive.options.activeIndex != i && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap float-right", dangerouslySetInnerHTML: { __html: iconHtml } }), headerActive.options.activeIndex == i && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap float-right", dangerouslySetInnerHTML: { __html: iconToggleHtml } })), icon.options.enableToggle == "no" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-wrap float-right", dangerouslySetInnerHTML: { __html: iconHtml } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-lg cursor-pointer px-2 text-red-500 py-1 float-right icon-close", onClick: ev => { items.splice(i, 1); var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); ev.preventDefault(); } }))); })), items.map((item, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, headerActive.options.activeIndex == i && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.RichText, { className: content.options.class, tagName: "div", value: item.content, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { items[i].content = content; var ssdsd = items.concat([]); setAttributes({ items: ssdsd }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_2__.__)("Start Writing...") })); })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; //return null; } }); /***/ }), /***/ "./src/blocks/terms-list/index.js": /*!****************************************!*\ !*** ./src/blocks/terms-list/index.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_icon_toggle__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/icon-toggle */ "./src/components/icon-toggle/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _query_presets__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./query-presets */ "./src/blocks/terms-list/query-presets.js"); /* harmony import */ var _queryprams__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./queryprams */ "./src/blocks/terms-list/queryprams.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./block.json */ "./src/blocks/terms-list/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_input_select__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/input-select */ "./src/components/input-select/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_5__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_23__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M69.3335 61H0V78.3334H69.3335V61Z", fill: "url(#paint0_linear_61_610)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M9.33389 71.6666L5.77832 68.1111C5.77832 68.1111 5.77832 67.6666 5.77832 67.2222C5.77832 67.2222 6.22277 67.2222 6.66721 67.2222L9.33389 70.3333L12.0006 67.2222C12.0006 67.2222 12.445 66.7777 12.8895 67.2222C12.8895 67.2222 13.3339 67.6666 12.8895 68.1111L9.33389 71.6666Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.3339 67.2224H18.2227V71.6669H61.3339V67.2224Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 61H90.6665V78.3334H160V61Z", fill: "url(#paint1_linear_61_610)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M99.9999 71.6666L96.4443 68.1111C96.4443 68.1111 96.4443 67.6666 96.4443 67.2222C96.4443 67.2222 96.8888 67.2222 97.3332 67.2222L99.9999 70.3333L102.667 67.2222C102.667 67.2222 103.111 66.7777 103.555 67.2222C103.555 67.2222 104 67.6666 103.555 68.1111L99.9999 71.6666Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M152 67.2224H108.889V71.6669H152V67.2224Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M69.3335 92.5554H0V109.889H69.3335V92.5554Z", fill: "url(#paint2_linear_61_610)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M9.33389 103.667L5.77832 100.111C5.77832 100.111 5.77832 99.6666 5.77832 99.2222C5.77832 99.2222 6.22277 99.2222 6.66721 99.2222L9.33389 102.333L12.0006 99.2222C12.0006 99.2222 12.445 98.7777 12.8895 99.2222C12.8895 99.2222 13.3339 99.6666 12.8895 100.111L9.33389 103.667Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M61.3339 98.7778H18.2227V103.222H61.3339V98.7778Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 92.5554H90.6665V109.889H160V92.5554Z", fill: "url(#paint3_linear_61_610)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M99.9999 103.667L96.4443 100.111C96.4443 100.111 96.4443 99.6666 96.4443 99.2222C96.4443 99.2222 96.8888 99.2222 97.3332 99.2222L99.9999 102.333L102.667 99.2222C102.667 99.2222 103.111 98.7777 103.555 99.2222C103.555 99.2222 104 99.6666 103.555 100.111L99.9999 103.667Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M152 98.7778H108.889V103.222H152V98.7778Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_610", x1: "0", y1: "69.6667", x2: "69.3335", y2: "69.6667", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_610", x1: "90.6665", y1: "69.6667", x2: "160", y2: "69.6667", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_610", x1: "0", y1: "101.222", x2: "69.3335", y2: "101.222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_610", x1: "90.6665", y1: "101.222", x2: "160", y2: "101.222", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var items = attributes.items; var separator = attributes.separator; var frontText = attributes.frontText; var icon = attributes.icon; var blockCssY = attributes.blockCssY; var queryArgs = attributes.queryArgs; var utmTracking = attributes.utmTracking; var termTitle = attributes.termTitle; var postCount = attributes.postCount; var taxonomies = attributes.taxonomies; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); const [postObjects, setPostObjects] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const itemsSelector = blockClass + " .item"; const termTitleSelector = blockClass + " .termTitle"; const separatorSelector = blockClass + " .separator"; const frontTextSelector = blockClass + " .frontText"; const postCountSelector = blockClass + " .postCount"; const iconSelector = blockClass + " .icon"; var breakPointList = []; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ postTitle: postTitle }); // setAttributes({ wrapper: wrapper }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/post-grid/v2/post_type_objects", method: "POST", data: { postTypes: [postType] } }).then(res => { // console.log(res); setPostObjects(res); }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemsSelector] = items; blockCssObj[termTitleSelector] = termTitle; blockCssObj[separatorSelector] = separator; blockCssObj[frontTextSelector] = frontText; blockCssObj[postCountSelector] = postCount; blockCssObj[iconSelector] = icon; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var itemX = { ...blockCssY.items, ...blockCssRules }; setAttributes({ blockCssY: { items: itemX } }); }, [blockId]); const [categories, setCategories] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [taxonomy, setTaxonomy] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); function fetchTerms() { // setIsBusy(true); var arg = queryArgs.items.map(item => { return { id: item.id, val: item.val }; }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/post-grid/v2/get_terms", method: "POST", data: { queryArgs: arg } }).then(res => { // setIsBusy(false); if (res.posts !== undefined) { setCategories(res.posts); } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { fetchTerms(); function hasId(id) { return queryArgs.items.some(item => item.id === id); } // Check if 'taxonomy' ID exists in the 'items' array const hasTaxonomy = hasId("taxonomy"); if (hasTaxonomy) { setTaxonomy(true); } else { setTaxonomy(false); } }, [queryArgs]); const [categoryCount, setcategoryCount] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(0); // Using the hook. const [postCategoriesData, setPostCategoriesData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); // Using the hook. const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [postCategoriesX, setPostCategoriesX] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, taxonomies.options.taxName, postId); var linkToArgsBasic = { noUrl: { label: "No URL", value: "" }, termUrl: { label: "Term URL", value: "termUrl" } // postUrl: { label: "Post URL", value: "postUrl" }, // homeUrl: { label: "Home URL", value: "homeUrl" }, // authorUrl: { label: "Author URL", value: "authorUrl" }, // authorLink: { label: "Author Link", value: "authorLink" }, // authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, // authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, // customField: { label: "Custom Field", value: "customField", isPro: true }, // customUrl: { label: "Custom URL", value: "customUrl", isPro: true }, }; // let linkToArgs = applyFilters("linkToArgs", linkToArgsBasic); // let linkToArgs = applyFilters("linkToArgTerms", linkToArgsBasic); let linkToArgs = linkToArgsBasic; function setFieldLinkTo(option, index) { var options = { ...items.options, linkTo: option.value }; setAttributes({ items: { ...items, options: options } }); } var dummyCats = [{ id: 1, count: 1, description: "", link: "#", name: "Category 1", slug: "category-1", taxonomy: "category_tax" }, { id: 2, count: 1, description: "", link: "#", name: "Category 2", slug: "category-2", taxonomy: "category_tax", children: [{ id: 21, count: 1, description: "", link: "#", name: "Child Category 1", slug: "category-3", taxonomy: "category_tax" }, { id: 22, count: 1, description: "", link: "#", name: "Child Category 2", slug: "category-3", taxonomy: "category_tax" }, { id: 23, count: 1, description: "", link: "#", name: "Child Category 3", slug: "category-3", taxonomy: "category_tax" }], posts: [{ link: "#", name: "Post Title 1" }, { link: "#", name: "Post Title 2" }, { link: "#", name: "Post Title 3" }] }, { id: 3, count: 1, description: "", link: "#", name: "Category 3", slug: "category-3", taxonomy: "category_tax" }, { id: 4, count: 1, description: "", link: "#", name: "Category 4", slug: "category-4", taxonomy: "category_tax" }, { id: 5, count: 1, description: "", link: "#", name: "Category 5", slug: "category-5", taxonomy: "category_tax" }, { id: 6, count: 1, description: "", link: "#", name: "Category 6", slug: "category-6", taxonomy: "category_tax" }]; // useEffect(() => { // setPostCategoriesData([]); // setCategories([]); // setcategoryCount(categories.length - 1); // if (postCategoriesX != undefined) { // for (x in postCategoriesX) { // var catId = postCategoriesX[x]; // var assd = x; // if (x) { // apiFetch({ // path: "/wp/v2/" + taxonomies.options.taxName + "/" + catId, // method: "GET", // }).then((res) => { // setPostCategoriesData((current) => [...current, res]); // setCategories((current) => [...current, res]); // }); // } // } // } else { // setPostCategoriesData(dummyCats); // setCategories(dummyCats); // } // }, [postCategoriesX]); // useEffect(() => { // var asdasd = postCategoriesData.slice(0, items.options.maxCount); // setCategories(asdasd); // }, [postCategoriesData]); // useEffect(() => { // var maxCount = // items.options.maxCount.length > 0 ? items.options.maxCount : 99; // if (postCategoriesX != undefined && postCategoriesX.length > 0) { // setcategoryCount(categories.length - 1); // var asdasd = postCategoriesData.slice(0, maxCount); // setCategories(asdasd); // } else { // var asdasd = dummyCats.slice(0, maxCount); // setCategories(asdasd); // } // }, [items]); // const [currentPostUrl, setCurrentPostUrl] = useEntityProp( // "postType", // postType, // "link", // postId // ); // var postUrl = // postTitle.options.customUrl != undefined && // postTitle.options.customUrl.length > 0 // ? postTitle.options.customUrl // : currentPostUrl; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); var RemoveQueryPram = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; items.splice(index, 1); //setAttributes({ queryArgs: { items: queryArgsX.items } }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "mx-2" }, title)); }; function updateQueryPram(newVal, index) { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; item.val = newVal; items[index] = item; setAttributes({ queryArgs: { ...queryArgs, items: items } }); // fetchPosts(); } function generateQueryArgOptions(item, index) { var itemId = item.id; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RemoveQueryPram, { title: _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId] == undefined ? itemId : _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].label, index: index }), initialOpen: false }, item.id == "taxonomy" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 underline decoration-dotted underline-offset-2 ", "data-pgTooltip": _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].longDescription, "data-pgTooltip-location": "bottom" }, "Select Taxonomy"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: postObjects, buttonTitle: "Choose" // onChange={setTaxonomy} , onChange: newVal => updateQueryPram(newVal.id, index), values: queryArgs.items[index].val }))), item.id == "order" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "order" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { style: { margin: 0 }, label: "", value: queryArgs.items[index].val, options: [{ label: "Ascending", value: "ASC" }, { label: "Descending", value: "DESC" }], onChange: newVal => updateQueryPram(newVal, index) })), item.id == "get" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "get" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { style: { margin: 0 }, label: "", value: queryArgs.items[index].val, options: [{ label: "All", value: "all" }, { label: "Disable", value: "" }], onChange: newVal => updateQueryPram(newVal, index) })), (item.id == "include" || item.id == "exclude" || item.id == "exclude_tree" || item.id == "offset" || item.id == "name" || item.id == "number" || item.id == "slug" || item.id == "search" || item.id == "name__like" || item.id == "description__like" || item.id == "child_of" || item.id == "parent" || item.id == "cache_domain" || item.id == "meta_value" || item.id == "meta_key") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].value, type: item.id == "offset" || item.id == "number" || item.id == "child_of" || item.id == "parent" ? "number" : "text", placeholder: _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].placeholder != undefined ? _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].placeholder : "", onChange: newVal => { //clearTimeout(debounce); //debounce = setTimeout(() => { updateQueryPram(newVal, index); //}, 1000); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("p", { className: "text-[10px] pt-2 text-gray-500 flex gap-2 justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].description), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "w-6 h-6 border rounded-full border-solid flex items-center justify-center border-amber-500", "data-pgTooltip": _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].longDescription, "data-pgTooltip-location": "left" }, " ", "?"), " ")), (item.id == "hide_empty" || // item.id == "number" || item.id == "count" || item.id == "hierarchical" || item.id == "pad_counts" || item.id == "childless" || item.id == "update_term_meta_cache") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][itemId].label, help: queryArgs.items[index].val ? "Hide Empty Enabled" : "Hide Empty Disabled", checked: queryArgs.items[index].val ? true : false, onChange: e => { if (queryArgs.items[index]?.val == true) { updateQueryPram(false, index); } if (queryArgs.items[index]?.val == false) { updateQueryPram(true, index); } } })), item.id == "orderby" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: item.id == "orderby" ? "" : "hidden" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { value: item.value, options: [{ label: "None", value: "none" }, { label: "ID", value: "ID" }, { label: "Author", value: "author" }, { label: "Title", value: "title" }, { label: "Name", value: "name" }, { label: "Type", value: "type" }, { label: "Date", value: "date" }, { label: "Modified", value: "modified" }, { label: "Parent", value: "parent" }, { label: "Random", value: "rand" }, { label: "Comment Count", value: "comment_count" }, { label: "Relevance", value: "relevance" }, { label: "Menu Order", value: "menu_order" }, { label: "Meta Value(String)", value: "meta_value" }, { label: "Meta Value(Number)", value: "meta_value_num" }, { label: "post__in", value: "post__in" }, { label: "post_name__in", value: "post_name__in" }, { label: "post_parent__in", value: "post_parent__in" }], multiple: true, onChange: newVal => { updateQueryPram(newVal, index); } })))); } function addQueryPram(option, index) { var id = option.id; var items = [...queryArgs.items]; var itemX = { ...queryArgs.items[index] }; var data = { val: _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"][id].value, id: id }; var multiple = data.multiple; var isExist = items.map(item => { if (item.id == id) { return true; } }); var itemsX = items.concat([data]); //setAttributes({ queryArgs: { items: items } }); setAttributes({ queryArgs: { ...queryArgs, items: itemsX } }); } function addQueryPreset(option, index) { var items = [...queryArgs.items]; var item = { ...queryArgs.items[index] }; items = option.value.items; //setAttributes({ queryArgs: { items: queryArgsX.items } }); setAttributes({ queryArgs: { ...queryArgs, items: items } }); fetchPosts(); } // function setTaxonomy(option, index) { // var options = { ...taxonomies.options, taxName: option.id }; // setAttributes({ taxonomies: { ...taxonomies, options: options } }); // // var attrExist = false; // // var data = termsQueryPrams[index]; // // var multiple = data.multiple; // // var isExist = queryArgs.items.map((item) => { // // if (item.id == index) { // // return true; // // } // // }) // // var items = queryArgs.items.concat([data]) // // setAttributes({ queryArgs: { items: items } }); // } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var itemsX = attributes.items; var taxonomiesX = attributes.taxonomies; var iconX = attributes.icon; var termTitleX = attributes.termTitle; var postCountX = attributes.postCount; var separatorX = attributes.separator; var frontTextX = attributes.frontText; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (taxonomiesX != undefined) { var taxonomiesY = { ...taxonomiesX, options: taxonomies.options }; setAttributes({ taxonomies: taxonomiesY }); blockCssObj[taxonomiesSelector] = taxonomiesY; } if (postCountX != undefined) { var postCountY = { ...postCountX, options: postCount.options }; setAttributes({ postCount: postCountY }); blockCssObj[postCountSelector] = postCountY; } if (frontTextX != undefined) { var frontTextY = { ...frontTextX, options: frontText.options }; setAttributes({ frontText: frontTextY }); blockCssObj[frontTextSelector] = frontTextY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (termTitleX != undefined) { var termTitleY = { ...termTitleX, options: termTitle.options }; setAttributes({ termTitle: termTitleY }); blockCssObj[termTitleSelector] = termTitleY; } if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemsSelector] = itemsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItems(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, items); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemsSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItems(sudoScource, key) { var object = myStore.deletePropertyDeep(items, [sudoScource, key, breakPointX]); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemsSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItems(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, items); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ items: object }); } function onResetItems(sudoScources) { let obj = Object.assign({}, items); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, itemsSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ items: obj }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStyleTermTitle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleTermTitle(sudoScource, key) { var object = myStore.deletePropertyDeep(termTitle, [sudoScource, key, breakPointX]); setAttributes({ termTitle: object }); var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleTermTitle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, termTitle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ termTitle: object }); } function onBulkAddTermTitle(sudoScource, cssObj) { let obj = Object.assign({}, termTitle); obj[sudoScource] = cssObj; setAttributes({ termTitle: obj }); var selector = myStore.getElementSelector(sudoScource, termTitleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetTermTitle(sudoScources) { let obj = Object.assign({}, termTitle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, termTitleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ termTitle: obj }); } function onChangeStylePostCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostCount(sudoScource, key) { var object = myStore.deletePropertyDeep(postCount, [sudoScource, key, breakPointX]); setAttributes({ postCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postCount: object }); } function onBulkAddPostCount(sudoScource, cssObj) { let obj = Object.assign({}, postCount); obj[sudoScource] = cssObj; setAttributes({ postCount: obj }); var selector = myStore.getElementSelector(sudoScource, postCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostCount(sudoScources) { let obj = Object.assign({}, postCount); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postCountSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postCount: obj }); } function onChangeStyleFrontText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleFrontText(sudoScource, key) { var object = myStore.deletePropertyDeep(frontText, [sudoScource, key, breakPointX]); setAttributes({ frontText: object }); var elementSelector = myStore.getElementSelector(sudoScource, frontTextSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleFrontText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, frontText); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ frontText: object }); } function onChangeStyleSeparator(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSeparator(sudoScource, key) { var object = myStore.deletePropertyDeep(separator, [sudoScource, key, breakPointX]); setAttributes({ separator: object }); var elementSelector = myStore.getElementSelector(sudoScource, separatorSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSeparator(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, separator); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ separator: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddItems(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddFrontText(sudoScource, cssObj) { let obj = Object.assign({}, frontText); obj[sudoScource] = cssObj; setAttributes({ frontText: obj }); var selector = myStore.getElementSelector(sudoScource, frontTextSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddSeperator(sudoScource, cssObj) { let obj = Object.assign({}, separator); obj[sudoScource] = cssObj; setAttributes({ separator: obj }); var selector = myStore.getElementSelector(sudoScource, separatorSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); myStore.generateBlockCss(blockCssY.items, blockId); }, [items]); var linkAttrObj = () => { var sdsd = {}; items.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; const post = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecord("postType", context["postType"], context["postId"])); const termstaxonomy = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_7__.useSelect)(select => select("core").getEntityRecords("taxonomy", "category", [4, 5])); function onChangeBreakPoint(x, index) { var asdsdsd = wp.data.dispatch("postgrid-shop").setBreakPoint(x.value); asdsdsd.then(res => { setBreakPointX(res.breakpoint); myStore.generateBlockCss(blockCssY.items, blockId); }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { title: "Query Terms", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "my-3 flex gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: _queryprams__WEBPACK_IMPORTED_MODULE_19__["default"], buttonTitle: "Query Terms", onChange: addQueryPram, values: "" })), queryArgs.items.map((item, index) => { return generateQueryArgOptions(item, index); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_24__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_25__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onBulkAdd: onBulkAddWrapper, onRemove: onRemoveStyleWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Item Class"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.class, onChange: newVal => { var options = { ...items.options, class: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: items.options.linkTo == undefined || items.options.linkTo.length == 0 ? "Choose" : linkToArgs[items.options.linkTo] == undefined ? "Choose" : linkToArgs[items.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Author Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Meta Key"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.linkToAuthorMeta, onChange: newVal => { var options = { ...items.options, linkToAuthorMeta: newVal }; setAttributes({ items: { ...items, options: options } }); } })), items.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Custom Url"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), items.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_32__["default"], onClick: ev => { var options = { ...items.options, customUrl: "" }; setAttributes({ items: { ...items, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.__experimentalLinkControl, { settings: [], value: items.options.customUrl, onChange: newVal => { var options = { ...items.options, customUrl: newVal.url }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", items.options.customUrl.length != 0 ? items.options.customUrl : "No link", " ")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: items.options.linkTarget, options: [{ label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...items.options, linkTarget: newVal }; setAttributes({ items: { ...items, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.prefix, onChange: newVal => { var options = { ...items.options, prefix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: items.options.postfix, onChange: newVal => { var options = { ...items.options, postfix: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = items.options.linkAttr.concat({ id: "", val: "" }); var options = { ...items.options, linkAttr: sdsd }; setAttributes({ items: { ...items, options: options } }); linkAttrObj(); } }, "Add")), items.options.linkAttr.length > 0 && items.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", placeholder: "Name", value: items.options.linkAttr[i].id, onChange: newVal => { items.options.linkAttr[i].id = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { items.options.linkAttr[i].val = newVal; var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { items.options.linkAttr.splice(i, 1); var ssdsd = items.options.linkAttr.concat([]); var options = { ...items.options, linkAttr: ssdsd }; setAttributes({ items: { ...items, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: items, onChange: onChangeStyleItems, onBulkAdd: onBulkAddItems, onAdd: onAddStyleItems, onRemove: onRemoveStyleItems })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_16__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Front text", value: "beforeFronttext" }, { label: "After Front text", value: "afterFronttext" }, { label: "Before Items", value: "beforeItems" }, { label: "After Items", value: "afterItems" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: icon, onChange: onChangeStyleIcon, onBulkAdd: onBulkAddIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Term Title", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: termTitle, onChange: onChangeStyleTermTitle, onAdd: onAddStyleTermTitle, onBulkAdd: onBulkAddTermTitle, onRemove: onRemoveStyleTermTitle, onReset: onResetTermTitle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Front Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Front Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: frontText.options.text, onChange: newVal => { var options = { ...frontText.options, text: newVal }; setAttributes({ frontText: { ...frontText, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: frontText, onChange: onChangeStyleFrontText, onAdd: onAddStyleFrontText, onBulkAdd: onBulkAddFrontText, onRemove: onRemoveStyleFrontText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Post Count" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "Post Count"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }, { name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: postCount, onChange: onChangeStylePostCount, onAdd: onAddStylePostCount, onBulkAdd: onBulkAddPostCount, onRemove: onRemoveStylePostCount, onReset: onResetPostCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "Display Post Count", help: items.options.postCount ? "Post Count Enabled" : "Post Count Disabled", checked: items.options.postCount ? true : false, onChange: e => { var options = { ...items.options, postCount: items.options.postCount ? false : true }; setAttributes({ items: { ...items, options: options } }); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Separator", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_20__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Separator"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: separator.options.text, onChange: newVal => { var options = { ...separator.options, text: newVal }; setAttributes({ separator: { ...separator, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_21__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_22__["default"], { obj: separator, onChange: onChangeStyleSeparator, onAdd: onAddStyleSeparator, onBulkAdd: onBulkAddSeperator, onRemove: onRemoveStyleSeparator })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="UTM tracking" , title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, "UTM Tracking"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "Enable?", help: utmTracking.enable ? "Tracking Enable." : "Tracking Disabled.", checked: utmTracking.enable ? true : false, onChange: e => { var options = { ...utmTracking, enable: utmTracking.enable ? false : true }; if (isProFeature) { alert("This feature is only available in Pro Version."); return; } setAttributes({ utmTracking: options }); } }), utmTracking.enable ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.id, onChange: newVal => { var update = { ...utmTracking, id: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.source, onChange: newVal => { var update = { ...utmTracking, source: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Medium"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.medium, onChange: newVal => { var update = { ...utmTracking, medium: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Campaign"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.campaign, onChange: newVal => { var update = { ...utmTracking, campaign: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Term"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.term, onChange: newVal => { var update = { ...utmTracking, term: newVal }; setAttributes({ utmTracking: update }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Content"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: utmTracking.content, onChange: newVal => { var update = { ...utmTracking, content: newVal }; setAttributes({ utmTracking: update }); } }))) : "")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_17__["default"], { blockName: "terms-list", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_14__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_15__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, taxonomy == false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, "Add Query Terms to show the term list."), taxonomy && categories.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, "No Terms Found"), taxonomy && categories.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforeFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "frontText" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, frontText.options.text)), icon.options.position == "afterFronttext" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), categories.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, items.options.linkTo != undefined && items.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ // onClick={(ev) => ev.preventDefault()} // target={items.options.linkTarget} title: x.name }, linkAttrItems, { className: items.options.class // href={x.link} }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, x.count), categories.length > index + 1 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "separator" }, separator.options.text, " ")), items.options.linkTo != undefined && items.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ onClick: ev => ev.preventDefault(), target: items.options.linkTarget, title: x.name }, linkAttrItems, { className: items.options.class, href: x.link }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "termTitle" }, items.options.prefix, x.name, items.options.postfix), items.options.postCount == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "postCount" }, x.count), categories.length > index + 1 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "separator" }, separator.options.text, " "))); }), icon.options.position == "afterItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/terms-list/query-presets.js": /*!************************************************!*\ !*** ./src/blocks/terms-list/query-presets.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); const queryPresetsBasic = [{ label: 'Latest Posts by Publish Date', key: 'preset1', isPro: false, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["date"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Oldest Posts by Publish Date', key: 'preset2', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "ASC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["date"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Latest Posts by Modified Date', key: 'preset3', isPro: false, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["modified"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Oldest Posts by Modified Date', key: 'preset4', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "ASC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["modified"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Alphabetical Order A-Z', key: 'preset5', isPro: false, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "ASC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["name"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Alphabetical Order Z-A', key: 'preset6', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["name"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Most Commented Posts', key: 'preset7', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["name"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }, { label: 'Random 10 Posts', key: 'preset8', isPro: true, value: { "items": [{ "val": ["post"], "multiple": false, "id": "postType", "label": "Post Types", "description": "Select Post Types to Query" }, { "val": ["publish"], "multiple": false, "id": "postStatus", "label": "Post status", "description": "Query post by post status" }, { "val": "DESC", "multiple": false, "id": "order", "label": "Order", "description": "Post query order" }, { "val": ["rand"], "multiple": false, "id": "orderby", "label": "Orderby", "description": "Post query orderby" }, { "val": "10", "multiple": false, "id": "postsPerPage", "label": "Posts Per Page", "description": "" }] } }]; let queryPresets = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)('queryPresets', queryPresetsBasic); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (queryPresets); /***/ }), /***/ "./src/blocks/terms-list/queryprams.js": /*!*********************************************!*\ !*** ./src/blocks/terms-list/queryprams.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__); const termsQueryPramsBasic = { taxonomy: { value: "category", multiple: false, id: "taxonomy", label: "Taxonomy", description: "Select Taxonomy to Query", longDescription: "Taxonomy name, or array of taxonomy names, to which results should be limited." }, orderby: { value: "name", multiple: false, id: "orderby", label: "Order By", description: "Search keyword, ex: hello" }, order: { value: "ASC", multiple: false, id: "order", label: "Order", description: "Whether to order terms in ascending or descending order." }, hide_empty: { value: true, multiple: false, id: "hide_empty", label: "Hide Empty", description: "Accepts true or false value.", longDescription: "Whether to hide terms not assigned to any posts. Accepts 1|true or 0|false." }, number: { value: false, multiple: false, id: "number", label: "Number", description: "Accepts 0 (all) or any positive number.", longDescription: "Maximum number of terms to return. Accepts ''|0 (all) or any positive number. Default ''|0 (all). Note that $number may not return accurate results when coupled with $object_ids." }, include: { value: "category", multiple: false, id: "include", isPro: true, label: "Include", description: "Comma-separated string of term IDs to include.", longDescription: "Array or comma/space-separated string of term IDs to include. Default empty array.", placeholder: "Comma-separated string of term IDs to include." }, exclude: { value: "", multiple: false, id: "exclude", isPro: true, label: "Exclude", description: "Comma-separated string of term IDs to exclude.", longDescription: "Array or comma/space-separated string of term IDs to exclude. If $include is non-empty, $exclude is ignored. Default empty array.", placeholder: "Comma-separated string of term IDs to exclude." }, // Category Parameters exclude_tree: { value: "", multiple: false, id: "exclude_tree", isPro: true, label: "Exclude Tree", description: "Comma-separated string of term IDs to exclude.", longDescription: "Array or comma/space-separated string of term IDs to exclude along with all of their descendant terms. If $include is non-empty, $exclude_tree is ignored. Default empty array.", placeholder: "Comma-separated string of term IDs to exclude." }, count: { value: false, multiple: false, id: "count", isPro: true, label: "count", description: "Whether to return a term count. If true, will take precedence over $fields." }, offset: { value: "", multiple: false, id: "offset", isPro: true, label: "Offset", description: "The number by which to offset the terms query.", longDescription: "The number by which to offset the terms query." }, // fields: { // value: "all", // multiple: false, // id: "fields", // label: "Fields", // description: "Post query by Category IDs" /*isPro: true*/, // }, name: { value: "", multiple: false, id: "name", isPro: true, label: "Name", description: "Name or array of names to return term(s) for.", longDescription: "Comma-separated names to return term(s) for." }, // Tag Parameters slug: { value: "", multiple: false, id: "slug", isPro: true, label: "Slug", description: "Slug or array of slugs to return term(s) for.", longDescription: "Comma-separated slugs to return term(s) for." }, hierarchical: { value: true, multiple: false, id: "hierarchical", isPro: true, label: "Hierarchical", description: "Whether to include terms that have non-empty descendants.", longDescription: "Whether to include terms that have non-empty descendants (even if $hide_empty is set to true)." }, search: { value: "", multiple: false, id: "search", isPro: true, label: "Search", description: "Search criteria to match terms.", longDescription: "Search criteria to match terms. Will be SQL-formatted with wildcards before and after." }, name__like: { value: "", multiple: false, id: "name__like", isPro: true, label: "Name like", description: "Retrieve terms with criteria by which a term is LIKE $name__like.", longDescription: "Retrieve terms with criteria by which a term is LIKE $name__like." }, description__like: { value: "", multiple: false, id: "description__like", isPro: true, label: "Description like", description: "Retrieve terms where the description is LIKE $description__like.", longDescription: "Retrieve terms where the description is LIKE $description__like." }, pad_counts: { value: false, multiple: false, id: "pad_counts", isPro: true, label: "Pad counts", description: 'Whether to pad the quantity of a term’s children in the quantity of each term’s "count" object variable.', longDescription: 'Whether to pad the quantity of a term’s children in the quantity of each term’s "count" object variable. Default false.' }, get: { value: "", multiple: false, id: "get", isPro: true, label: "Get", description: "Whether to return terms regardless of ancestry or whether the terms are empty.", longDescription: "Whether to return terms regardless of ancestry or whether the terms are empty. Accepts 'all' or '' (disabled). Default ''." }, child_of: { value: "", multiple: false, id: "child_of", isPro: true, label: "Child of", description: "Term ID to retrieve child terms of.", longDescription: "Term ID to retrieve child terms of. If multiple taxonomies are passed, $child_of is ignored. Default 0." }, parent: { value: "", multiple: false, id: "parent", isPro: true, label: "Parent", description: "Parent term ID to retrieve direct-child terms of.", longDescription: "Parent term ID to retrieve direct-child terms of." }, childless: { value: false, multiple: false, id: "childless", isPro: true, label: "Childless", description: "True to limit results to terms that have no children.", longDescription: "True to limit results to terms that have no children. This parameter has no effect on non-hierarchical taxonomies. Default false." }, // // Date Parameters cache_domain: { value: "core", multiple: false, id: "cache_domain", isPro: true, label: "Cache domain", description: "Unique cache key to be produced when this query is stored in an object cache.", longDescription: "Unique cache key to be produced when this query is stored in an object cache. Default 'core'." }, update_term_meta_cache: { value: true, multiple: false, id: "update_term_meta_cache", isPro: true, label: "Update term meta Cache", description: "Whether to prime meta caches for matched terms. Default true." }, // meta_query: { // value: [], // multiple: false, // id: "meta_query", // label: "Meta query", // description: "Post query by month", // }, meta_key: { value: "", multiple: false, id: "meta_key", isPro: true, label: "Meta key", description: "Comma-separated keys to return term(s) for.", longDescription: "Meta key or keys to filter by." }, meta_value: { value: "", multiple: false, id: "meta_value", isPro: true, label: "Meta value", description: "Comma-separated keys to return term(s) for.", longDescription: "Meta value or values to filter by." } }; let termsQueryPrams = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_0__.applyFilters)("termsQueryPrams", termsQueryPramsBasic); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (termsQueryPrams); /***/ }), /***/ "./src/blocks/text/index.js": /*!**********************************!*\ !*** ./src/blocks/text/index.js ***! \**********************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_19___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_19__); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/text/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "161", height: "160", viewBox: "0 0 161 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160.294 62H85V71.4118H160.294V62Z", fill: "url(#paint0_linear_61_930)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160.294 80.8823H85.2939V89.8823H160.294V80.8823Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M131.294 99.8823H85.2939V108.882H131.294V99.8823Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M68.0095 79.9611C65.7484 79.9611 63.922 81.7874 63.922 84.0486V114.836H8.26203V59.1756H39.0491C41.3103 59.1756 43.1366 57.3492 43.1366 55.088C43.1366 52.8268 41.3103 51.0005 39.0491 51.0005H7.04456C3.13096 51.0005 0 54.1313 0 58.0449V116.14C0 120.054 3.13096 123.185 7.04456 123.185H65.1397C69.0533 123.185 72.1841 120.054 72.1841 116.14V84.1356C72.0971 81.7874 70.2707 79.9611 68.0095 79.9611Z", fill: "url(#paint1_linear_61_930)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M73.8365 60.8279L62.1826 49.1741C60.6171 47.6086 58.0081 47.6086 56.3557 49.1741L21.4811 84.0485C20.6984 84.8313 20.2637 85.8749 20.2637 87.0055V98.6593C20.2637 100.921 22.09 102.747 24.3512 102.747H36.0051C37.1357 102.747 38.1792 102.312 38.8749 101.529L73.7495 66.6548C75.4019 65.0024 75.402 62.3934 73.8365 60.8279ZM56.3557 72.3947L34.3526 94.3978H28.5257V88.5709L50.5288 66.5678L56.3557 72.3947ZM65.0526 63.6978L62.1826 66.5678L56.3557 60.7409L59.2257 57.871L65.0526 63.6978Z", fill: "url(#paint2_linear_61_930)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_930", x1: "85", y1: "66.7059", x2: "160.294", y2: "66.7059", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_930", x1: "0", y1: "87.0925", x2: "72.1841", y2: "87.0925", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_930", x1: "20.2637", y1: "75.3734", x2: "74.9999", y2: "75.3734", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, transforms: { from: [{ type: "block", blocks: ["core/paragraph", "core/code"], transform: (attributes, innerBlocks) => { var content = attributes.content; var atts = { text: { options: { content: content, tag: "div", class: "pg-text" } } }; console.log(attributes); return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/text", atts); } }, { type: "block", blocks: ["core/heading"], transform: attributes => { var content = attributes.content; var level = attributes.level; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/text", { text: { options: { content: content, tag: "h" + level } } }); } }, { type: "block", blocks: ["core/quote"], transform: attributes => { var citation = attributes.citation; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("post-grid/text", { text: { options: { content: citation } } }); } }], to: [{ type: "block", blocks: ["core/paragraph"], transform: attributes => { var text = attributes.text; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/paragraph", { content: text.options.content }); } }, { type: "block", blocks: ["core/code"], transform: attributes => { var text = attributes.text; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/code", { content: text.options.content }); } }, { type: "block", blocks: ["core/heading"], transform: attributes => { var text = attributes.text; var tag = attributes.tag; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/heading", { content: text.options.content, level: "3" }); } }, { type: "block", blocks: ["core/quote"], transform: attributes => { var text = attributes.text; var tag = attributes.tag; return (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.createBlock)("core/quote", { value: text.options.content, citation: text.options.content }); } }] }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var text = attributes.text; var blockCssY = attributes.blockCssY; var breakPointX = myStore.getBreakPoint(); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(null); // Using the hook. const CustomTag = `${text.options.tag}`; // Wrapper CSS Class Selectors var textSelector = blockClass; var limitByArgsBasic = { none: { label: "Choose..", value: "" }, word: { label: "Word", value: "word" }, character: { label: "Character", value: "character", isPro: true } }; let limitByArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_19__.applyFilters)("limitByArgs", limitByArgsBasic); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { // if (blockId.length == 0) { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); // } }, [clientId]); // useEffect(() => { // //console.log('blockId', blockId); // myStore.generateBlockCss(blockCssY.items, blockId); // }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { //console.log('blockCssY', blockCssY.items); myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[textSelector] = text; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function setLimitBy(option, index) { var options = { ...text.options, limitBy: option.value }; setAttributes({ text: { ...text, options: options } }); } function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var textX = attributes.text; var blockCssY = attributes.blockCssY; var blockCssObj = {}; if (textX != undefined) { var textY = { ...textX, options: text.options }; setAttributes({ text: textY }); blockCssObj[textSelector] = textY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onPickCssLibraryText(args) { var textX = Object.assign({}, text); Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; textX[sudoScource] = sudoScourceArgs; }); setAttributes({ text: textX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var blockCssYX = { ...blockCssY }; var items = { ...blockCssYX.items }; var cssItems = Object.assign(items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleText(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; //let obj = Object.assign({}, text); let obj = { ...text }; const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ text: object }); var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } // if (blockCssY.items[elementSelector] == undefined) { // blockCssY.items[elementSelector] = {}; // } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); //console.log('cssItems', cssItems); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleText(sudoScource, key) { //console.log('onRemoveStyleText'); var object = myStore.deletePropertyDeep(text, [sudoScource, key, breakPointX]); var isEmpty = Object.entries(object[sudoScource][key]).length == 0 ? true : false; var objectX = isEmpty ? myStore.deletePropertyDeep(object, [sudoScource, key]) : object; setAttributes({ text: objectX }); var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleText(sudoScource, key) { var path = [sudoScource, key, breakPointX]; //let objX = Object.assign({}, text); let obj = { ...text }; const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ text: object }); } function onBulkAddText(sudoScource, cssObj) { let obj = Object.assign({}, text); obj[sudoScource] = cssObj; setAttributes({ text: obj }); var selector = myStore.getElementSelector(sudoScource, textSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetText(sudoScources) { let obj = Object.assign({}, text); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, textSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ text: obj }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.useBlockProps)({ className: ` ${blockId} ${text.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Text", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: text.options.class, onChange: newVal => { var options = { ...text.options, class: newVal }; setAttributes({ text: { ...text, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Block ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: blockId, disabled: true, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: text.options.id, onChange: newVal => { var options = { ...text.options, id: newVal }; setAttributes({ text: { ...text, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.SelectControl, { label: "", value: text.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...text.options, tag: newVal }; setAttributes({ text: { ...text, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Limit By"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_13__["default"], { position: "bottom right", variant: "secondary", options: limitByArgs, buttonTitle: text.options.limitBy !== undefined && text.options.limitBy.length > 0 ? text.options.limitBy : "Choose", onChange: setLimitBy, values: [] })), text.options.limitBy != null && text.options.limitBy.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "bg-gray-500 my-3 text-white p-2" }, limitByArgs[text.options.limitBy].label), text.options.limitBy != null && (text.options.limitBy == "word" || text.options.limitBy == "character") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Limit Count"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.__experimentalInputControl, { value: text.options.limitCount == null ? "99" : text.options.limitCount, onChange: newVal => { var options = { ...text.options, limitCount: newVal }; setAttributes({ text: { ...text, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: text, onChange: onChangeStyleText, onAdd: onAddStyleText, onRemove: onRemoveStyleText, onBulkAdd: onBulkAddText, onReset: onResetText })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: text, onChange: onPickCssLibraryText })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_6__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "text", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockText", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "text" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_8__.RichText, (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { tagName: CustomTag // className="pg-text" , value: text.options.content, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { var options = { ...text.options, content: content }; setAttributes({ text: { ...text, options: options } }); }, placeholder: (0,_wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__.__)("Start Writing...") }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-add-to-cart/index.js": /*!*********************************************!*\ !*** ./src/blocks/woo-add-to-cart/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-add-to-cart/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.6845 50.978C85.6845 61.8453 85.6845 72.3782 85.6845 83.2455C72.7273 88.094 59.6866 92.9425 46.395 97.9581C46.395 87.0908 46.395 76.4744 46.395 65.6071C59.3522 60.7586 72.4765 55.9101 85.6845 50.978Z", fill: "url(#paint0_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 65.5235C42.466 76.3908 42.466 86.9237 42.466 97.8746C29.2581 92.9425 16.301 88.094 3.26025 83.2455C3.26025 72.4618 3.26025 61.9289 3.26025 50.978C16.4682 55.9101 29.5089 60.675 42.466 65.5235Z", fill: "url(#paint1_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.4334 32.8381C71.4731 38.0209 58.098 43.0366 44.4721 48.1358C31.0969 43.2037 17.6382 38.1045 3.51074 32.9216C12.4554 29.5779 20.7312 26.4848 29.0907 23.3918C33.6048 21.72 38.1189 20.1317 42.633 18.3762C43.887 17.8746 44.9736 17.8746 46.2275 18.3762C59.1011 23.1411 72.0583 27.8224 85.4334 32.8381Z", fill: "url(#paint2_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M88.9446 35.5967C88.9446 39.0241 88.9446 42.2006 88.9446 45.628C74.9007 50.8109 60.8568 56.0774 46.4785 61.4274C46.4785 58 46.4785 54.907 46.4785 51.3961C60.4388 46.2132 74.6499 40.9467 88.9446 35.5967Z", fill: "url(#paint3_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 61.4274C28.0877 56.0774 14.0439 50.8109 0 45.628C0 42.2842 0 39.1077 0 35.5967C14.2947 40.9467 28.4221 46.1296 42.466 51.3961C42.466 54.7399 42.466 57.9164 42.466 61.4274Z", fill: "url(#paint4_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 107.488H0V124.625H160V107.488Z", fill: "url(#paint5_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 138.334H0V155.471H160V138.334Z", fill: "url(#paint6_linear_61_950)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M142.239 86.9534C145.464 86.9534 148.088 84.3294 148.088 81.104C148.088 77.8787 145.464 75.2546 142.239 75.2546C139.014 75.2546 136.39 77.8787 136.39 81.104C136.39 84.3294 139.014 86.9534 142.239 86.9534ZM142.239 78.8869C143.462 78.8869 144.456 79.8815 144.456 81.104C144.456 82.3266 143.462 83.3211 142.239 83.3211C141.016 83.3211 140.022 82.3266 140.022 81.104C140.022 79.8815 141.017 78.8869 142.239 78.8869Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M151.612 54.047C151.268 53.6089 150.741 53.353 150.184 53.353H119.131L118.147 48.4033C117.544 45.2719 114.768 43 111.543 43H108.816C107.813 43 107 43.8131 107 44.8161C107 45.8192 107.813 46.6323 108.816 46.6323H111.543C113.055 46.6323 114.304 47.6444 114.581 49.0936C114.582 49.0978 114.583 49.1019 114.584 49.1061L118.661 69.6194C119.203 72.3493 121.617 74.3306 124.4 74.3306H142.792C145.452 74.3306 147.78 72.5335 148.453 69.9605C148.456 69.9503 148.459 69.9402 148.461 69.93L151.948 55.5987C152.08 55.0572 151.956 54.4852 151.612 54.047ZM144.936 69.0533C144.676 70.0225 143.797 70.6982 142.792 70.6982H124.4C123.345 70.6982 122.429 69.9466 122.223 68.9112L119.853 56.9853H147.873L144.936 69.0533Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M124.82 75.2546C121.594 75.2546 118.97 77.8787 118.97 81.104C118.97 84.3294 121.594 86.9534 124.82 86.9534C128.045 86.9534 130.669 84.3294 130.669 81.104C130.669 77.8787 128.045 75.2546 124.82 75.2546ZM124.82 83.3211C123.597 83.3211 122.603 82.3266 122.603 81.104C122.603 79.8816 123.597 78.8869 124.82 78.8869C126.042 78.8869 127.037 79.8815 127.037 81.104C127.037 82.3265 126.042 83.3211 124.82 83.3211Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_950", x1: "46.395", y1: "74.4681", x2: "85.6845", y2: "74.4681", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_950", x1: "3.26025", y1: "74.4263", x2: "42.466", y2: "74.4263", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_950", x1: "3.51074", y1: "33.0679", x2: "85.4334", y2: "33.0679", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_950", x1: "46.4785", y1: "48.512", x2: "88.9446", y2: "48.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_950", x1: "0", y1: "48.512", x2: "42.466", y2: "48.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_950", x1: "0", y1: "116.056", x2: "160", y2: "116.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_950", x1: "0", y1: "146.903", x2: "160", y2: "146.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let cartBtn = attributes.cartBtn; let quantityWrap = attributes.quantityWrap; let quantityInput = attributes.quantityInput; let quantityIncrease = attributes.quantityIncrease; let quantityDecrease = attributes.quantityDecrease; let viewCart = attributes.viewCart; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__.applyFilters)("isProFeature", true); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var cartBtnSelector = blockClass + " .cartBtn"; const iconSelector = blockClass + " .sku-icon"; const viewCartSelector = blockClass + " .added_to_cart"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const quantityWrapSelector = blockClass + " .quantity-wrap"; const quantityIncreaseSelector = blockClass + " .quantity-increase"; const quantityDecreaseSelector = blockClass + " .quantity-decrease"; const quantityInputSelector = blockClass + " .quantity-input"; // const [ // currentPostSKU, // setcurrentPostSKU, // ] = useEntityProp('postType', postType, 'date', postId); const [postSKUEdited, setpostSKUEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(cartBtn.options.text); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setpostSKUEdited(cartBtn.options.text); }, [cartBtn.options.text]); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"]); setpostfixText(text); }, [postfix.options.text]); // useEffect(() => { // var postTypeX = postType; // if (postType == 'post') { // var postTypeX = 'posts'; // } // if (postType == 'page') { // var postTypeX = 'pages'; // } // apiFetch({ // path: '/wp/v2/' + postTypeX + '/' + postId, // method: 'POST', // }).then((res) => { // console.log(res); // }); // }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var viewCartX = attributes.viewCart; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var cartBtnX = attributes.cartBtn; var quantityWrapX = attributes.quantityWrap; var quantityInputX = attributes.quantityInput; var quantityIncreaseX = attributes.quantityIncrease; var quantityDecreaseX = attributes.quantityDecrease; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (quantityDecreaseX != undefined) { var quantityDecreaseY = { ...quantityDecreaseX, options: quantityDecrease.options }; setAttributes({ quantityDecrease: quantityDecreaseY }); blockCssObj[quantityDecreaseSelector] = quantityDecreaseY; } if (quantityIncreaseX != undefined) { var quantityIncreaseY = { ...quantityIncreaseX, options: quantityIncrease.options }; setAttributes({ quantityIncrease: quantityIncreaseY }); blockCssObj[quantityIncreaseSelector] = quantityIncreaseY; } if (quantityInputX != undefined) { var quantityInputY = { ...quantityInputX, options: quantityInput.options }; setAttributes({ quantityInput: quantityInputY }); blockCssObj[quantityInputSelector] = quantityInputY; } if (quantityWrapX != undefined) { var quantityWrapY = { ...quantityWrapX, options: quantityWrap.options }; setAttributes({ quantityWrap: quantityWrapY }); blockCssObj[quantityWrapSelector] = quantityWrapY; } if (cartBtnX != undefined) { var cartBtnY = { ...cartBtnX, options: cartBtn.options }; setAttributes({ cartBtn: cartBtnY }); blockCssObj[cartBtnSelector] = cartBtnY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (viewCartX != undefined) { var viewCartY = { ...viewCartX, options: viewCart.options }; setAttributes({ viewCart: viewCartY }); blockCssObj[viewCartSelector] = viewCartY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySku(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; cartBtn[sudoScource] = sudoScourceArgs; }); var skuX = Object.assign({}, cartBtn); setAttributes({ cartBtn: skuX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, cartBtnSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleSku(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, cartBtn); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ cartBtn: object }); var elementSelector = myStore.getElementSelector(sudoScource, cartBtnSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSku(sudoScource, key) { var object = myStore.deletePropertyDeep(cartBtn, [sudoScource, key, breakPointX]); setAttributes({ cartBtn: object }); var elementSelector = myStore.getElementSelector(sudoScource, cartBtnSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSku(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, cartBtn); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ cartBtn: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onChangeStyleQuantityWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, quantityWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ quantityWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleQuantityWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(quantityWrap, [sudoScource, key, breakPointX]); setAttributes({ quantityWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleQuantityWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, quantityWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ quantityWrap: object }); } function onChangeStyleQuantityInput(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, quantityInput); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ quantityInput: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityInputSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleQuantityInput(sudoScource, key) { var object = myStore.deletePropertyDeep(quantityInput, [sudoScource, key, breakPointX]); setAttributes({ quantityInput: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityInputSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleQuantityInput(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, quantityInput); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ quantityInput: object }); } function onChangeStyleQuantityIncrease(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, quantityIncrease); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ quantityIncrease: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityIncreaseSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleQuantityIncrease(sudoScource, key) { var object = myStore.deletePropertyDeep(quantityIncrease, [sudoScource, key, breakPointX]); setAttributes({ quantityIncrease: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityIncreaseSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleQuantityIncrease(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, quantityIncrease); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ quantityIncrease: object }); } ////############/// function onChangeStyleQuantityDecrease(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, quantityDecrease); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ quantityDecrease: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityDecreaseSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleQuantityDecrease(sudoScource, key) { var object = myStore.deletePropertyDeep(quantityDecrease, [sudoScource, key, breakPointX]); setAttributes({ quantityDecrease: object }); var elementSelector = myStore.getElementSelector(sudoScource, quantityDecreaseSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleQuantityDecrease(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, quantityDecrease); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ quantityDecrease: object }); } ////############/// function onChangeStyleViewCart(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, viewCart); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ viewCart: object }); var elementSelector = myStore.getElementSelector(sudoScource, viewCartSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleViewCart(sudoScource, key) { var object = myStore.deletePropertyDeep(viewCart, [sudoScource, key, breakPointX]); setAttributes({ viewCart: object }); var elementSelector = myStore.getElementSelector(sudoScource, viewCartSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleViewCart(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, viewCart); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ viewCart: object }); } // add bulk style start function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddViewCart(sudoScource, cssObj) { let obj = Object.assign({}, viewCart); obj[sudoScource] = cssObj; setAttributes({ viewCart: obj }); var selector = myStore.getElementSelector(sudoScource, viewCartSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCartBtn(sudoScource, cssObj) { let obj = Object.assign({}, cartBtn); obj[sudoScource] = cssObj; setAttributes({ cartBtn: obj }); var selector = myStore.getElementSelector(sudoScource, cartBtnSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddQuantityWrap(sudoScource, cssObj) { let obj = Object.assign({}, quantityWrap); obj[sudoScource] = cssObj; setAttributes({ quantityWrap: obj }); var selector = myStore.getElementSelector(sudoScource, quantityWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddQuantityInput(sudoScource, cssObj) { let obj = Object.assign({}, quantityInput); obj[sudoScource] = cssObj; setAttributes({ quantityInput: obj }); var selector = myStore.getElementSelector(sudoScource, quantityInputSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddQuantityIncrease(sudoScource, cssObj) { let obj = Object.assign({}, quantityIncrease); obj[sudoScource] = cssObj; setAttributes({ quantityIncrease: obj }); var selector = myStore.getElementSelector(sudoScource, quantityIncreaseSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddQuantityDecrease(sudoScource, cssObj) { let obj = Object.assign({}, quantityDecrease); obj[sudoScource] = cssObj; setAttributes({ quantityDecrease: obj }); var selector = myStore.getElementSelector(sudoScource, quantityDecreaseSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // add bulk style end // reset style start function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetViewCart(sudoScources) { let obj = Object.assign({}, viewCart); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, viewCartSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ viewCart: obj }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onResetCartBtn(sudoScources) { let obj = Object.assign({}, cartBtn); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, cartBtnSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ cartBtn: obj }); } function onResetQuantityWrap(sudoScources) { let obj = Object.assign({}, quantityWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, quantityWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ quantityWrap: obj }); } function onResetQuantityInput(sudoScources) { let obj = Object.assign({}, quantityInput); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, quantityInputSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ quantityInput: obj }); } function onResetQuantityIncrease(sudoScources) { let obj = Object.assign({}, quantityIncrease); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, quantityIncreaseSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ quantityIncrease: obj }); } function onResetQuantityDecrease(sudoScources) { let obj = Object.assign({}, quantityDecrease); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, quantityDecreaseSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ quantityDecrease: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } // reset style end String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ cartBtn: cartBtn }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[cartBtnSelector] = cartBtn; blockCssObj[viewCartSelector] = viewCart; blockCssObj[quantityWrapSelector] = quantityWrap; blockCssObj[quantityIncreaseSelector] = quantityIncrease; blockCssObj[quantityDecreaseSelector] = quantityDecrease; blockCssObj[quantityInputSelector] = quantityInput; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); var postUrl = currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${cartBtn.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Cart Button", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Enable Ajax Cart"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: cartBtn.options.ajax, options: [{ label: "True", value: 1 }, { label: "False", value: 0 }], onChange: newVal => { var options = { ...cartBtn.options, ajax: newVal }; setAttributes({ cartBtn: { ...cartBtn, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: cartBtn.options.text, onChange: newVal => { var options = { ...cartBtn.options, text: newVal }; setAttributes({ cartBtn: { ...cartBtn, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Quantity"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: quantityInput.options.quantity, onChange: newVal => { var options = { ...quantityInput.options, quantity: newVal }; setAttributes({ quantityInput: { ...quantityInput, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Product Id / Variation ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: cartBtn.options.productId, onChange: newVal => { var options = { ...cartBtn.options, productId: newVal }; setAttributes({ cartBtn: { ...cartBtn, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: cartBtn, onChange: onChangeStyleSku, onAdd: onAddStyleSku, onRemove: onRemoveStyleSku, onBulkAdd: onBulkAddCartBtn, onReset: onResetCartBtn })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: cartBtn, onChange: onPickCssLibrarySku })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Quantity" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Quantity"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mb-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.ToggleControl, { label: "Show Quantity?", className: "my-4", help: quantityWrap.options.enable ? "Quantity enabled" : "Quantity disabled.", checked: quantityWrap.options.enable ? true : false, onChange: e => { var options = { ...quantityWrap.options, enable: quantityWrap.options.enable ? false : true }; setAttributes({ quantityWrap: { ...quantityWrap, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Quantity Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: quantityWrap, onChange: onChangeStyleQuantityWrap, onAdd: onAddStyleQuantityWrap, onRemove: onRemoveStyleQuantityWrap, onBulkAdd: onBulkAddQuantityWrap, onReset: onResetQuantityWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Quantity Increase", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: quantityIncrease, onChange: onChangeStyleQuantityIncrease, onAdd: onAddStyleQuantityIncrease, onRemove: onRemoveStyleQuantityIncrease, onBulkAdd: onBulkAddQuantityIncrease, onReset: onResetQuantityIncrease })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Quantity Decrease", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: quantityDecrease, onChange: onChangeStyleQuantityDecrease, onAdd: onAddStyleQuantityDecrease, onRemove: onRemoveStyleQuantityDecrease, onBulkAdd: onBulkAddQuantityDecrease, onReset: onResetQuantityDecrease })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Quantity Input", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: quantityInput, onChange: onChangeStyleQuantityInput, onAdd: onAddStyleQuantityInput, onRemove: onRemoveStyleQuantityInput, onBulkAdd: onBulkAddQuantityInput, onReset: onResetQuantityInput }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Icon" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Icon"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Cart Text", value: "beforeCartText" }, { label: "After Cart Text", value: "afterCartText" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "View Cart", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: viewCart, onChange: onChangeStyleViewCart, onAdd: onAddStyleViewCart, onRemove: onRemoveStyleViewCart, onBulkAdd: onBulkAddViewCart, onReset: onResetViewCart })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "woo-add-to-cart", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "woo-add-to-cart" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), quantityWrap.options.enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "quantity-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "quantity-decrease" }, "-"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { className: "quantity-input", size: "3", type: "number", value: quantityInput.options.quantity }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "quantity-increase" }, "+")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: "cartBtn", onClick: handleLinkClick, href: "?add-to-cart=1399", "data-quantity": "1", "data-product_id": "1399", "data-product_sku": "woo-polo", "aria-label": "Add \u201CPolo\u201D to your cart", "aria-describedby": "", rel: "nofollow" }, icon.options.position == "beforeCartText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postSKUEdited, icon.options.position == "afterCartText" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-price/index.js": /*!***************************************!*\ !*** ./src/blocks/woo-price/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-price/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "161", viewBox: "0 0 160 161", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.6845 55.978C85.6845 66.8453 85.6845 77.3782 85.6845 88.2455C72.7273 93.094 59.6866 97.9425 46.395 102.958C46.395 92.0908 46.395 81.4744 46.395 70.6071C59.3522 65.7586 72.4765 60.9101 85.6845 55.978Z", fill: "url(#paint0_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 70.5235C42.466 81.3908 42.466 91.9237 42.466 102.875C29.2581 97.9425 16.301 93.094 3.26025 88.2455C3.26025 77.4618 3.26025 66.9289 3.26025 55.978C16.4682 60.9101 29.5089 65.675 42.466 70.5235Z", fill: "url(#paint1_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.4334 37.8381C71.4731 43.0209 58.098 48.0366 44.4721 53.1358C31.0969 48.2037 17.6382 43.1045 3.51074 37.9216C12.4554 34.5779 20.7312 31.4848 29.0907 28.3918C33.6048 26.72 38.1189 25.1317 42.633 23.3762C43.887 22.8746 44.9736 22.8746 46.2275 23.3762C59.1011 28.1411 72.0583 32.8224 85.4334 37.8381Z", fill: "url(#paint2_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M88.9446 40.5967C88.9446 44.0241 88.9446 47.2006 88.9446 50.628C74.9007 55.8109 60.8568 61.0774 46.4785 66.4274C46.4785 63 46.4785 59.907 46.4785 56.3961C60.4388 51.2132 74.6499 45.9467 88.9446 40.5967Z", fill: "url(#paint3_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 66.4274C28.0877 61.0774 14.0439 55.8109 0 50.628C0 47.2842 0 44.1077 0 40.5967C14.2947 45.9467 28.4221 51.1296 42.466 56.3961C42.466 59.7399 42.466 62.9164 42.466 66.4274Z", fill: "url(#paint4_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 112.488H0V129.625H160V112.488Z", fill: "url(#paint5_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 143.334H0V160.471H160V143.334Z", fill: "url(#paint6_linear_61_947)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M120.39 73.7151V70.6221L127.634 63.907C128.244 63.2965 128.773 62.7675 129.18 62.2791C129.587 61.7907 129.913 61.343 130.157 60.8547C130.361 60.407 130.483 59.8779 130.483 59.3488C130.483 58.7384 130.361 58.25 130.076 57.8023C129.791 57.3547 129.425 57.0291 128.977 56.7849C128.489 56.5407 127.959 56.4186 127.39 56.4186C126.779 56.4186 126.209 56.5407 125.762 56.7849C125.314 57.0291 124.948 57.3954 124.704 57.8837C124.459 58.3721 124.337 58.9012 124.337 59.5523H120.268C120.268 58.2093 120.552 57.0698 121.163 56.093C121.773 55.1163 122.628 54.343 123.686 53.814C124.785 53.2849 126.006 53 127.43 53C128.896 53 130.157 53.2442 131.256 53.7733C132.355 54.3023 133.169 54.9942 133.779 55.8895C134.39 56.7849 134.675 57.843 134.675 59.0233C134.675 59.7965 134.512 60.5291 134.227 61.3023C133.942 62.0349 133.372 62.8895 132.64 63.7849C131.866 64.6802 130.808 65.7791 129.384 67.0407L126.413 69.9302V70.0523H134.959V73.5523H120.39V73.7151Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M146.692 74C145.227 74 143.884 73.7558 142.744 73.2267C141.605 72.6976 140.669 72.0058 140.017 71.1104C139.366 70.2151 139 69.157 139 67.9767H143.314C143.355 68.4651 143.517 68.9128 143.802 69.279C144.087 69.6453 144.494 69.9302 145.023 70.1337C145.512 70.3372 146.081 70.4593 146.733 70.4593C147.384 70.4593 147.954 70.3372 148.483 70.093C148.971 69.8488 149.378 69.5232 149.663 69.1162C149.948 68.7093 150.07 68.2209 150.07 67.6918C150.07 67.1627 149.907 66.6744 149.622 66.2674C149.337 65.8604 148.89 65.5348 148.32 65.2906C147.75 65.0465 147.099 64.9244 146.326 64.9244H144.413V61.75H146.326C146.977 61.75 147.546 61.6278 148.035 61.4244C148.523 61.2209 148.93 60.8953 149.215 60.4883C149.5 60.0814 149.622 59.6337 149.622 59.1046C149.622 58.5755 149.5 58.1278 149.256 57.7616C149.012 57.3953 148.686 57.0697 148.238 56.8662C147.791 56.6627 147.302 56.5406 146.733 56.5406C146.163 56.5406 145.634 56.6627 145.145 56.8662C144.657 57.0697 144.291 57.3546 143.965 57.7616C143.68 58.1278 143.517 58.6162 143.517 59.1046H139.407C139.407 57.9244 139.773 56.9069 140.424 56.0116C141.076 55.1162 141.93 54.4244 143.07 53.8953C144.169 53.4069 145.43 53.1221 146.814 53.1221C148.198 53.1221 149.459 53.3662 150.477 53.8953C151.535 54.4244 152.349 55.0756 152.919 55.9709C153.488 56.8256 153.773 57.8023 153.773 58.8604C153.773 60 153.448 60.936 152.715 61.7093C152.023 62.4825 151.087 62.9709 149.948 63.1744V63.3372C151.454 63.5407 152.593 64.029 153.366 64.8837C154.14 65.7383 154.547 66.7965 154.547 68.0581C154.547 69.1976 154.221 70.2558 153.529 71.1511C152.878 72.0465 151.942 72.7791 150.762 73.2674C149.581 73.7558 148.238 74 146.692 74Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M107.328 77V51H108.948V77H107.328ZM111.625 59.582C111.546 58.7628 111.207 58.1263 110.607 57.6727C110.008 57.219 109.195 56.9922 108.168 56.9922C107.47 56.9922 106.881 57.0938 106.4 57.2969C105.919 57.4932 105.551 57.7674 105.294 58.1195C105.044 58.4716 104.919 58.8711 104.919 59.318C104.905 59.6904 104.981 60.0154 105.146 60.293C105.317 60.5706 105.551 60.8109 105.847 61.0141C106.143 61.2104 106.486 61.3831 106.874 61.532C107.263 61.6742 107.677 61.7961 108.119 61.8977L109.936 62.3445C110.818 62.5477 111.628 62.8185 112.365 63.157C113.103 63.4956 113.742 63.912 114.281 64.4063C114.821 64.9005 115.24 65.4828 115.536 66.1531C115.839 66.8234 115.993 67.5919 116 68.4586C115.993 69.7315 115.677 70.8352 115.052 71.7695C114.433 72.6971 113.537 73.4182 112.365 73.9328C111.2 74.4406 109.794 74.6945 108.148 74.6945C106.515 74.6945 105.093 74.4372 103.881 73.9227C102.677 73.4081 101.735 72.6464 101.057 71.6375C100.385 70.6219 100.033 69.3659 100 67.8695H104.138C104.184 68.5669 104.379 69.1492 104.721 69.6164C105.07 70.0768 105.534 70.4255 106.114 70.6625C106.7 70.8927 107.361 71.0078 108.099 71.0078C108.823 71.0078 109.452 70.8995 109.985 70.6828C110.525 70.4661 110.943 70.1648 111.24 69.7789C111.536 69.393 111.684 68.9495 111.684 68.4484C111.684 67.9813 111.549 67.5885 111.279 67.2703C111.016 66.9521 110.627 66.6812 110.114 66.4578C109.607 66.2344 108.984 66.0313 108.247 65.8484L106.044 65.2797C104.339 64.8531 102.993 64.1862 102.005 63.2789C101.017 62.3716 100.527 61.1495 100.533 59.6125C100.527 58.3531 100.853 57.2529 101.511 56.3117C102.176 55.3706 103.088 54.6359 104.247 54.1078C105.406 53.5797 106.723 53.3156 108.198 53.3156C109.699 53.3156 111.009 53.5797 112.128 54.1078C113.254 54.6359 114.13 55.3706 114.756 56.3117C115.381 57.2529 115.704 58.343 115.723 59.582H111.625Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_947", x1: "46.395", y1: "79.4681", x2: "85.6845", y2: "79.4681", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_947", x1: "3.26025", y1: "79.4263", x2: "42.466", y2: "79.4263", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_947", x1: "3.51074", y1: "38.0679", x2: "85.4334", y2: "38.0679", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_947", x1: "46.4785", y1: "53.512", x2: "88.9446", y2: "53.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_947", x1: "0", y1: "53.512", x2: "42.466", y2: "53.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_947", x1: "0", y1: "121.056", x2: "160", y2: "121.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_947", x1: "0", y1: "151.903", x2: "160", y2: "151.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let regular = attributes.regular; let currency = attributes.currency; let discounted = attributes.discounted; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var separator = attributes.separator; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__.applyFilters)("isProFeature", true); var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProductData); // const [productData, setproductData] = useState(null); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var regularSelector = blockClass + " .regular"; var currencySelector = blockClass + " .currency"; var discountedSelector = blockClass + " .discounted"; const iconSelector = blockClass + " .icon"; const separatorSelector = blockClass + " .separator"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const [postPriceEdited, setpostPriceEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(regular.options.text); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); } setloading(false); }); }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var currencyX = attributes.currency; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var discountedX = attributes.discounted; var regularX = attributes.regular; var separatorX = attributes.separator; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (separatorX != undefined) { var separatorY = { ...separatorX, options: separator.options }; setAttributes({ separator: separatorY }); blockCssObj[separatorSelector] = separatorY; } if (regularX != undefined) { var regularY = { ...regularX, options: regular.options }; setAttributes({ regular: regularY }); blockCssObj[regularSelector] = regularY; } if (discountedX != undefined) { var discountedY = { ...discountedX, options: discounted.options }; setAttributes({ discounted: discountedY }); blockCssObj[discountedSelector] = discountedY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (currencyX != undefined) { var currencyY = { ...currencyX, options: currency.options }; setAttributes({ currency: currencyY }); blockCssObj[currencySelector] = currencyY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryRegular(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; regular[sudoScource] = sudoScourceArgs; }); var regularX = Object.assign({}, regular); setAttributes({ regular: regularX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, regularSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleRegular(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, regular); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ regular: object }); var elementSelector = myStore.getElementSelector(sudoScource, regularSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleRegular(sudoScource, key) { var object = myStore.deletePropertyDeep(regular, [sudoScource, key, breakPointX]); setAttributes({ regular: object }); var elementSelector = myStore.getElementSelector(sudoScource, regularSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleRegular(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, regular); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ regular: object }); } function onChangeStyleDiscounted(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, discounted); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ discounted: object }); var elementSelector = myStore.getElementSelector(sudoScource, discountedSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleDiscounted(sudoScource, key) { var object = myStore.deletePropertyDeep(discounted, [sudoScource, key, breakPointX]); setAttributes({ discounted: object }); var elementSelector = myStore.getElementSelector(sudoScource, discountedSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleDiscounted(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, discounted); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ discounted: object }); } /// function onChangeStyleCurrency(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, currency); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ currency: object }); var elementSelector = myStore.getElementSelector(sudoScource, currencySelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleCurrency(sudoScource, key) { var object = myStore.deletePropertyDeep(currency, [sudoScource, key, breakPointX]); setAttributes({ currency: object }); var elementSelector = myStore.getElementSelector(sudoScource, currencySelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleCurrency(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, currency); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ currency: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; // add bulk style start function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddCurrency(sudoScource, cssObj) { let obj = Object.assign({}, currency); obj[sudoScource] = cssObj; setAttributes({ currency: obj }); var selector = myStore.getElementSelector(sudoScource, currencySelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddRegular(sudoScource, cssObj) { let obj = Object.assign({}, regular); obj[sudoScource] = cssObj; setAttributes({ regular: obj }); var selector = myStore.getElementSelector(sudoScource, regularSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddDiscounted(sudoScource, cssObj) { let obj = Object.assign({}, discounted); obj[sudoScource] = cssObj; setAttributes({ discounted: obj }); var selector = myStore.getElementSelector(sudoScource, discountedSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } // add bulk style end // reset style start function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onResetCurrency(sudoScources) { let obj = Object.assign({}, currency); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, currencySelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ currency: obj }); } function onResetDiscounted(sudoScources) { let obj = Object.assign({}, discounted); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, discountedSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ discounted: obj }); } function onResetRegular(sudoScources) { let obj = Object.assign({}, regular); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, regularSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ regular: obj }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } // reset style end const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[regularSelector] = regular; blockCssObj[currencySelector] = currency; blockCssObj[discountedSelector] = discounted; blockCssObj[separatorSelector] = separator; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [regular]); const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${regular.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Regular", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: regular, onChange: onChangeStyleRegular, onAdd: onAddStyleRegular, onRemove: onRemoveStyleRegular, onBulkAdd: onBulkAddRegular, onReset: onResetRegular })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: regular, onChange: onPickCssLibraryRegular })))), productData != null && productData.type != "variable" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Discounted", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: discounted, onChange: onChangeStyleDiscounted, onAdd: onAddStyleDiscounted, onRemove: onRemoveStyleDiscounted, onBulkAdd: onBulkAddDiscounted, onReset: onResetDiscounted })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Currency", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: currency, onChange: onChangeStyleCurrency, onAdd: onAddStyleCurrency, onRemove: onRemoveStyleCurrency, onBulkAdd: onBulkAddCurrency, onReset: onResetCurrency })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Icon" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Icon"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prefix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "woo-price", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "woo-price" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Spinner, null)), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), productData != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, productData.type != "variable" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "regular" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "currency", dangerouslySetInnerHTML: { __html: productData.currency_symbol } }), productData.regular_price), productData.sale_price.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "discounted" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "currency", dangerouslySetInnerHTML: { __html: productData.currency_symbol } }), productData.sale_price)), productData.type == "variable" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "regular" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "currency", dangerouslySetInnerHTML: { __html: productData.currency_symbol } }), productData.min_price), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "regular" }, separator.options.text), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "regular" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "currency", dangerouslySetInnerHTML: { __html: productData.currency_symbol } }), productData.max_price))), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-product-info/index.js": /*!**********************************************!*\ !*** ./src/blocks/woo-product-info/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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 react_sortablejs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/menu.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-product-info/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.6845 32.978C85.6845 43.8453 85.6845 54.3782 85.6845 65.2455C72.7273 70.094 59.6866 74.9425 46.395 79.9581C46.395 69.0908 46.395 58.4744 46.395 47.6071C59.3522 42.7586 72.4765 37.9101 85.6845 32.978Z", fill: "url(#paint0_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 47.5235C42.466 58.3908 42.466 68.9237 42.466 79.8746C29.2581 74.9425 16.301 70.094 3.26025 65.2455C3.26025 54.4618 3.26025 43.9289 3.26025 32.978C16.4682 37.9101 29.5089 42.675 42.466 47.5235Z", fill: "url(#paint1_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.4334 14.8381C71.4731 20.0209 58.098 25.0366 44.4721 30.1358C31.0969 25.2037 17.6382 20.1045 3.51074 14.9216C12.4554 11.5779 20.7312 8.48485 29.0907 5.39185C33.6048 3.71996 38.1189 2.13166 42.633 0.376176C43.887 -0.125392 44.9736 -0.125392 46.2275 0.376176C59.1011 5.14107 72.0583 9.8224 85.4334 14.8381Z", fill: "url(#paint2_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M88.9446 17.5967C88.9446 21.0241 88.9446 24.2006 88.9446 27.628C74.9007 32.8109 60.8568 38.0774 46.4785 43.4274C46.4785 40 46.4785 36.907 46.4785 33.3961C60.4388 28.2132 74.6499 22.9467 88.9446 17.5967Z", fill: "url(#paint3_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 43.4274C28.0877 38.0774 14.0439 32.8109 0 27.628C0 24.2842 0 21.1077 0 17.5967C14.2947 22.9467 28.4221 28.1296 42.466 33.3961C42.466 36.7399 42.466 39.9164 42.466 43.4274Z", fill: "url(#paint4_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 89.4878H0V106.625H160V89.4878Z", fill: "url(#paint5_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 120.334H0V137.471H160V120.334Z", fill: "url(#paint6_linear_61_946)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_946", x1: "46.395", y1: "56.4681", x2: "85.6845", y2: "56.4681", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_946", x1: "3.26025", y1: "56.4263", x2: "42.466", y2: "56.4263", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_946", x1: "3.51074", y1: "15.0679", x2: "85.4334", y2: "15.0679", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_946", x1: "46.4785", y1: "30.512", x2: "88.9446", y2: "30.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_946", x1: "0", y1: "30.512", x2: "42.466", y2: "30.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_946", x1: "0", y1: "98.0562", x2: "160", y2: "98.0562", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_946", x1: "0", y1: "128.903", x2: "160", y2: "128.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var wrapper = attributes.wrapper; var items = attributes.items; var icon = attributes.icon; var postfix = attributes.postfix; var prefix = attributes.prefix; var itemInfo = attributes.itemInfo; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var wrapperSelector = blockClass; // Wrapper CSS Class Selectors var itemSelector = blockClass + " .item"; var itemLinkSelector = blockClass + " .item a"; var iconSelector = blockClass + " .item .icon"; var prefixSelector = blockClass + " .item .prefix"; var postfixSelector = blockClass + " .item .postfix"; var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; var [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.getBreakPoint()); const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProductData); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const CustomTagWrapper = `${wrapper.options.tag}`; const CustomTagPostTitle = items.options.tag.length != 0 ? `${items.options.tag}` : "div"; var elementsArgsBase = [{ id: "weight", label: "Weight", prefix: "Weight: ", postfix: "", value: "10kg", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: {}, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "length", label: "Length", prefix: "Length: ", postfix: "", value: "10cm", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: {}, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "width", label: "Width", prefix: "Width: ", postfix: "", value: "10cm", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: {}, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "height", label: "Height", prefix: "Height: ", postfix: "", value: "10cm", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: {}, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }, { id: "dimensions", label: "Dimensions", prefix: "Dimensions: ", postfix: "", value: "10cm X 10cm X 10cm", siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: {}, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }]; //let elementsArgs = applyFilters('elementsArgs', elementsArgsBase); var [elementsArgs, setelementsArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(elementsArgsBase); var [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_7__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); } var attributes = res.attributes; Object.entries(attributes).map(item => { var index = item[0]; var value = item[1]; elementsArgs.push({ id: index, label: value.label, type: "taxonomy", separator: ", ", linkTo: "termUrl", prefix: value.label + ": ", postfix: "", value: value.values, siteIcon: { library: "fontAwesome", srcType: "class", /*class, html, img, svg */iconSrc: "" }, options: {}, styles: { color: { Desktop: "" }, backgroundColor: { Desktop: "" }, padding: { Desktop: "" }, margin: { Desktop: "" } } }); }); setelementsArgs(elementsArgs); setloading(false); }); }, []); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); setAttributes({ blockCssY: { items: blockCssY.items } }); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; blockCssObj[iconSelector] = icon; // blockCssObj[itemSelector] = items; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var itemX = blockCssRules; setAttributes({ blockCssY: { items: itemX } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { items.elements.map((x, index) => { var styles = x.styles; Object.entries(styles).map(y => { var attrId = y[0]; var attrVal = y[1]; if (Object.keys(attrVal).length != 0) { var attrIdX = ""; var cssPropty = myStore.cssAttrParse(attrId); if (blockCssY.items[itemSelector + ".item-" + index + " a"] == undefined) { blockCssY.items[itemSelector + ".item-" + index + " a"] = {}; blockCssY.items[itemSelector + ".item-" + index + " a"][cssPropty] = attrVal; } else { blockCssY.items[itemSelector + ".item-" + index + " a"][cssPropty] = attrVal; } if (blockCssY.items[itemSelector + ".item-" + index] == undefined) { blockCssY.items[itemSelector + ".item-" + index] = {}; blockCssY.items[itemSelector + ".item-" + index][cssPropty] = attrVal; } else { blockCssY.items[itemSelector + ".item-" + index][cssPropty] = attrVal; } setAttributes({ blockCssY: { items: blockCssY.items } }); } }); }); setTimeout(x => { //setAttributes({ blockCssY: { items: newValuesObjX } }); }, 2000); }, [items]); //let elementsArgs = elementsArgsBase let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_9__.applyFilters)("isProFeature", true); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var iconX = attributes.icon; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var itemInfoX = attributes.itemInfo; var itemsX = attributes.items; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (itemsX != undefined) { var itemsY = { ...itemsX, options: items.options }; setAttributes({ items: itemsY }); blockCssObj[itemsSelector] = itemsY; } if (itemInfoX != undefined) { var itemInfoY = { ...itemInfoX, options: itemInfo.options }; setAttributes({ itemInfo: itemInfoY }); blockCssObj[itemInfoSelector] = itemInfoY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function addMedia(option, index) { //var isExist = items.elements.find(x => x.label === option.label); var elementsX = items.elements.push(option); setAttributes({ items: { ...items, elements: items.elements } }); } var breakPointList = [{ label: "Select..", icon: "", value: "" }]; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_10__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleItems(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, items); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItems(sudoScource, key) { var object = myStore.deletePropertyDeep(items, [sudoScource, key, breakPointX]); setAttributes({ items: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItems(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, items); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ items: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var index = extra.index; var path = [sudoScource, attr, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.updatePropertyDeep(objX, path, newVal); var itemsX = { ...items }; itemsX.elements[index] = object; setAttributes({ items: itemsX }); //setAttributes({ obj: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(attr); // let itemsX = Object.assign({}, blockCssY.items); // if (itemsX[elementSelector] == undefined) { // itemsX[elementSelector] = {}; // } // var cssPath = [elementSelector, cssPropty, breakPointX] // const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal) // setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var object = myStore.deletePropertyDeep(obj, [sudoScource, key, breakPointX]); console.log("removed"); var itemsX = { ...items }; itemsX.elements[index] = object; setAttributes({ items: itemsX }); //setAttributes({ items: object }); // var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); // var cssPropty = myStore.cssAttrParse(key); // var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); // setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key, obj, extra) { var index = extra.index; var path = [sudoScource, key, breakPointX]; let objX = Object.assign({}, obj); const object = myStore.addPropertyDeep(objX, path, ""); // console.log(added) var itemsX = { ...items }; itemsX.elements[index] = object; //setAttributes({ items: object }); setAttributes({ items: itemsX }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, items); obj[sudoScource] = cssObj; setAttributes({ items: obj }); var selector = myStore.getElementSelector(sudoScource, itemsSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } function onChangeBreakPoint(x, index) { var asdsdsd = wp.data.dispatch("postgrid-shop").setBreakPoint(x.value); asdsdsd.then(res => { setBreakPointX(res.breakpoint); myStore.generateBlockCss(blockCssY.items, blockId); }); } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.useBlockProps)({ className: ` ${blockId} pg-woo-product-info` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "UL", value: "ul" }, { label: "OL", value: "ol" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { ...wrapper, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Items", initialOpen: true }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: items.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "UL", value: "ul" }, { label: "OL", value: "ol" }, { label: "LI", value: "li" }], onChange: newVal => { var options = { ...items.options, tag: newVal }; setAttributes({ items: { ...items, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add Element"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_12__["default"], { position: "bottom right", variant: "secondary", options: elementsArgs, buttonTitle: "Choose", onChange: addMedia, values: "" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_4__.ReactSortable, { list: items.elements, handle: ".handle", setList: item => { setAttributes({ items: { ...items, elements: item } }); } }, items.elements.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var elementsX = items.elements.splice(index, 1); setAttributes({ items: { ...items, elements: items.elements } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "handle cursor-pointer hover:bg-blue-500 hover:text-white px-1 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, item.label)), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.prefix, placeholder: "", onChange: newVal => { items.elements[index].prefix = newVal; setAttributes({ items: { ...items, elements: items.elements } }); } })), item.id == "text" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.value, placeholder: "", onChange: newVal => { items.elements[index].value = newVal; setAttributes({ items: { ...items, elements: items.elements } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Postfix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: item.postfix, placeholder: "", onChange: newVal => { items.elements[index].postfix = newVal; setAttributes({ items: { ...items, elements: items.elements } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_15__["default"], { library: item.siteIcon.library, srcType: item.siteIcon.srcType, iconSrc: item.siteIcon.iconSrc, onChange: arg => { items.elements[index].siteIcon = { srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ items: { ...items, elements: items.elements } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: item, extra: { index: index }, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem })))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: items // extra={{ index: index }} , onChange: onChangeStyleItems, onAdd: onAddStyleItems, onRemove: onRemoveStyleItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "beforePostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prefix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Postfix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_18__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_20__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_19__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_16__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_17__["default"], { blockName: "woo-product-info", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_13__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_14__["default"], { utm: { utm_source: "BlockPostExcerpt", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "woo-product-info" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagWrapper, blockProps, items.elements.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagPostTitle, { className: "item item-" + index }, icon.options.position == "beforePrefix" && x.siteIcon.iconSrc.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), x.prefix.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "prefix" }, x.prefix), icon.options.position == "afterPrefix" && x.siteIcon.iconSrc.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), productData != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.id == "text" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value" }, x.value), x.id == "weight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value" }, productData.weight, "kg"), x.id == "length" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value" }, productData.length, "cm"), x.id == "width" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value" }, productData.width, "cm"), x.id == "height" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value" }, productData.height, "cm"), x.id == "dimensions" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value", dangerouslySetInnerHTML: { __html: productData.dimensions } }), x.type == "taxonomy" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "value", dangerouslySetInnerHTML: { __html: x.value } })), icon.options.position == "beforePostfix" && x.siteIcon.iconSrc.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` }), x.postfix.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "postfix" }, x.postfix), icon.options.position == "afterPostfix" && x.siteIcon.iconSrc.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: `icon ${x.siteIcon.iconSrc}` })); }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-sale/index.js": /*!**************************************!*\ !*** ./src/blocks/woo-sale/index.js ***! \**************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-sale/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_20__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.6845 43.978C85.6845 54.8453 85.6845 65.3782 85.6845 76.2455C72.7273 81.094 59.6866 85.9425 46.395 90.9581C46.395 80.0908 46.395 69.4744 46.395 58.6071C59.3522 53.7586 72.4765 48.9101 85.6845 43.978Z", fill: "url(#paint0_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 58.5235C42.466 69.3908 42.466 79.9237 42.466 90.8746C29.2581 85.9425 16.301 81.094 3.26025 76.2455C3.26025 65.4618 3.26025 54.9289 3.26025 43.978C16.4682 48.9101 29.5089 53.675 42.466 58.5235Z", fill: "url(#paint1_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.4334 25.8381C71.4731 31.0209 58.098 36.0366 44.4721 41.1358C31.0969 36.2037 17.6382 31.1045 3.51074 25.9216C12.4554 22.5779 20.7312 19.4848 29.0907 16.3918C33.6048 14.72 38.1189 13.1317 42.633 11.3762C43.887 10.8746 44.9736 10.8746 46.2275 11.3762C59.1011 16.1411 72.0583 20.8224 85.4334 25.8381Z", fill: "url(#paint2_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M88.9446 28.5967C88.9446 32.0241 88.9446 35.2006 88.9446 38.628C74.9007 43.8109 60.8568 49.0774 46.4785 54.4274C46.4785 51 46.4785 47.907 46.4785 44.3961C60.4388 39.2132 74.6499 33.9467 88.9446 28.5967Z", fill: "url(#paint3_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 54.4274C28.0877 49.0774 14.0439 43.8109 0 38.628C0 35.2842 0 32.1077 0 28.5967C14.2947 33.9467 28.4221 39.1296 42.466 44.3961C42.466 47.7399 42.466 50.9164 42.466 54.4274Z", fill: "url(#paint4_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 100.488H0V117.625H160V100.488Z", fill: "url(#paint5_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 131.334H0V148.471H160V131.334Z", fill: "url(#paint6_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M153 48.9737C153 61.696 142.696 72 129.974 72C124.769 72 119.933 70.2651 116.095 67.3737C110.575 63.168 107 56.4914 107 49.0262C107 36.304 117.304 26 130.026 26C135.862 26 141.224 28.1554 145.272 31.7829C150.003 35.9886 153 42.1394 153 48.9737Z", fill: "url(#paint7_linear_61_948)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { "fill-rule": "evenodd", "clip-rule": "evenodd", d: "M115.254 39.4162C115.254 36.5773 117.568 34.2642 120.406 34.2642C123.245 34.2642 125.558 36.5773 125.558 39.4162C125.558 42.255 123.245 44.5681 120.406 44.5681C117.568 44.5681 115.254 42.255 115.254 39.4162ZM134.39 58.5522C134.39 55.7133 136.704 53.4002 139.542 53.4002C142.381 53.4002 144.694 55.7133 144.694 58.5522C144.694 61.3911 142.381 63.7042 139.542 63.7042C136.704 63.7042 134.39 61.3911 134.39 58.5522ZM140.541 34.2642L144.694 38.4173L119.618 63.599L115.465 59.4459L140.541 34.2642Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_948", x1: "46.395", y1: "67.4681", x2: "85.6845", y2: "67.4681", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_948", x1: "3.26025", y1: "67.4263", x2: "42.466", y2: "67.4263", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_948", x1: "3.51074", y1: "26.0679", x2: "85.4334", y2: "26.0679", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_948", x1: "46.4785", y1: "41.512", x2: "88.9446", y2: "41.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_948", x1: "0", y1: "41.512", x2: "42.466", y2: "41.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_948", x1: "0", y1: "109.056", x2: "160", y2: "109.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_948", x1: "0", y1: "139.903", x2: "160", y2: "139.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_61_948", x1: "107", y1: "49", x2: "153", y2: "49", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let sale = attributes.sale; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; // console.log(postId); var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__.applyFilters)("isProFeature", true); var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProductData); // const [productData, setproductData] = useState(null); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var saleSelector = blockClass + " .sale"; // var currencySelector = blockClass + " .currency"; // var discountedSelector = blockClass + " .discounted"; const iconSelector = blockClass + " .icon"; // const separatorSelector = blockClass + " .separator"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const [postPriceEdited, setpostPriceEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(sale.options.text); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); } setloading(false); }); }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var saleX = attributes.sale; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (saleX != undefined) { var saleY = { ...saleX, options: sale.options }; setAttributes({ sale: saleY }); blockCssObj[saleSelector] = saleY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySale(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; sale[sudoScource] = sudoScourceArgs; }); var saleX = Object.assign({}, sale); setAttributes({ sale: saleX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, saleSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleSale(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, sale); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ sale: object }); var elementSelector = myStore.getElementSelector(sudoScource, saleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSale(sudoScource, key) { var object = myStore.deletePropertyDeep(sale, [sudoScource, key, breakPointX]); setAttributes({ sale: object }); var elementSelector = myStore.getElementSelector(sudoScource, saleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSale(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, sale); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ sale: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddSale(sudoScource, cssObj) { let obj = Object.assign({}, sale); obj[sudoScource] = cssObj; setAttributes({ sale: obj }); var selector = myStore.getElementSelector(sudoScource, saleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetSale(sudoScources) { let obj = Object.assign({}, sale); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, saleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ sale: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); // const [currentPostUrl, setCurrentPostUrl] = useEntityProp( // "postType", // postType, // "link", // postId // ); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ regular: regular }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[saleSelector] = sale; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [sale]); const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${sale.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); // console.log(icon.options.class); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "On Sale", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: sale.options.text, onChange: newVal => { var options = { ...sale.options, text: newVal }; setAttributes({ sale: { styles: sale.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Text for no sale"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: sale.options.noSale, onChange: newVal => { var options = { ...sale.options, noSale: newVal }; setAttributes({ sale: { styles: sale.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: sale, onChange: onChangeStyleSale, onAdd: onAddStyleSale, onRemove: onRemoveStyleSale, onBulkAdd: onBulkAddSale, onReset: onResetSale })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: sale, onChange: onPickCssLibrarySale })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_16__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_21__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_22__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_18__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_17__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_19__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_15__["default"], { blockName: "woo-sale", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_23__["default"], { slug: "woo-sale" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Spinner, null)), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefix.options.text), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), productData != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, productData.on_sale && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: sale.options.class }, sale.options.text), !productData.on_sale && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: sale.options.class }, sale.options.noSale)), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfix.options.text), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-sku/index.js": /*!*************************************!*\ !*** ./src/blocks/woo-sku/index.js ***! \*************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-sku/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M104.814 47L108.72 53.5854H108.856L112.762 47H117.394L111.49 56.6737L117.531 66.3473H112.807L108.811 59.7166H108.675L104.678 66.3473H100L106.086 56.6737L100.136 47H104.814Z", fill: "url(#paint0_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M118.893 47H123.48L127.885 55.3566H128.067L132.473 47H137.06L129.975 59.5349V66.3927H125.887V59.5349L118.893 47Z", fill: "url(#paint1_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M139.104 66.3927V63.9403L148.777 50.3608H139.104V47H153.955V49.4525L144.281 63.032H154V66.3927H139.104Z", fill: "url(#paint2_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.6845 49.978C85.6845 60.8453 85.6845 71.3782 85.6845 82.2455C72.7273 87.094 59.6866 91.9425 46.395 96.9581C46.395 86.0908 46.395 75.4744 46.395 64.6071C59.3522 59.7586 72.4765 54.9101 85.6845 49.978Z", fill: "url(#paint3_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 64.5235C42.466 75.3908 42.466 85.9237 42.466 96.8746C29.2581 91.9425 16.301 87.094 3.26025 82.2455C3.26025 71.4618 3.26025 60.9289 3.26025 49.978C16.4682 54.9101 29.5089 59.675 42.466 64.5235Z", fill: "url(#paint4_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.4334 31.8381C71.4731 37.0209 58.098 42.0366 44.4721 47.1358C31.0969 42.2037 17.6382 37.1045 3.51074 31.9216C12.4554 28.5779 20.7312 25.4848 29.0907 22.3918C33.6048 20.72 38.1189 19.1317 42.633 17.3762C43.887 16.8746 44.9736 16.8746 46.2275 17.3762C59.1011 22.1411 72.0583 26.8224 85.4334 31.8381Z", fill: "url(#paint5_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M88.9446 34.5967C88.9446 38.0241 88.9446 41.2006 88.9446 44.628C74.9007 49.8109 60.8568 55.0774 46.4785 60.4274C46.4785 57 46.4785 53.907 46.4785 50.3961C60.4388 45.2132 74.6499 39.9467 88.9446 34.5967Z", fill: "url(#paint6_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 60.4274C28.0877 55.0774 14.0439 49.8109 0 44.628C0 41.2842 0 38.1077 0 34.5967C14.2947 39.9467 28.4221 45.1296 42.466 50.3961C42.466 53.7399 42.466 56.9164 42.466 60.4274Z", fill: "url(#paint7_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 106.488H0V123.625H160V106.488Z", fill: "url(#paint8_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 137.334H0V154.471H160V137.334Z", fill: "url(#paint9_linear_61_938)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_938", x1: "100", y1: "56.6737", x2: "117.531", y2: "56.6737", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_938", x1: "118.893", y1: "56.6964", x2: "137.06", y2: "56.6964", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_938", x1: "139.104", y1: "56.6964", x2: "154", y2: "56.6964", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_938", x1: "46.395", y1: "73.4681", x2: "85.6845", y2: "73.4681", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_938", x1: "3.26025", y1: "73.4263", x2: "42.466", y2: "73.4263", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_938", x1: "3.51074", y1: "32.0679", x2: "85.4334", y2: "32.0679", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_938", x1: "46.4785", y1: "47.512", x2: "88.9446", y2: "47.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_61_938", x1: "0", y1: "47.512", x2: "42.466", y2: "47.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint8_linear_61_938", x1: "0", y1: "115.056", x2: "160", y2: "115.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint9_linear_61_938", x1: "0", y1: "145.903", x2: "160", y2: "145.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let sku = attributes.sku; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProductData); // const [productData, setproductData] = useState(null); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var skuSelector = blockClass + " .sku"; // var currencySelector = blockClass + " .currency"; // var discountedSelector = blockClass + " .discounted"; const iconSelector = blockClass + " .icon"; // const separatorSelector = blockClass + " .separator"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const [postPriceEdited, setpostPriceEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(sku.options.text); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"]); setpostfixText(text); }, [postfix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); } setloading(false); }); }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var skuX = attributes.sku; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (skuX != undefined) { var skuY = { ...skuX, options: sku.options }; setAttributes({ sku: skuY }); blockCssObj[skuSelector] = skuY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySku(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; sku[sudoScource] = sudoScourceArgs; }); var skuX = Object.assign({}, sku); setAttributes({ sku: skuX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, skuSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleSku(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, sku); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ sku: object }); var elementSelector = myStore.getElementSelector(sudoScource, skuSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSku(sudoScource, key) { var object = myStore.deletePropertyDeep(sku, [sudoScource, key, breakPointX]); setAttributes({ sku: object }); var elementSelector = myStore.getElementSelector(sudoScource, skuSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSku(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, sku); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ sku: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddSku(sudoScource, cssObj) { let obj = Object.assign({}, sku); obj[sudoScource] = cssObj; setAttributes({ sku: obj }); var selector = myStore.getElementSelector(sudoScource, skuSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetSku(sudoScources) { let obj = Object.assign({}, sku); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, skuSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ sku: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ regular: regular }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[skuSelector] = sku; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [sku]); const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${sku.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} pg-woo-sku` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "SKU", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: sku.options.text, onChange: newVal => { var options = { ...sku.options, text: newVal }; setAttributes({ sku: { styles: sku.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: sku, onChange: onChangeStyleSku, onAdd: onAddStyleSku, onRemove: onRemoveStyleSku, onBulkAdd: onBulkAddSku, onReset: onResetSku })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: sku, onChange: onPickCssLibrarySku })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_13__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prefix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Postfix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "woo-sku", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "woo-sale" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Spinner, null)), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), productData != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: sku.options.class }, productData.sku), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfixText)), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-star-rate/index.js": /*!*******************************************!*\ !*** ./src/blocks/woo-star-rate/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-star-rate/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.6845 43.978C85.6845 54.8453 85.6845 65.3782 85.6845 76.2455C72.7273 81.094 59.6866 85.9425 46.395 90.9581C46.395 80.0908 46.395 69.4744 46.395 58.6071C59.3522 53.7586 72.4765 48.9101 85.6845 43.978Z", fill: "url(#paint0_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 58.5235C42.466 69.3908 42.466 79.9237 42.466 90.8746C29.2581 85.9425 16.301 81.094 3.26025 76.2455C3.26025 65.4618 3.26025 54.9289 3.26025 43.978C16.4682 48.9101 29.5089 53.675 42.466 58.5235Z", fill: "url(#paint1_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M85.4334 25.8381C71.4731 31.0209 58.098 36.0366 44.4721 41.1358C31.0969 36.2037 17.6382 31.1045 3.51074 25.9216C12.4554 22.5779 20.7312 19.4848 29.0907 16.3918C33.6048 14.72 38.1189 13.1317 42.633 11.3762C43.887 10.8746 44.9736 10.8746 46.2275 11.3762C59.1011 16.1411 72.0583 20.8224 85.4334 25.8381Z", fill: "url(#paint2_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M88.9446 28.5967C88.9446 32.0241 88.9446 35.2006 88.9446 38.628C74.9007 43.8109 60.8568 49.0774 46.4785 54.4274C46.4785 51 46.4785 47.907 46.4785 44.3961C60.4388 39.2132 74.6499 33.9467 88.9446 28.5967Z", fill: "url(#paint3_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M42.466 54.4274C28.0877 49.0774 14.0439 43.8109 0 38.628C0 35.2842 0 32.1077 0 28.5967C14.2947 33.9467 28.4221 39.1296 42.466 44.3961C42.466 47.7399 42.466 50.9164 42.466 54.4274Z", fill: "url(#paint4_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 100.488H0V117.625H160V100.488Z", fill: "url(#paint5_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 131.334H0V148.471H160V131.334Z", fill: "url(#paint6_linear_61_949)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M101.557 54.2881L96.5895 56.9114C96.041 57.2017 95.4097 56.7351 95.5132 56.1337L96.4653 50.5863C96.5067 50.3479 96.4239 50.099 96.248 49.9331L92.2221 46.0033C91.7874 45.5781 92.0254 44.8212 92.636 44.7383L98.1936 43.9295C98.4317 43.8984 98.6387 43.7428 98.7525 43.5251L101.236 38.4754C101.505 37.9258 102.292 37.9258 102.561 38.4754L105.045 43.5251C105.148 43.7428 105.366 43.8984 105.604 43.9295L111.161 44.7383C111.772 44.8316 112.01 45.5781 111.575 46.0033L107.549 49.9331C107.374 50.099 107.291 50.3479 107.332 50.5863L108.284 56.1337C108.388 56.7351 107.756 57.2017 107.208 56.9114L102.24 54.2881C102.033 54.174 101.775 54.174 101.557 54.2881Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M125.658 54.2881L120.691 56.9114C120.142 57.2017 119.511 56.7351 119.614 56.1337L120.566 50.5863C120.608 50.3479 120.525 50.099 120.349 49.9331L116.323 46.0033C115.888 45.5781 116.126 44.8212 116.737 44.7383L122.295 43.9295C122.533 43.8984 122.74 43.7428 122.854 43.5251L125.337 38.4754C125.607 37.9258 126.393 37.9258 126.662 38.4754L129.146 43.5251C129.25 43.7428 129.467 43.8984 129.705 43.9295L135.263 44.7383C135.873 44.8316 136.111 45.5781 135.676 46.0033L131.651 49.9331C131.475 50.099 131.392 50.3479 131.433 50.5863L132.385 56.1337C132.489 56.7351 131.858 57.2017 131.309 56.9114L126.341 54.2881C126.134 54.174 125.876 54.174 125.658 54.2881Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M149.76 54.2881L144.792 56.9114C144.244 57.2017 143.612 56.7351 143.716 56.1337L144.668 50.5863C144.709 50.3479 144.627 50.099 144.451 49.9331L140.425 46.0033C139.99 45.5781 140.228 44.8212 140.839 44.7383L146.396 43.9295C146.634 43.8984 146.841 43.7428 146.955 43.5251L149.439 38.4754C149.708 37.9258 150.495 37.9258 150.764 38.4754L153.248 43.5251C153.351 43.7428 153.568 43.8984 153.806 43.9295L159.364 44.7383C159.975 44.8316 160.213 45.5781 159.778 46.0033L155.752 49.9331C155.576 50.099 155.493 50.3479 155.535 50.5863L156.487 56.1337C156.59 56.7351 155.959 57.2017 155.411 56.9114L150.443 54.2881C150.236 54.174 149.977 54.174 149.76 54.2881Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_949", x1: "46.395", y1: "67.4681", x2: "85.6845", y2: "67.4681", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_949", x1: "3.26025", y1: "67.4263", x2: "42.466", y2: "67.4263", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_949", x1: "3.51074", y1: "26.0679", x2: "85.4334", y2: "26.0679", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_949", x1: "46.4785", y1: "41.512", x2: "88.9446", y2: "41.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_949", x1: "0", y1: "41.512", x2: "42.466", y2: "41.512", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_949", x1: "0", y1: "109.056", x2: "160", y2: "109.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_949", x1: "0", y1: "139.903", x2: "160", y2: "139.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var iconsWrap = attributes.iconsWrap; var iconsIdle = attributes.iconsIdle; var iconsFilled = attributes.iconsFilled; var summary = attributes.summary; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__.applyFilters)("isProFeature", true); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const iconsWrapSelector = blockClass + " .icons-wrap"; const iconsFilledSelector = blockClass + " .icons-filled"; const iconsIdleSelector = blockClass + " .icons-idle"; const summarySelector = blockClass + " .summary"; const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var str = "bat, ball, cat"; var map = { "{rating_count}": "", "{review_count}": "", "{average_rating}": "", "{product_title}": "" }; var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 2, review_count: 2, average_rating: "4.25", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProductData); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [ratingMap, setratingMap] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(map); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); } var map = { "{rating_count}": productData.rating_count, "{review_count}": productData.review_count, "{average_rating}": productData.average_rating, "{product_title}": productData.post_title }; setratingMap(map); setloading(false); }); }, [productData]); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; // console.log(content); // console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var summaryX = attributes.summary; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var iconsWrapX = attributes.iconsWrap; var iconsIdleX = attributes.iconsIdle; var iconsFilledX = attributes.iconsFilled; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconsFilledX != undefined) { var iconsFilledY = { ...iconsFilledX, options: iconsFilled.options }; setAttributes({ iconsFilled: iconsFilledY }); blockCssObj[iconsFilledSelector] = iconsFilledY; } if (iconsIdleX != undefined) { var iconsIdleY = { ...iconsIdleX, options: iconsIdle.options }; setAttributes({ iconsIdle: iconsIdleY }); blockCssObj[iconsIdleSelector] = iconsIdleY; } if (iconsWrapX != undefined) { var iconsWrapY = { ...iconsWrapX, options: iconsWrap.options }; setAttributes({ iconsWrap: iconsWrapY }); blockCssObj[iconsWrapSelector] = iconsWrapY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (summaryX != undefined) { var summaryY = { ...summaryX, options: summary.options }; setAttributes({ summary: summaryY }); blockCssObj[summarySelector] = summaryY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...iconsWrap.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ iconsWrap: { ...iconsWrap, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryiconsWrap(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; iconsWrap[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, iconsWrap); setAttributes({ iconsWrap: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconsWrapSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleIconsWrap(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconsWrap); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsWrapSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconsWrap(sudoScource, key) { var object = myStore.deletePropertyDeep(iconsWrap, [sudoScource, key, breakPointX]); setAttributes({ iconsWrap: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsWrapSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconsWrap(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconsWrap); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconsWrap: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } // function onChangeStyleIconsIdle(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconsIdle); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconsIdle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconsIdle(sudoScource, key) { var object = myStore.deletePropertyDeep(iconsIdle, [sudoScource, key, breakPointX]); setAttributes({ iconsIdle: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconsIdle(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconsIdle); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconsIdle: object }); } ///// function onChangeStyleIconsFilled(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, iconsFilled); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ iconsFilled: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIconsFilled(sudoScource, key) { var object = myStore.deletePropertyDeep(iconsFilled, [sudoScource, key, breakPointX]); setAttributes({ iconsFilled: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIconsFilled(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, iconsFilled); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ iconsFilled: object }); } ///// function onChangeStyleSummary(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, summary); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ summary: object }); var elementSelector = myStore.getElementSelector(sudoScource, summarySelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSummary(sudoScource, key) { var object = myStore.deletePropertyDeep(summary, [sudoScource, key, breakPointX]); setAttributes({ summary: object }); var elementSelector = myStore.getElementSelector(sudoScource, summarySelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSummary(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, summary); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ summary: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddSummary(sudoScource, cssObj) { let obj = Object.assign({}, summary); obj[sudoScource] = cssObj; setAttributes({ summary: obj }); var selector = myStore.getElementSelector(sudoScource, summarySelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetSummary(sudoScources) { let obj = Object.assign({}, summary); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, summarySelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ summary: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddIconsWrap(sudoScource, cssObj) { let obj = Object.assign({}, iconsWrap); obj[sudoScource] = cssObj; setAttributes({ iconsWrap: obj }); var selector = myStore.getElementSelector(sudoScource, iconsWrapSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIconsWrap(sudoScources) { let obj = Object.assign({}, iconsWrap); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconsWrapSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ iconsWrap: obj }); } function onBulkAddIconsIdle(sudoScource, cssObj) { let obj = Object.assign({}, iconsIdle); obj[sudoScource] = cssObj; setAttributes({ iconsIdle: obj }); var selector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIconsIdle(sudoScources) { let obj = Object.assign({}, iconsIdle); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconsIdleSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ iconsIdle: obj }); } function onBulkAddIconsFilled(sudoScource, cssObj) { let obj = Object.assign({}, iconsFilled); obj[sudoScource] = cssObj; setAttributes({ iconsFilled: obj }); var selector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIconsFilled(sudoScources) { let obj = Object.assign({}, iconsFilled); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconsFilledSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ iconsFilled: obj }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = iconsWrap.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [iconsWrap]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "link", postId); // // Wrapper CSS Class Selectors // const wrapperSelector = blockClass; // const prefixSelector = blockClass + " .prefix"; // const postfixSelector = blockClass + " .postfix"; // const iconsWrapSelector = blockClass + " .icons-wrap"; // const iconsFilledSelector = blockClass + " .icons-filled"; // const iconsIdleSelector = blockClass + " .icons-idle"; // const summarySelector = blockClass + " .summary"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[iconsWrapSelector] = iconsWrap; blockCssObj[iconsFilledSelector] = iconsFilled; blockCssObj[iconsIdleSelector] = iconsIdle; blockCssObj[summarySelector] = summary; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); onChangeStyleIconsFilled("styles", parseFloat(productData.average_rating) * 20 + "%", "width"); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { onChangeStyleIconsFilled("styles", parseFloat(productData.average_rating) * 20 + "%", "width"); }, [productData]); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"]); setpostfixText(text); }, [postfix.options.text]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); function replaceAll(str, correction) { Object.keys(correction).forEach(key => { str = str.replaceAll(key, correction[key]); }); return str; } const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} pg-woo-star-rate` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons Wrap", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_13__["default"], { library: iconsWrap.options.library, srcType: iconsWrap.options.srcType, iconSrc: iconsWrap.options.iconSrc, onChange: onChangeIcon }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: iconsWrap, onChange: onChangeStyleIconsWrap, onAdd: onAddStyleIconsWrap, onRemove: onRemoveStyleIconsWrap, onBulkAdd: onBulkAddIconsWrap, onReset: onResetIconsWrap })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: iconsWrap, onChange: onPickCssLibraryiconsWrap })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons Idle", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: iconsIdle, onChange: onChangeStyleIconsIdle, onAdd: onAddStyleIconsIdle, onRemove: onRemoveStyleIconsIdle, onBulkAdd: onBulkAddIconsIdle, onReset: onResetIconsIdle })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icons Filled", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: iconsFilled, onChange: onChangeStyleIconsFilled, onAdd: onAddStyleIconsFilled, onRemove: onRemoveStyleIconsFilled, onBulkAdd: onBulkAddIconsFilled, onReset: onResetIconsFilled })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Summary", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.RadioControl, { label: "Summary Type", selected: summary.options.type, options: [{ label: "None", value: "" }, { label: "123 customer reviews", value: "{review_count} customer reviews" }, { label: "4.50/5.00", value: "{average_rating}/5.00" }, { label: "4.50 out of 5.00", value: "{average_rating} out of 5.00" }, { label: "4.50(123 reviews)", value: "{average_rating}({review_count} reviews)" }], onChange: value => { var options = { ...summary.options, type: value }; setAttributes({ summary: { ...summary, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Summary", " "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: summary.options.typeCustom, placeholder: "{average_rating} out of 5.00", disabled: isProFeature ? true : false, onChange: newVal => { var options = { ...summary.options, typeCustom: newVal }; setAttributes({ summary: { ...summary, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, "Please use following tags:"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "{rating_count}")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "{review_count}")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "{average_rating}")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("code", null, "{product_title}")))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: summary, onChange: onChangeStyleSummary, onAdd: onAddStyleSummary, onRemove: onRemoveStyleSummary, onBulkAdd: onBulkAddSummary, onReset: onResetSummary })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "woo-star-rate", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "woo-star-rate" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefixText), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "icons-wrap" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "icons-idle" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "icons-filled" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: iconsWrap.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "summary" }, summary.options.typeCustom.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, replaceAll(summary.options.type, ratingMap)), summary.options.typeCustom.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, replaceAll(summary.options.typeCustom, ratingMap))), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfixText)))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-stock-quantity/index.js": /*!************************************************!*\ !*** ./src/blocks/woo-stock-quantity/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-stock-quantity/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "161", viewBox: "0 0 160 161", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 112.488H0V129.625H160V112.488Z", fill: "url(#paint0_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 143.334H0V160.471H160V143.334Z", fill: "url(#paint1_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M108.076 52.4067V72.7149H103.762V56.4765H103.64L99 59.4067V55.5812L104.047 52.4067H108.076Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M119.39 72.7151V69.6221L126.634 62.907C127.244 62.2965 127.773 61.7675 128.18 61.2791C128.587 60.7907 128.913 60.343 129.157 59.8547C129.361 59.407 129.483 58.8779 129.483 58.3488C129.483 57.7384 129.361 57.25 129.076 56.8023C128.791 56.3547 128.425 56.0291 127.977 55.7849C127.489 55.5407 126.959 55.4186 126.39 55.4186C125.779 55.4186 125.209 55.5407 124.762 55.7849C124.314 56.0291 123.948 56.3954 123.704 56.8837C123.459 57.3721 123.337 57.9012 123.337 58.5523H119.268C119.268 57.2093 119.552 56.0698 120.163 55.093C120.773 54.1163 121.628 53.343 122.686 52.814C123.785 52.2849 125.006 52 126.43 52C127.896 52 129.157 52.2442 130.256 52.7733C131.355 53.3023 132.169 53.9942 132.779 54.8895C133.39 55.7849 133.675 56.843 133.675 58.0233C133.675 58.7965 133.512 59.5291 133.227 60.3023C132.942 61.0349 132.372 61.8895 131.64 62.7849C130.866 63.6802 129.808 64.7791 128.384 66.0407L125.413 68.9302V69.0523H133.959V72.5523H119.39V72.7151Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M150.971 73C149.506 73 148.163 72.7558 147.023 72.2267C145.883 71.6976 144.947 71.0058 144.296 70.1104C143.645 69.2151 143.279 68.157 143.279 66.9767H147.593C147.634 67.4651 147.796 67.9128 148.081 68.279C148.366 68.6453 148.773 68.9302 149.302 69.1337C149.79 69.3372 150.36 69.4593 151.011 69.4593C151.663 69.4593 152.232 69.3372 152.761 69.093C153.25 68.8488 153.657 68.5232 153.942 68.1162C154.226 67.7093 154.349 67.2209 154.349 66.6918C154.349 66.1627 154.186 65.6744 153.901 65.2674C153.616 64.8604 153.168 64.5348 152.599 64.2906C152.029 64.0465 151.378 63.9244 150.604 63.9244H148.692V60.75H150.604C151.256 60.75 151.825 60.6278 152.314 60.4244C152.802 60.2209 153.209 59.8953 153.494 59.4883C153.779 59.0814 153.901 58.6337 153.901 58.1046C153.901 57.5755 153.779 57.1278 153.535 56.7616C153.29 56.3953 152.965 56.0697 152.517 55.8662C152.069 55.6627 151.581 55.5406 151.011 55.5406C150.442 55.5406 149.913 55.6627 149.424 55.8662C148.936 56.0697 148.569 56.3546 148.244 56.7616C147.959 57.1278 147.796 57.6162 147.796 58.1046H143.686C143.686 56.9244 144.052 55.9069 144.703 55.0116C145.354 54.1162 146.209 53.4244 147.349 52.8953C148.447 52.4069 149.709 52.1221 151.093 52.1221C152.476 52.1221 153.738 52.3662 154.756 52.8953C155.814 53.4244 156.628 54.0756 157.197 54.9709C157.767 55.8256 158.052 56.8023 158.052 57.8604C158.052 59 157.727 59.936 156.994 60.7093C156.302 61.4825 155.366 61.9709 154.227 62.1744V62.3372C155.732 62.5407 156.872 63.029 157.645 63.8837C158.418 64.7383 158.825 65.7965 158.825 67.0581C158.825 68.1976 158.5 69.2558 157.808 70.1511C157.157 71.0465 156.221 71.7791 155.04 72.2674C153.86 72.7558 152.517 73 150.971 73Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M47.9837 78.4038C47.9837 83.8613 47.9837 89.1256 47.9837 94.5831C41.512 96.9979 34.9437 99.461 28.3271 101.924C28.3271 96.4666 28.3271 91.154 28.3271 85.6965C34.7988 83.33 41.3188 80.8669 47.9837 78.4038Z", fill: "url(#paint2_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M26.2991 85.6965C26.2991 91.1057 26.2991 96.4183 26.2991 101.924C19.6825 99.461 13.1626 96.9979 6.64258 94.5831C6.64258 89.2222 6.64258 83.9096 6.64258 78.4038C13.3075 80.8669 19.8274 83.2817 26.2991 85.6965Z", fill: "url(#paint3_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M47.8394 69.324C40.8365 71.932 34.1233 74.4434 27.3135 76.9548C20.6486 74.4917 13.8389 71.932 6.7876 69.324C11.2309 67.6336 15.4326 66.0881 19.6344 64.5426C21.9043 63.7216 24.1742 62.9005 26.4442 62.0312C27.072 61.7897 27.6032 61.7897 28.2311 62.0312C34.6545 64.446 41.1262 66.8609 47.8394 69.324Z", fill: "url(#paint4_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M49.5775 70.7246C49.5775 72.4633 49.5775 74.0088 49.5775 75.7474C42.5745 78.3554 35.475 81.0117 28.3271 83.668C28.3271 81.9777 28.3271 80.4322 28.3271 78.6452C35.3301 76.0372 42.4297 73.3809 49.5775 70.7246Z", fill: "url(#paint5_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M26.2986 83.668C19.1025 80.9634 12.0513 78.3554 5 75.7474C5 74.0571 5 72.4633 5 70.7246C12.1478 73.3809 19.2474 76.0372 26.2986 78.6452C26.2986 80.3356 26.2986 81.8811 26.2986 83.668Z", fill: "url(#paint6_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M95.7967 78.4038C95.7967 83.8613 95.7967 89.1256 95.7967 94.5831C89.325 96.9979 82.7567 99.461 76.1401 101.924C76.1401 96.4666 76.1401 91.154 76.1401 85.6965C82.6118 83.33 89.1801 80.8669 95.7967 78.4038Z", fill: "url(#paint7_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M74.1605 85.6965C74.1605 91.1057 74.1605 96.4183 74.1605 101.924C67.5439 99.461 61.0239 96.9979 54.5039 94.5831C54.5039 89.2222 54.5039 83.9096 54.5039 78.4038C61.1205 80.8669 67.6405 83.2817 74.1605 85.6965Z", fill: "url(#paint8_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M95.6519 69.324C88.6489 71.932 81.9357 74.4434 75.126 76.9548C68.4611 74.4917 61.6514 71.932 54.6001 69.324C59.0434 67.6336 63.2451 66.0881 67.4469 64.5426C69.7168 63.7216 71.9867 62.9005 74.2566 62.0312C74.8845 61.7897 75.4158 61.7897 76.0436 62.0312C82.5153 64.446 88.9387 66.8609 95.6519 69.324Z", fill: "url(#paint9_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M97.4393 70.7246C97.4393 72.4633 97.4393 74.0088 97.4393 75.7474C90.4364 78.3554 83.3368 81.0117 76.189 83.668C76.189 81.9777 76.189 80.4322 76.189 78.6452C83.1436 76.0372 90.2432 73.3809 97.4393 70.7246Z", fill: "url(#paint10_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M74.16 83.668C66.9639 80.9634 59.9126 78.3554 52.8613 75.7474C52.8613 74.0571 52.8613 72.4633 52.8613 70.7246C60.0092 73.3809 67.1087 76.0372 74.16 78.6452C74.16 80.3356 74.16 81.8811 74.16 83.668Z", fill: "url(#paint11_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M71.8904 41.5537C71.8904 47.0112 71.8904 52.2755 71.8904 57.733C65.4187 60.1478 58.8505 62.6109 52.2339 65.074C52.2339 59.6165 52.2339 54.3039 52.2339 48.8464C58.7056 46.4799 65.2256 44.0651 71.8904 41.5537Z", fill: "url(#paint12_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M50.2533 48.8948C50.2533 54.304 50.2533 59.6165 50.2533 65.1223C43.6367 62.6592 37.1167 60.1961 30.5967 57.7813C30.5967 52.4204 30.5967 47.1078 30.5967 41.6021C37.2133 44.0652 43.7333 46.48 50.2533 48.8948Z", fill: "url(#paint13_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M71.7456 32.4738C64.7427 35.0818 58.0295 37.5933 51.2198 40.1047C44.5549 37.6416 37.7451 35.0818 30.6938 32.4738C35.1371 30.7835 39.3389 29.238 43.5406 27.6925C45.8106 26.8715 48.0805 26.0504 50.3504 25.1811C50.9782 24.9396 51.5095 24.9396 52.1373 25.1811C58.5607 27.6442 65.0325 30.0107 71.7456 32.4738Z", fill: "url(#paint14_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M73.5331 33.8745C73.5331 35.6132 73.5331 37.1587 73.5331 38.8973C66.5301 41.5053 59.4306 44.1616 52.2827 46.8179C52.2827 45.1275 52.2827 43.5821 52.2827 41.7951C59.2374 39.2354 66.3369 36.5791 73.5331 33.8745Z", fill: "url(#paint15_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M50.2059 46.8179C43.0097 44.1133 35.9585 41.5053 28.9072 38.8973C28.9072 37.207 28.9072 35.6132 28.9072 33.8745C36.0551 36.5308 43.1546 39.1871 50.2059 41.7951C50.2059 43.4855 50.2059 45.0792 50.2059 46.8179Z", fill: "url(#paint16_linear_67_1060)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_67_1060", x1: "0", y1: "121.056", x2: "160", y2: "121.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_67_1060", x1: "0", y1: "151.903", x2: "160", y2: "151.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_67_1060", x1: "28.3271", y1: "90.164", x2: "47.9837", y2: "90.164", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_67_1060", x1: "6.64258", y1: "90.164", x2: "26.2991", y2: "90.164", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_67_1060", x1: "6.7876", y1: "69.4024", x2: "47.8394", y2: "69.4024", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_67_1060", x1: "28.3271", y1: "77.1963", x2: "49.5775", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint6_linear_67_1060", x1: "5", y1: "77.1963", x2: "26.2986", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint7_linear_67_1060", x1: "76.1401", y1: "90.164", x2: "95.7967", y2: "90.164", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint8_linear_67_1060", x1: "54.5039", y1: "90.164", x2: "74.1605", y2: "90.164", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint9_linear_67_1060", x1: "54.6001", y1: "69.4024", x2: "95.6519", y2: "69.4024", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint10_linear_67_1060", x1: "76.189", y1: "77.1963", x2: "97.4393", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint11_linear_67_1060", x1: "52.8613", y1: "77.1963", x2: "74.16", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint12_linear_67_1060", x1: "52.2339", y1: "53.3138", x2: "71.8904", y2: "53.3138", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint13_linear_67_1060", x1: "30.5967", y1: "53.3622", x2: "50.2533", y2: "53.3622", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint14_linear_67_1060", x1: "30.6938", y1: "32.5523", x2: "71.7456", y2: "32.5523", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint15_linear_67_1060", x1: "52.2827", y1: "40.3462", x2: "73.5331", y2: "40.3462", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint16_linear_67_1060", x1: "28.9072", y1: "40.3462", x2: "50.2059", y2: "40.3462", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let stockQuantity = attributes.stockQuantity; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setpostfixText(text); }, [postfix.options.text]); var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, archiveDate: { label: "Date Archive", value: "archiveDate" }, archiveYear: { label: "Year Archive", value: "archiveYear" }, archiveMonth: { label: "Month Archive", value: "archiveMonth" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("linkToArgs", linkToArgsBasic); // const [ // currentPostSKU, // setcurrentPostSKU, // ] = useEntityProp('postType', postType, 'date', postId); //const [postStokQuantityEdited, setpostStokQuantityEdited] = useState(currentPostSKU == null ? ); const [postStokQuantityEdited, setpostStokQuantityEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(stockQuantity.options.text); // useEffect(() => { // var postTypeX = postType; // if (postType == 'post') { // var postTypeX = 'posts'; // } // if (postType == 'page') { // var postTypeX = 'pages'; // } // apiFetch({ // path: '/wp/v2/' + postTypeX + '/' + postId, // method: 'POST', // }).then((res) => { // console.log(res); // }); // }, []); var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultProductData); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); } setloading(false); }); }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var stockQuantityX = attributes.stockQuantity; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (stockQuantityX != undefined) { var stockQuantityY = { ...stockQuantityX, options: stockQuantity.options }; setAttributes({ stockQuantity: stockQuantityY }); blockCssObj[stockQuantitySelector] = stockQuantityY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function setFieldLinkTo(option, index) { var options = { ...stockQuantity.options, linkTo: option.value }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryStokQuantity(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; stockQuantity[sudoScource] = sudoScourceArgs; }); var stockQuantityX = Object.assign({}, stockQuantity); setAttributes({ stockQuantity: stockQuantityX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, stockQuantitySelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleStokQuantity(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, stockQuantity); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ stockQuantity: object }); var elementSelector = myStore.getElementSelector(sudoScource, stockQuantitySelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleStokQuantity(sudoScource, key) { var object = myStore.deletePropertyDeep(stockQuantity, [sudoScource, key, breakPointX]); setAttributes({ stockQuantity: object }); var elementSelector = myStore.getElementSelector(sudoScource, stockQuantitySelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleStokQuantity(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, stockQuantity); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ stockQuantity: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddStockQuantity(sudoScource, cssObj) { let obj = Object.assign({}, stockQuantity); obj[sudoScource] = cssObj; setAttributes({ stockQuantity: obj }); var selector = myStore.getElementSelector(sudoScource, stockQuantitySelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetStockQuantity(sudoScources) { let obj = Object.assign({}, stockQuantity); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, stockQuantitySelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ stockQuantity: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var stockQuantitySelector = blockClass + " .stockQuantity-text"; const iconSelector = blockClass + " .stockQuantity-icon"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ stockQuantity: stockQuantity }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[stockQuantitySelector] = stockQuantity; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [stockQuantity]); var linkAttrObj = () => { var sdsd = {}; stockQuantity.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = stockQuantity.options.customUrl != undefined && stockQuantity.options.customUrl.length > 0 ? stockQuantity.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${stockQuantity.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Stock Quantity", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: stockQuantity.options.linkTo.length == 0 ? "Choose" : linkToArgs[stockQuantity.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), (stockQuantity.options.linkTo == "authorMeta" || stockQuantity.options.linkTo == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, stockQuantity.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Author Meta Key"), stockQuantity.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Custom Field Key")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", value: stockQuantity.options.linkToMetaKey, onChange: newVal => { var options = { ...stockQuantity.options, linkToMetaKey: newVal }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } })), stockQuantity.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), stockQuantity.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...stockQuantity.options, customUrl: "" }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.__experimentalLinkControl, { settings: [], value: stockQuantity.options.customUrl, onChange: newVal => { var options = { ...stockQuantity.options, customUrl: newVal.url }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", stockQuantity.options.customUrl.length != 0 ? stockQuantity.options.customUrl : "No link", " ")))), stockQuantity.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: stockQuantity.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...stockQuantity.options, tag: newVal }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } })), stockQuantity.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: stockQuantity.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...stockQuantity.options, linkTarget: newVal }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var sdsd = stockQuantity.options.linkAttr.concat({ id: "", val: "" }); var options = { ...stockQuantity.options, linkAttr: sdsd }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); linkAttrObj(); } }, "Add")), stockQuantity.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: stockQuantity.options.linkAttr[i].id, onChange: newVal => { stockQuantity.options.linkAttr[i].id = newVal; var ssdsd = stockQuantity.options.linkAttr.concat([]); var options = { ...stockQuantity.options, linkAttr: ssdsd }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { stockQuantity.options.linkAttr[i].val = newVal; var ssdsd = stockQuantity.options.linkAttr.concat([]); var options = { ...stockQuantity.options, linkAttr: ssdsd }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { stockQuantity.options.linkAttr.splice(i, 1); var ssdsd = stockQuantity.options.linkAttr.concat([]); var options = { ...stockQuantity.options, linkAttr: ssdsd }; setAttributes({ stockQuantity: { ...stockQuantity, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: stockQuantity, onChange: onChangeStyleStokQuantity, onAdd: onAddStyleStokQuantity, onRemove: onRemoveStyleStokQuantity, onBulkAdd: onBulkAddStockQuantity, onReset: onResetStockQuantity })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: stockQuantity, onChange: onPickCssLibraryStokQuantity })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_15__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Quantity", value: "beforeQuantity" }, { label: "After Quantity", value: "afterQuantity" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prefix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Postfix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "woo-stock-quantity", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "woo-stock-quantity" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, productData.manage_stock == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), stockQuantity.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "stockQuantity", onClick: handleLinkClick }, linkAttrItems, { target: stockQuantity.options.linkTarget, href: postUrl }), icon.options.position == "beforeQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "stockQuantity-text" }, productData.stock_quantity), icon.options.position == "afterQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), stockQuantity.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "stockQuantity-text" }, productData.stock_quantity), icon.options.position == "afterQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, stockQuantity.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { onClick: handleLinkClick }, linkAttrItems, { target: stockQuantity.options.linkTarget, href: postUrl }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "stockQuantity-text" }, productData.stock_quantity), icon.options.position == "afterQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), stockQuantity.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforeQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "stockQuantity-text" }, productData.stock_quantity), icon.options.position == "afterQuantity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))), productData.manage_stock == false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, "Please Enable The Manage Stock."))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-stock/index.js": /*!***************************************!*\ !*** ./src/blocks/woo-stock/index.js ***! \***************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-stock/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_19__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 89.4878H0V106.625H160V89.4878Z", fill: "url(#paint0_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 120.334H0V137.471H160V120.334Z", fill: "url(#paint1_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M125 18C119.43 18 114.089 20.2125 110.151 24.1505C106.212 28.089 104 33.4301 104 39C104 44.5699 106.212 49.9105 110.151 53.8495C114.089 57.7875 119.43 60 125 60C130.57 60 135.911 57.7875 139.849 53.8495C143.788 49.911 146 44.5699 146 39C145.994 33.4322 143.78 28.0942 139.843 24.1571C135.906 20.2201 130.568 18.0055 125 18ZM121.894 48.2075L111.75 38.9261L114.592 35.8202L121.763 42.3849L135.234 28.908L138.213 31.8876L121.894 48.2075Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M46.9837 54.4036C46.9837 59.861 46.9837 65.1253 46.9837 70.5828C40.512 72.9976 33.9437 75.4608 27.3271 77.9239C27.3271 72.4664 27.3271 67.1538 27.3271 61.6963C33.7988 59.3298 40.3188 56.8667 46.9837 54.4036Z", fill: "url(#paint2_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M25.2991 61.6963C25.2991 67.1055 25.2991 72.4181 25.2991 77.9239C18.6825 75.4608 12.1626 72.9976 5.64258 70.5828C5.64258 65.2219 5.64258 59.9093 5.64258 54.4036C12.3075 56.8667 18.8274 59.2815 25.2991 61.6963Z", fill: "url(#paint3_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M46.8394 45.324C39.8365 47.932 33.1233 50.4434 26.3135 52.9548C19.6486 50.4917 12.8389 47.932 5.7876 45.324C10.2309 43.6336 14.4326 42.0881 18.6344 40.5426C20.9043 39.7216 23.1742 38.9005 25.4442 38.0312C26.072 37.7897 26.6032 37.7897 27.2311 38.0312C33.6545 40.446 40.1262 42.8609 46.8394 45.324Z", fill: "url(#paint4_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M48.5775 46.7246C48.5775 48.4633 48.5775 50.0088 48.5775 51.7474C41.5745 54.3554 34.475 57.0117 27.3271 59.668C27.3271 57.9777 27.3271 56.4322 27.3271 54.6452C34.3301 52.0372 41.4297 49.3809 48.5775 46.7246Z", fill: "url(#paint5_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M25.2986 59.668C18.1025 56.9634 11.0513 54.3554 4 51.7474C4 50.0571 4 48.4633 4 46.7246C11.1478 49.3809 18.2474 52.0372 25.2986 54.6452C25.2986 56.3356 25.2986 57.8811 25.2986 59.668Z", fill: "url(#paint6_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M94.7967 54.4036C94.7967 59.861 94.7967 65.1253 94.7967 70.5828C88.325 72.9976 81.7567 75.4608 75.1401 77.9239C75.1401 72.4664 75.1401 67.1538 75.1401 61.6963C81.6118 59.3298 88.1801 56.8667 94.7967 54.4036Z", fill: "url(#paint7_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M73.1605 61.6963C73.1605 67.1055 73.1605 72.4181 73.1605 77.9239C66.5439 75.4608 60.0239 72.9976 53.5039 70.5828C53.5039 65.2219 53.5039 59.9093 53.5039 54.4036C60.1205 56.8667 66.6405 59.2815 73.1605 61.6963Z", fill: "url(#paint8_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M94.6519 45.324C87.6489 47.932 80.9357 50.4434 74.126 52.9548C67.4611 50.4917 60.6514 47.932 53.6001 45.324C58.0434 43.6336 62.2451 42.0881 66.4469 40.5426C68.7168 39.7216 70.9867 38.9005 73.2566 38.0312C73.8845 37.7897 74.4158 37.7897 75.0436 38.0312C81.5153 40.446 87.9387 42.8609 94.6519 45.324Z", fill: "url(#paint9_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M96.4393 46.7246C96.4393 48.4633 96.4393 50.0088 96.4393 51.7474C89.4364 54.3554 82.3368 57.0117 75.189 59.668C75.189 57.9777 75.189 56.4322 75.189 54.6452C82.1436 52.0372 89.2432 49.3809 96.4393 46.7246Z", fill: "url(#paint10_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M73.16 59.668C65.9639 56.9634 58.9126 54.3554 51.8613 51.7474C51.8613 50.0571 51.8613 48.4633 51.8613 46.7246C59.0092 49.3809 66.1087 52.0372 73.16 54.6452C73.16 56.3356 73.16 57.8811 73.16 59.668Z", fill: "url(#paint11_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M70.8904 17.5535C70.8904 23.0109 70.8904 28.2752 70.8904 33.7327C64.4187 36.1475 57.8505 38.6106 51.2339 41.0737C51.2339 35.6162 51.2339 30.3037 51.2339 24.8462C57.7056 22.4797 64.2256 20.0649 70.8904 17.5535Z", fill: "url(#paint12_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M49.2533 24.8945C49.2533 30.3037 49.2533 35.6163 49.2533 41.1221C42.6367 38.6589 36.1167 36.1959 29.5967 33.781C29.5967 28.4202 29.5967 23.1076 29.5967 17.6018C36.2133 20.0649 42.7333 22.4797 49.2533 24.8945Z", fill: "url(#paint13_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M70.7456 8.47383C63.7427 11.0818 57.0295 13.5933 50.2198 16.1047C43.5549 13.6416 36.7451 11.0818 29.6938 8.47383C34.1371 6.78346 38.3389 5.23797 42.5406 3.69249C44.8106 2.87146 47.0805 2.05044 49.3504 1.18111C49.9783 0.93963 50.5095 0.93963 51.1373 1.18111C57.5607 3.64422 64.0325 6.01072 70.7456 8.47383Z", fill: "url(#paint14_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M72.5331 9.87451C72.5331 11.6132 72.5331 13.1587 72.5331 14.8973C65.5301 17.5053 58.4306 20.1616 51.2827 22.8179C51.2827 21.1275 51.2827 19.5821 51.2827 17.7951C58.2374 15.2354 65.3369 12.5791 72.5331 9.87451Z", fill: "url(#paint15_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M49.2059 22.8179C42.0097 20.1133 34.9585 17.5053 27.9072 14.8973C27.9072 13.207 27.9072 11.6132 27.9072 9.87451C35.0551 12.5308 42.1546 15.1871 49.2059 17.7951C49.2059 19.4855 49.2059 21.0792 49.2059 22.8179Z", fill: "url(#paint16_linear_61_951)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_951", x1: "0", y1: "98.0562", x2: "160", y2: "98.0562", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_951", x1: "0", y1: "128.903", x2: "160", y2: "128.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_951", x1: "27.3271", y1: "66.1637", x2: "46.9837", y2: "66.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_951", x1: "5.64258", y1: "66.1637", x2: "25.2991", y2: "66.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_951", x1: "5.7876", y1: "45.4024", x2: "46.8394", y2: "45.4024", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_951", x1: "27.3271", y1: "53.1963", x2: "48.5775", y2: "53.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_951", x1: "4", y1: "53.1963", x2: "25.2986", y2: "53.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_61_951", x1: "75.1401", y1: "66.1637", x2: "94.7967", y2: "66.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint8_linear_61_951", x1: "53.5039", y1: "66.1637", x2: "73.1605", y2: "66.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint9_linear_61_951", x1: "53.6001", y1: "45.4024", x2: "94.6519", y2: "45.4024", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint10_linear_61_951", x1: "75.189", y1: "53.1963", x2: "96.4393", y2: "53.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint11_linear_61_951", x1: "51.8613", y1: "53.1963", x2: "73.16", y2: "53.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint12_linear_61_951", x1: "51.2339", y1: "29.3136", x2: "70.8904", y2: "29.3136", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint13_linear_61_951", x1: "29.5967", y1: "29.3619", x2: "49.2533", y2: "29.3619", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint14_linear_61_951", x1: "29.6938", y1: "8.55233", x2: "70.7456", y2: "8.55233", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint15_linear_61_951", x1: "51.2827", y1: "16.3462", x2: "72.5331", y2: "16.3462", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint16_linear_61_951", x1: "27.9072", y1: "16.3462", x2: "49.2059", y2: "16.3462", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let stock = attributes.stock; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_5__.applyFilters)("isProFeature", true); var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(defaultProductData); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; const stockSelector = blockClass + " .stock"; // var currencySelector = blockClass + " .currency"; // var discountedSelector = blockClass + " .discounted"; const iconSelector = blockClass + " .icon"; // const separatorSelector = blockClass + " .separator"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; const [postPriceEdited, setpostPriceEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(stock.options.text); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"]); setpostfixText(text); }, [postfix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_7___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.stock_status != undefined) { setproductData(res); } setloading(false); }); }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var stockX = attributes.stock; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (stockX != undefined) { var stockY = { ...stockX, options: stock.options }; setAttributes({ stock: stockY }); blockCssObj[stockSelector] = stockY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryStock(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; stock[sudoScource] = sudoScourceArgs; }); var stockX = Object.assign({}, stock); setAttributes({ stock: stockX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, stockSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleStock(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, stock); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ stock: object }); var elementSelector = myStore.getElementSelector(sudoScource, stockSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleStock(sudoScource, key) { var object = myStore.deletePropertyDeep(stock, [sudoScource, key, breakPointX]); setAttributes({ stock: object }); var elementSelector = myStore.getElementSelector(sudoScource, stockSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleStock(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, stock); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ stock: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddStock(sudoScource, cssObj) { let obj = Object.assign({}, stock); obj[sudoScource] = cssObj; setAttributes({ stock: obj }); var selector = myStore.getElementSelector(sudoScource, stockSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetStock(sudoScources) { let obj = Object.assign({}, stock); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, stockSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ stock: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_4__.useEntityProp)("postType", postType, "link", postId); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ regular: regular }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[stockSelector] = stock; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [stock]); const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${stock.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); // console.log(icon.options.class); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_6__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "In Stock", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "In Stock Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: stock.options.inStock, onChange: newVal => { var options = { ...stock.options, inStock: newVal }; setAttributes({ stock: { styles: stock.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Out of Stock Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: stock.options.outOfStock, onChange: newVal => { var options = { ...stock.options, outOfStock: newVal }; setAttributes({ stock: { styles: stock.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Backorder Text"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.__experimentalInputControl, { value: stock.options.backOrder, onChange: newVal => { var options = { ...stock.options, backOrder: newVal }; setAttributes({ stock: { styles: stock.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: stock, onChange: onChangeStyleStock, onAdd: onAddStyleStock, onRemove: onRemoveStyleStock, onBulkAdd: onBulkAddStock, onReset: onResetStock })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: stock, onChange: onPickCssLibraryStock })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_13__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon, onBulkAdd: onBulkAddIcon, onReset: onResetIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Prefix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Prefix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 " // title="Postfix" , opened: isProFeature ? false : null, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex justify-between w-full" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Postfix"), isProFeature ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "pg-bg-color text-white px-3 py-1 rounded-md", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, "Pro") : "", " "), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_15__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_23__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_24__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_20__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_21__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_17__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_16__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_18__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_14__["default"], { blockName: "woo-stock", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_11__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_12__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_22__["default"], { slug: "woo-stock" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_8__.Spinner, null)), wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), productData != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, productData.manage_stock && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, productData.stock_status == "instock" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "stock" }, stock.options.inStock), productData.stock_status == "outofstock" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "stock" }, stock.options.outOfStock), productData.stock_status == "onbackorder" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "stock" }, stock.options.backOrder)), !productData.manage_stock && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "stock" }, productData.stock_status === "instock" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: stock.options.class }, stock.options.inStock)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "stock" }, productData.stock_status == "outofstock" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: stock.options.class }, stock.options.outOfStock)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "stock" }, productData.stock_status == "onbackorder" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: stock.options.class }, stock.options.backOrder)))), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/woo-total-sales/index.js": /*!*********************************************!*\ !*** ./src/blocks/woo-total-sales/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/extends */ "./node_modules/@babel/runtime/helpers/esm/extends.js"); /* 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_blocks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/i18n */ "@wordpress/i18n"); /* harmony import */ var _wordpress_i18n__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_i18n__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 _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/core-data */ "@wordpress/core-data"); /* harmony import */ var _wordpress_core_data__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../store */ "./src/store.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link-off.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/mail-subscribe */ "./src/components/mail-subscribe/index.js"); /* harmony import */ var _components_contact_support__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/contact-support */ "./src/components/contact-support/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_icon_picker__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/icon-picker */ "./src/components/icon-picker/index.js"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./block.json */ "./src/blocks/woo-total-sales/block.json"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); const { RawHTML } = wp.element; var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_2__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_21__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("svg", { width: "160", height: "161", viewBox: "0 0 160 161", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 112.488H0V129.625H160V112.488Z", fill: "url(#paint0_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M160 143.334H0V160.471H160V143.334Z", fill: "url(#paint1_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M108.076 52.407V72.7151H103.762V56.4768H103.64L99 59.407V55.5814L104.047 52.407H108.076Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M119.39 72.7151V69.6221L126.634 62.907C127.244 62.2965 127.773 61.7675 128.18 61.2791C128.587 60.7907 128.913 60.343 129.157 59.8547C129.361 59.407 129.483 58.8779 129.483 58.3488C129.483 57.7384 129.361 57.25 129.076 56.8023C128.791 56.3547 128.425 56.0291 127.977 55.7849C127.489 55.5407 126.959 55.4186 126.39 55.4186C125.779 55.4186 125.209 55.5407 124.762 55.7849C124.314 56.0291 123.948 56.3954 123.704 56.8837C123.459 57.3721 123.337 57.9012 123.337 58.5523H119.268C119.268 57.2093 119.552 56.0698 120.163 55.093C120.773 54.1163 121.628 53.343 122.686 52.814C123.785 52.2849 125.006 52 126.43 52C127.896 52 129.157 52.2442 130.256 52.7733C131.355 53.3023 132.169 53.9942 132.779 54.8895C133.39 55.7849 133.675 56.843 133.675 58.0233C133.675 58.7965 133.512 59.5291 133.227 60.3023C132.942 61.0349 132.372 61.8895 131.64 62.7849C130.866 63.6802 129.808 64.7791 128.384 66.0407L125.413 68.9302V69.0523H133.959V72.5523H119.39V72.7151Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M150.971 73C149.506 73 148.163 72.7558 147.023 72.2267C145.883 71.6976 144.947 71.0058 144.296 70.1104C143.645 69.2151 143.279 68.157 143.279 66.9767H147.593C147.634 67.4651 147.796 67.9128 148.081 68.279C148.366 68.6453 148.773 68.9302 149.302 69.1337C149.79 69.3372 150.36 69.4593 151.011 69.4593C151.663 69.4593 152.232 69.3372 152.761 69.093C153.25 68.8488 153.657 68.5232 153.942 68.1162C154.226 67.7093 154.349 67.2209 154.349 66.6918C154.349 66.1627 154.186 65.6744 153.901 65.2674C153.616 64.8604 153.168 64.5348 152.599 64.2906C152.029 64.0465 151.378 63.9244 150.604 63.9244H148.692V60.75H150.604C151.256 60.75 151.825 60.6278 152.314 60.4244C152.802 60.2209 153.209 59.8953 153.494 59.4883C153.779 59.0814 153.901 58.6337 153.901 58.1046C153.901 57.5755 153.779 57.1278 153.535 56.7616C153.29 56.3953 152.965 56.0697 152.517 55.8662C152.069 55.6627 151.581 55.5406 151.011 55.5406C150.442 55.5406 149.913 55.6627 149.424 55.8662C148.936 56.0697 148.569 56.3546 148.244 56.7616C147.959 57.1278 147.796 57.6162 147.796 58.1046H143.686C143.686 56.9244 144.052 55.9069 144.703 55.0116C145.354 54.1162 146.209 53.4244 147.349 52.8953C148.447 52.4069 149.709 52.1221 151.093 52.1221C152.476 52.1221 153.738 52.3662 154.756 52.8953C155.814 53.4244 156.628 54.0756 157.197 54.9709C157.767 55.8256 158.052 56.8023 158.052 57.8604C158.052 59 157.727 59.936 156.994 60.7093C156.302 61.4825 155.366 61.9709 154.227 62.1744V62.3372C155.732 62.5407 156.872 63.029 157.645 63.8837C158.418 64.7383 158.825 65.7965 158.825 67.0581C158.825 68.1976 158.5 69.2558 157.808 70.1511C157.157 71.0465 156.221 71.7791 155.04 72.2674C153.86 72.7558 152.517 73 150.971 73Z", fill: "#C15940" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M47.9837 78.4036C47.9837 83.861 47.9837 89.1253 47.9837 94.5828C41.512 96.9976 34.9437 99.4608 28.3271 101.924C28.3271 96.4664 28.3271 91.1538 28.3271 85.6963C34.7988 83.3298 41.3188 80.8667 47.9837 78.4036Z", fill: "url(#paint2_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M26.2991 85.6963C26.2991 91.1055 26.2991 96.4181 26.2991 101.924C19.6825 99.4608 13.1626 96.9976 6.64258 94.5828C6.64258 89.2219 6.64258 83.9093 6.64258 78.4036C13.3075 80.8667 19.8274 83.2815 26.2991 85.6963Z", fill: "url(#paint3_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M47.8394 69.324C40.8365 71.932 34.1233 74.4434 27.3135 76.9548C20.6486 74.4917 13.8389 71.932 6.7876 69.324C11.2309 67.6336 15.4326 66.0881 19.6344 64.5426C21.9043 63.7216 24.1742 62.9005 26.4442 62.0312C27.072 61.7897 27.6032 61.7897 28.2311 62.0312C34.6545 64.446 41.1262 66.8609 47.8394 69.324Z", fill: "url(#paint4_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M49.5775 70.7246C49.5775 72.4633 49.5775 74.0088 49.5775 75.7474C42.5745 78.3554 35.475 81.0117 28.3271 83.668C28.3271 81.9777 28.3271 80.4322 28.3271 78.6452C35.3301 76.0372 42.4297 73.3809 49.5775 70.7246Z", fill: "url(#paint5_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M26.2986 83.668C19.1025 80.9634 12.0513 78.3554 5 75.7474C5 74.0571 5 72.4633 5 70.7246C12.1478 73.3809 19.2474 76.0372 26.2986 78.6452C26.2986 80.3356 26.2986 81.8811 26.2986 83.668Z", fill: "url(#paint6_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M95.7967 78.4036C95.7967 83.861 95.7967 89.1253 95.7967 94.5828C89.325 96.9976 82.7567 99.4608 76.1401 101.924C76.1401 96.4664 76.1401 91.1538 76.1401 85.6963C82.6118 83.3298 89.1801 80.8667 95.7967 78.4036Z", fill: "url(#paint7_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M74.1605 85.6963C74.1605 91.1055 74.1605 96.4181 74.1605 101.924C67.5439 99.4608 61.0239 96.9976 54.5039 94.5828C54.5039 89.2219 54.5039 83.9093 54.5039 78.4036C61.1205 80.8667 67.6405 83.2815 74.1605 85.6963Z", fill: "url(#paint8_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M95.6519 69.324C88.6489 71.932 81.9357 74.4434 75.126 76.9548C68.4611 74.4917 61.6514 71.932 54.6001 69.324C59.0434 67.6336 63.2451 66.0881 67.4469 64.5426C69.7168 63.7216 71.9867 62.9005 74.2566 62.0312C74.8845 61.7897 75.4158 61.7897 76.0436 62.0312C82.5153 64.446 88.9387 66.8609 95.6519 69.324Z", fill: "url(#paint9_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M97.4393 70.7246C97.4393 72.4633 97.4393 74.0088 97.4393 75.7474C90.4364 78.3554 83.3368 81.0117 76.189 83.668C76.189 81.9777 76.189 80.4322 76.189 78.6452C83.1436 76.0372 90.2432 73.3809 97.4393 70.7246Z", fill: "url(#paint10_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M74.16 83.668C66.9639 80.9634 59.9126 78.3554 52.8613 75.7474C52.8613 74.0571 52.8613 72.4633 52.8613 70.7246C60.0092 73.3809 67.1087 76.0372 74.16 78.6452C74.16 80.3356 74.16 81.8811 74.16 83.668Z", fill: "url(#paint11_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M71.8904 41.5535C71.8904 47.0109 71.8904 52.2752 71.8904 57.7327C65.4187 60.1475 58.8505 62.6106 52.2339 65.0737C52.2339 59.6162 52.2339 54.3037 52.2339 48.8462C58.7056 46.4797 65.2256 44.0649 71.8904 41.5535Z", fill: "url(#paint12_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M50.2533 48.8945C50.2533 54.3037 50.2533 59.6163 50.2533 65.1221C43.6367 62.6589 37.1167 60.1959 30.5967 57.781C30.5967 52.4202 30.5967 47.1076 30.5967 41.6018C37.2133 44.0649 43.7333 46.4797 50.2533 48.8945Z", fill: "url(#paint13_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M71.7456 32.4738C64.7427 35.0818 58.0295 37.5933 51.2198 40.1047C44.5549 37.6416 37.7451 35.0818 30.6938 32.4738C35.1371 30.7835 39.3389 29.238 43.5406 27.6925C45.8106 26.8715 48.0805 26.0504 50.3504 25.1811C50.9783 24.9396 51.5095 24.9396 52.1373 25.1811C58.5607 27.6442 65.0325 30.0107 71.7456 32.4738Z", fill: "url(#paint14_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M73.5331 33.8745C73.5331 35.6132 73.5331 37.1587 73.5331 38.8973C66.5301 41.5053 59.4306 44.1616 52.2827 46.8179C52.2827 45.1275 52.2827 43.5821 52.2827 41.7951C59.2374 39.2354 66.3369 36.5791 73.5331 33.8745Z", fill: "url(#paint15_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("path", { d: "M50.2059 46.8179C43.0097 44.1133 35.9585 41.5053 28.9072 38.8973C28.9072 37.207 28.9072 35.6132 28.9072 33.8745C36.0551 36.5308 43.1546 39.1871 50.2059 41.7951C50.2059 43.4855 50.2059 45.0792 50.2059 46.8179Z", fill: "url(#paint16_linear_61_945)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint0_linear_61_945", x1: "0", y1: "121.056", x2: "160", y2: "121.056", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint1_linear_61_945", x1: "0", y1: "151.903", x2: "160", y2: "151.903", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint2_linear_61_945", x1: "28.3271", y1: "90.1637", x2: "47.9837", y2: "90.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint3_linear_61_945", x1: "6.64258", y1: "90.1637", x2: "26.2991", y2: "90.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint4_linear_61_945", x1: "6.7876", y1: "69.4024", x2: "47.8394", y2: "69.4024", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint5_linear_61_945", x1: "28.3271", y1: "77.1963", x2: "49.5775", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint6_linear_61_945", x1: "5", y1: "77.1963", x2: "26.2986", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint7_linear_61_945", x1: "76.1401", y1: "90.1637", x2: "95.7967", y2: "90.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint8_linear_61_945", x1: "54.5039", y1: "90.1637", x2: "74.1605", y2: "90.1637", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint9_linear_61_945", x1: "54.6001", y1: "69.4024", x2: "95.6519", y2: "69.4024", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint10_linear_61_945", x1: "76.189", y1: "77.1963", x2: "97.4393", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint11_linear_61_945", x1: "52.8613", y1: "77.1963", x2: "74.16", y2: "77.1963", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint12_linear_61_945", x1: "52.2339", y1: "53.3136", x2: "71.8904", y2: "53.3136", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint13_linear_61_945", x1: "30.5967", y1: "53.3619", x2: "50.2533", y2: "53.3619", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint14_linear_61_945", x1: "30.6938", y1: "32.5523", x2: "71.7456", y2: "32.5523", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint15_linear_61_945", x1: "52.2827", y1: "40.3462", x2: "73.5331", y2: "40.3462", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("linearGradient", { id: "paint16_linear_61_945", x1: "28.9072", y1: "40.3462", x2: "50.2059", y2: "40.3462", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var context = props.context; var clientId = props.clientId; let saleCount = attributes.saleCount; var wrapper = attributes.wrapper; var blockId = attributes.blockId; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; var icon = attributes.icon; var prefix = attributes.prefix; var postfix = attributes.postfix; var blockCssY = attributes.blockCssY; var postId = context["postId"]; var postType = context["postType"]; var breakPointX = myStore.getBreakPoint(); const [linkPickerPosttitle, setLinkPickerPosttitle] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [prefixText, setprefixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); const [postfixText, setpostfixText] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"])); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(prefix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setprefixText(text); }, [prefix.options.text]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var text = myStore.parseCustomTags(postfix.options.text, _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"]); setpostfixText(text); }, [postfix.options.text]); var linkToArgsBasic = { postUrl: { label: "Post URL", value: "postUrl" }, homeUrl: { label: "Home URL", value: "homeUrl" }, archiveDate: { label: "Date Archive", value: "archiveDate" }, archiveYear: { label: "Year Archive", value: "archiveYear" }, archiveMonth: { label: "Month Archive", value: "archiveMonth" }, authorUrl: { label: "Author URL", value: "authorUrl" }, authorLink: { label: "Author Link", value: "authorLink" }, authorMail: { label: "Author Mail", value: "authorMail", isPro: true }, authorMeta: { label: "Author Meta", value: "authorMeta", isPro: true }, customField: { label: "Custom Field", value: "customField", isPro: true }, customUrl: { label: "Custom URL", value: "customUrl", isPro: true } }; let linkToArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_6__.applyFilters)("linkToArgs", linkToArgsBasic); // const [ // currentPostSKU, // setcurrentPostSKU, // ] = useEntityProp('postType', postType, 'date', postId); //const [postSaleCountEdited, setpostSaleCountEdited] = useState(currentPostSKU == null ? ); const [postSaleCountEdited, setpostSaleCountEdited] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(saleCount.options.text); // useEffect(() => { // var postTypeX = postType; // if (postType == 'post') { // var postTypeX = 'posts'; // } // if (postType == 'page') { // var postTypeX = 'pages'; // } // apiFetch({ // path: '/wp/v2/' + postTypeX + '/' + postId, // method: 'POST', // }).then((res) => { // console.log(res); // }); // }, []); var defaultProductData = { ID: 1409, post_title: "Beanie with Logo", total_sales: 0, type: "simple", sku: "Woo-beanie-logo", manage_stock: true, stock_quantity: 5, stock_status: "instock", backorders: "no", weight: "", length: "", width: "", height: "", dimensions: "N/A", rating_count: 0, review_count: 0, average_rating: "0", on_sale: false, gallery_image_ids: [], currency: "USD", currency_symbol: "$", currency_pos: "left", attributes: { pa_color: { label: "Color", values: "Red" } }, regular_price: "20", sale_price: "", date_on_sale_from: null, date_on_sale_to: null, price: "20" }; const [productData, setproductData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(defaultProductData); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { setloading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_8___default()({ path: "/post-grid/v2/get_post_data", method: "POST", data: { postId: postId } }).then(res => { if (res.manage_stock != undefined) { setproductData(res); // console.log(res) } setloading(false); }); }, []); function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var saleCountX = attributes.saleCount; var prefixX = attributes.prefix; var postfixX = attributes.postfix; var iconX = attributes.icon; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (iconX != undefined) { var iconY = { ...iconX, options: icon.options }; setAttributes({ icon: iconY }); blockCssObj[iconSelector] = iconY; } if (postfixX != undefined) { var postfixY = { ...postfixX, options: postfix.options }; setAttributes({ postfix: postfixY }); blockCssObj[postfixSelector] = postfixY; } if (prefixX != undefined) { var prefixY = { ...prefixX, options: prefix.options }; setAttributes({ prefix: prefixY }); blockCssObj[prefixSelector] = prefixY; } if (saleCountX != undefined) { var saleCountY = { ...saleCountX, options: saleCount.options }; setAttributes({ saleCount: saleCountY }); blockCssObj[saleCountSelector] = saleCountY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } function onChangeIcon(arg) { var options = { ...icon.options, srcType: arg.srcType, library: arg.library, iconSrc: arg.iconSrc }; setAttributes({ icon: { ...icon, options: options } }); } function setFieldLinkTo(option, index) { var options = { ...saleCount.options, linkTo: option.value }; setAttributes({ saleCount: { ...saleCount, options: options } }); } function onPickCssLibraryWrapper(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; wrapper[sudoScource] = sudoScourceArgs; }); var wrapperX = Object.assign({}, wrapper); setAttributes({ wrapper: wrapperX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibrarySaleCount(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; saleCount[sudoScource] = sudoScourceArgs; }); var saleCountX = Object.assign({}, saleCount); setAttributes({ saleCount: saleCountX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, saleCountSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryIcon(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; icon[sudoScource] = sudoScourceArgs; }); var iconX = Object.assign({}, icon); setAttributes({ icon: iconX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPrefix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; prefix[sudoScource] = sudoScourceArgs; }); var prefixX = Object.assign({}, prefix); setAttributes({ prefix: prefixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onPickCssLibraryPostfix(args) { Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; postfix[sudoScource] = sudoScourceArgs; }); var postfixX = Object.assign({}, postfix); setAttributes({ postfix: postfixX }); var styleObj = {}; Object.entries(args).map(x => { var sudoScource = x[0]; var sudoScourceArgs = x[1]; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var sudoObj = {}; Object.entries(sudoScourceArgs).map(y => { var cssPropty = y[0]; var cssProptyVal = y[1]; var cssProptyKey = myStore.cssAttrParse(cssPropty); sudoObj[cssProptyKey] = cssProptyVal; }); styleObj[elementSelector] = sudoObj; }); var cssItems = Object.assign(blockCssY.items, styleObj); setAttributes({ blockCssY: { items: cssItems } }); } function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onChangeStyleSaleCount(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, saleCount); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ saleCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, saleCountSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleSaleCount(sudoScource, key) { var object = myStore.deletePropertyDeep(saleCount, [sudoScource, key, breakPointX]); setAttributes({ saleCount: object }); var elementSelector = myStore.getElementSelector(sudoScource, saleCountSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleSaleCount(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, saleCount); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ saleCount: object }); } function onChangeStyleIcon(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleIcon(sudoScource, key) { var object = myStore.deletePropertyDeep(icon, [sudoScource, key, breakPointX]); setAttributes({ icon: object }); var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleIcon(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, icon); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ icon: object }); } function onChangeStylePrefix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePrefix(sudoScource, key) { var object = myStore.deletePropertyDeep(prefix, [sudoScource, key, breakPointX]); setAttributes({ prefix: object }); var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePrefix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, prefix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ prefix: object }); } function onChangeStylePostfix(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStylePostfix(sudoScource, key) { var object = myStore.deletePropertyDeep(postfix, [sudoScource, key, breakPointX]); setAttributes({ postfix: object }); var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStylePostfix(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, postfix); const object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ postfix: object }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddSaleCount(sudoScource, cssObj) { let obj = Object.assign({}, saleCount); obj[sudoScource] = cssObj; setAttributes({ saleCount: obj }); var selector = myStore.getElementSelector(sudoScource, saleCountSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetSaleCount(sudoScources) { let obj = Object.assign({}, saleCount); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, saleCountSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ saleCount: obj }); } function onBulkAddPrefix(sudoScource, cssObj) { let obj = Object.assign({}, prefix); obj[sudoScource] = cssObj; setAttributes({ prefix: obj }); var selector = myStore.getElementSelector(sudoScource, prefixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPrefix(sudoScources) { let obj = Object.assign({}, prefix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, prefixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ prefix: obj }); } function onBulkAddPostfix(sudoScource, cssObj) { let obj = Object.assign({}, postfix); obj[sudoScource] = cssObj; setAttributes({ postfix: obj }); var selector = myStore.getElementSelector(sudoScource, postfixSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetPostfix(sudoScources) { let obj = Object.assign({}, postfix); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, postfixSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ postfix: obj }); } function onBulkAddIcon(sudoScource, cssObj) { let obj = Object.assign({}, icon); obj[sudoScource] = cssObj; setAttributes({ icon: obj }); var selector = myStore.getElementSelector(sudoScource, iconSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onResetIcon(sudoScources) { let obj = Object.assign({}, icon); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, iconSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ icon: obj }); } String.prototype.strtr = function (dic) { const str = this.toString(), makeToken = inx => `{{###~${inx}~###}}`, tokens = Object.keys(dic).map((key, inx) => ({ key, val: dic[key], token: makeToken(inx) })), tokenizedStr = tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.key, "g"), entry.token), str); return tokens.reduce((carry, entry) => carry.replace(new RegExp(entry.token, "g"), entry.val), tokenizedStr); }; const [iconHtml, setIconHtml] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var iconSrc = icon.options.iconSrc; var iconHtml = `<span class="${iconSrc}"></span>`; setIconHtml(iconHtml); }, [icon]); const [currentPostUrl, setCurrentPostUrl] = (0,_wordpress_core_data__WEBPACK_IMPORTED_MODULE_5__.useEntityProp)("postType", postType, "link", postId); // Wrapper CSS Class Selectors const wrapperSelector = blockClass; var saleCountSelector = blockClass + " .saleCount-text"; const iconSelector = blockClass + " .saleCount-icon"; const prefixSelector = blockClass + " .prefix"; const postfixSelector = blockClass + " .postfix"; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); // setAttributes({ saleCount: saleCount }); // setAttributes({ wrapper: wrapper }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[saleCountSelector] = saleCount; blockCssObj[iconSelector] = icon; blockCssObj[prefixSelector] = prefix; blockCssObj[postfixSelector] = postfix; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); function handleLinkClick(ev) { ev.stopPropagation(); ev.preventDefault(); return false; } var [linkAttrItems, setlinkAttrItems] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { linkAttrObj(); }, [saleCount]); var linkAttrObj = () => { var sdsd = {}; saleCount.options.linkAttr.map(x => { if (x.val) sdsd[x.id] = x.val; }); setlinkAttrItems(sdsd); }; var postUrl = saleCount.options.customUrl != undefined && saleCount.options.customUrl.length > 0 ? saleCount.options.customUrl : currentPostUrl; const CustomTag = `${wrapper.options.tag}`; const CustomTagPostTitle = `${saleCount.options.tag}`; const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "Span", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: wrapper, onChange: onPickCssLibraryWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Sale Count", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link To"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_14__["default"], { position: "bottom right", variant: "secondary", options: linkToArgs, buttonTitle: saleCount.options.linkTo.length == 0 ? "Choose" : linkToArgs[saleCount.options.linkTo].label, onChange: setFieldLinkTo, values: [] })), (saleCount.options.linkTo == "authorMeta" || saleCount.options.linkTo == "customField") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, saleCount.options.linkTo == "authorMeta" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Author Meta Key"), saleCount.options.linkTo == "customField" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, "Custom Field Key")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", value: saleCount.options.linkToMetaKey, onChange: newVal => { var options = { ...saleCount.options, linkToMetaKey: newVal }; setAttributes({ saleCount: { ...saleCount, options: options } }); } })), saleCount.options.linkTo == "customUrl" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom URL"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: linkPickerPosttitle ? "!bg-gray-400" : "", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_28__["default"], onClick: ev => { setLinkPickerPosttitle(prev => !prev); } }), saleCount.options.customUrl.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Button, { className: "!text-red-500 ml-2", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_29__["default"], onClick: ev => { var options = { ...saleCount.options, customUrl: "" }; setAttributes({ saleCount: { ...saleCount, options: options } }); setLinkPickerPosttitle(false); } }), linkPickerPosttitle && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_7__.__experimentalLinkControl, { settings: [], value: saleCount.options.customUrl, onChange: newVal => { var options = { ...saleCount.options, customUrl: newVal.url }; setAttributes({ saleCount: { ...saleCount, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "font-bold" }, "Linked to:"), " ", saleCount.options.customUrl.length != 0 ? saleCount.options.customUrl : "No link", " ")))), saleCount.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: saleCount.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }], onChange: newVal => { var options = { ...saleCount.options, tag: newVal }; setAttributes({ saleCount: { ...saleCount, options: options } }); } })), saleCount.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Link Target"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: saleCount.options.linkTarget, options: [{ label: "Choose...", value: "" }, { label: "_self", value: "_self" }, { label: "_blank", value: "_blank" }, { label: "_parent", value: "_parent" }, { label: "_top", value: "_top" }], onChange: newVal => { var options = { ...saleCount.options, linkTarget: newVal }; setAttributes({ saleCount: { ...saleCount, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Custom Attributes"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { // className=" cursor-pointer px-3 text-white py-1 bg-blue-600" className: "flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:!bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700 ", onClick: ev => { var sdsd = saleCount.options.linkAttr.concat({ id: "", val: "" }); var options = { ...saleCount.options, linkAttr: sdsd }; setAttributes({ saleCount: { ...saleCount, options: options } }); linkAttrObj(); } }, "Add")), saleCount.options.linkAttr.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { placeholder: "Name", className: "mr-2", value: saleCount.options.linkAttr[i].id, onChange: newVal => { saleCount.options.linkAttr[i].id = newVal; var ssdsd = saleCount.options.linkAttr.concat([]); var options = { ...saleCount.options, linkAttr: ssdsd }; setAttributes({ saleCount: { ...saleCount, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.__experimentalInputControl, { className: "mr-2", placeholder: "Value", value: x.val, onChange: newVal => { saleCount.options.linkAttr[i].val = newVal; var ssdsd = saleCount.options.linkAttr.concat([]); var options = { ...saleCount.options, linkAttr: ssdsd }; setAttributes({ saleCount: { ...saleCount, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { // className="text-lg cursor-pointer px-3 text-white py-1 bg-red-400 icon-close" className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { saleCount.options.linkAttr.splice(i, 1); var ssdsd = saleCount.options.linkAttr.concat([]); var options = { ...saleCount.options, linkAttr: ssdsd }; setAttributes({ saleCount: { ...saleCount, options: options } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_30__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_31__["default"] })))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: saleCount, onChange: onChangeStyleSaleCount, onAdd: onAddStyleSaleCount, onRemove: onRemoveStyleSaleCount, onBulkAdd: onBulkAddSaleCount, onReset: onResetSaleCount })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: saleCount, onChange: onPickCssLibrarySaleCount })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Icon", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Choose Icon"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_icon_picker__WEBPACK_IMPORTED_MODULE_15__["default"], { library: icon.options.library, srcType: icon.options.srcType, iconSrc: icon.options.iconSrc, onChange: onChangeIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Icon position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.SelectControl, { label: "", value: icon.options.position, options: [{ label: "Choose Position", value: "" }, { label: "Before saleCount", value: "beforeSaleCount" }, { label: "After saleCount", value: "afterSaleCount" }, { label: "Before Prefix", value: "beforePrefix" }, { label: "After Prefix", value: "afterPrefix" }, { label: "Before Postfix", value: "beforePostfix" }, { label: "After Postfix", value: "afterPostfix" }], onChange: newVal => { var options = { ...icon.options, position: newVal }; setAttributes({ icon: { ...icon, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: icon, onChange: onChangeStyleIcon, onAdd: onAddStyleIcon, onRemove: onRemoveStyleIcon })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: icon, onChange: onPickCssLibraryIcon })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Prefix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Prefix", placeholder: "Add Prefix", value: prefix.options.text, onChange: newVal => { var options = { ...prefix.options, text: newVal }; setAttributes({ prefix: { styles: prefix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: prefix, onChange: onChangeStylePrefix, onAdd: onAddStylePrefix, onRemove: onRemoveStylePrefix, onBulkAdd: onBulkAddPrefix, onReset: onResetPrefix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: prefix, onChange: onPickCssLibraryPrefix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Postfix", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_17__["default"], { activeTab: "options", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_25__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_26__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_27__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_22__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_23__["default"], label: "Postfix", placeholder: "Add Postfix", value: postfix.options.text, onChange: newVal => { var options = { ...postfix.options, text: newVal }; setAttributes({ postfix: { styles: postfix.styles, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_19__["default"], { obj: postfix, onChange: onChangeStylePostfix, onAdd: onAddStylePostfix, onRemove: onRemoveStylePostfix, onBulkAdd: onBulkAddPostfix, onReset: onResetPostfix })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_18__["default"], { name: "css" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_css_library__WEBPACK_IMPORTED_MODULE_20__["default"], { blockId: blockId, obj: postfix, onChange: onPickCssLibraryPostfix })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_9__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_16__["default"], { blockName: "woo-total-sales", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_mail_subscribe__WEBPACK_IMPORTED_MODULE_12__["default"], null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_contact_support__WEBPACK_IMPORTED_MODULE_13__["default"], { utm: { utm_source: "BlockPostTitle", utm_campaign: "PostGridCombo", utm_content: "BlockOptions" } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_24__["default"], { slug: "woo-total-sales" })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, wrapper.options.tag && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(CustomTag, blockProps, icon.options.position == "beforePrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "afterPrefix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), saleCount.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({ className: "saleCount", onClick: handleLinkClick }, linkAttrItems, { target: saleCount.options.linkTarget, href: postUrl }), icon.options.position == "beforeSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "saleCount-text" }, postSaleCountEdited), icon.options.position == "afterSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), saleCount.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, icon.options.position == "beforeSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "saleCount-text" }, productData.total_sales), icon.options.position == "afterSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), postfix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: postfix.options.class }, postfixText), icon.options.position == "afterPostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), wrapper.options.tag.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Fragment, null, saleCount.options.linkTo.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", (0,_babel_runtime_helpers_extends__WEBPACK_IMPORTED_MODULE_0__["default"])({}, blockProps, { onClick: handleLinkClick }, linkAttrItems, { target: saleCount.options.linkTarget, href: postUrl }), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), prefix.options.text && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: prefix.options.class }, prefixText), icon.options.position == "beforePostfix" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), icon.options.position == "beforeSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "saleCount-text" }, productData.total_sales), icon.options.position == "afterSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } })), saleCount.options.linkTo.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", blockProps, icon.options.position == "beforeSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "saleCount-text" }, postSaleCountEdited), icon.options.position == "afterSaleCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon.options.class, dangerouslySetInnerHTML: { __html: iconHtml } }))))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/blocks/wordpress-org/index.js": /*!*******************************************!*\ !*** ./src/blocks/wordpress-org/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/blocks */ "@wordpress/blocks"); /* harmony import */ var _wordpress_blocks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_blocks__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_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__); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/brush.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/media-and-text.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); /* harmony import */ var _components_css_library__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/css-library */ "./src/components/css-library/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _block_json__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./block.json */ "./src/blocks/wordpress-org/block.json"); /* harmony import */ var _components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/library-block-variations */ "./src/components/library-block-variations/index.js"); /* harmony import */ var _components_css_class_picker__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/css-class-picker */ "./src/components/css-class-picker/index.js"); /* harmony import */ var _custom_tags__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); /* harmony import */ var _components_tutorials__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/tutorials */ "./src/components/tutorials/index.js"); var myStore = wp.data.select("postgrid-shop"); (0,_wordpress_blocks__WEBPACK_IMPORTED_MODULE_1__.registerBlockType)(_block_json__WEBPACK_IMPORTED_MODULE_12__, { icon: { // Specifying a background color to appear with the icon e.g.: in the inserter. background: "#fff", // Specifying a color for the icon (optional: if not set, a readable color will be automatically defined) foreground: "#fff", // Specifying an icon for the block src: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "160", height: "160", viewBox: "0 0 160 160", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M61.1765 15H4.70588C3.4578 15 2.26085 15.4958 1.37832 16.3783C0.495798 17.2608 0 18.4578 0 19.7059V66.7647C0 68.0128 0.495798 69.2097 1.37832 70.0923C2.26085 70.9748 3.4578 71.4706 4.70588 71.4706H61.1765C62.4246 71.4706 63.6215 70.9748 64.504 70.0923C65.3866 69.2097 65.8824 68.0128 65.8824 66.7647V19.7059C65.8824 18.4578 65.3866 17.2608 64.504 16.3783C63.6215 15.4958 62.4246 15 61.1765 15ZM56.4706 62.0588H9.41177V24.4118H56.4706V62.0588Z", fill: "url(#paint0_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 29.1177H84.7061V38.5294H160V29.1177Z", fill: "url(#paint1_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.177 47.9414H84.7061V57.3532H141.177V47.9414Z", fill: "url(#paint2_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M61.1765 89H4.70588C3.4578 89 2.26085 89.4958 1.37832 90.3783C0.495798 91.2608 0 92.4578 0 93.7059V140.765C0 142.013 0.495798 143.21 1.37832 144.092C2.26085 144.975 3.4578 145.471 4.70588 145.471H61.1765C62.4246 145.471 63.6215 144.975 64.504 144.092C65.3866 143.21 65.8824 142.013 65.8824 140.765V93.7059C65.8824 92.4578 65.3866 91.2608 64.504 90.3783C63.6215 89.4958 62.4246 89 61.1765 89ZM56.4706 136.059H9.41177V98.4118H56.4706V136.059Z", fill: "url(#paint3_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160 103.118H84.7061V112.529H160V103.118Z", fill: "url(#paint4_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M141.177 121.941H84.7061V131.353H141.177V121.941Z", fill: "url(#paint5_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M32.9806 60C23.4868 59.8176 16.0664 52.0352 16 42.9806C16.1846 33.4939 23.9257 26.0664 32.9806 26C42.4678 26.1897 49.9335 33.9134 50 42.9806C49.8125 52.4748 42.0473 59.9335 32.9806 60ZM32.9806 27.2046C24.1656 27.3781 17.227 34.5632 17.1657 42.9806C17.3372 51.8026 24.5636 58.7341 32.9806 58.7954C41.8026 58.6239 48.7341 51.3975 48.7954 42.9806C48.629 34.1591 41.3854 27.2658 32.9806 27.2046ZM28.9006 56.8914L33.2526 44.3794L37.7988 56.6194C34.736 57.6448 31.8403 57.7069 28.9006 56.8914ZM25.5588 34.7817C23.9657 34.9983 22.4162 35.0755 20.896 35.0149C23.7825 30.8881 28.4042 28.5664 32.9806 28.5257C36.7237 28.5966 40.2132 30.0115 42.7726 32.3337C41.5856 32.246 40.8749 32.7665 40.3634 33.6548C39.6201 35.9481 41.1908 37.6457 42.0732 39.3669C42.9074 40.9395 42.8412 42.7277 42.384 44.2629L40.208 51.6846L34.9623 36.1028C35.5089 36.052 36.059 36.0356 36.5555 35.9474C37.143 35.8166 37.2719 35.2698 36.8663 34.9371C36.7368 34.8335 36.5943 34.7817 36.4389 34.7817L33.2915 35.0149H30.9017C30.227 35.0547 28.3219 34.403 28.1623 35.2869C28.0798 35.6274 28.334 35.8943 28.6285 35.9475C29.1483 36.0148 29.7439 36.0913 30.2217 36.1417L32.5143 42.2812L29.328 51.6846L24.0434 36.1028C24.6026 36.0543 25.1692 36.0373 25.6754 35.9474C26.09 35.8955 26.2712 35.6883 26.2194 35.3257C26.146 35.0033 25.8586 34.7855 25.5588 34.7817ZM19.7303 37.1909L26.6857 55.9977C24.176 54.7607 22.1919 52.9416 20.7794 50.7714C18.1956 46.648 17.9237 41.4168 19.7303 37.1909ZM46.9109 46.8468C45.769 50.5757 43.4368 53.6642 40.2081 55.5314C40.3634 55.1169 40.6096 54.4175 40.9463 53.4331L44.9875 41.6983C45.3761 40.5584 45.6481 39.2891 45.8035 37.8903C45.856 37.318 45.8577 36.741 45.7646 36.2194C47.4204 39.7906 47.8901 43.328 46.9109 46.8468Z", fill: "url(#paint6_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M32.9806 134C23.4868 133.818 16.0664 126.035 16 116.981C16.1846 107.494 23.9257 100.066 32.9806 100C42.4678 100.19 49.9335 107.913 50 116.981C49.8125 126.475 42.0473 133.934 32.9806 134ZM32.9806 101.205C24.1656 101.378 17.227 108.563 17.1657 116.981C17.3372 125.803 24.5636 132.734 32.9806 132.795C41.8026 132.624 48.7341 125.397 48.7954 116.981C48.629 108.159 41.3854 101.266 32.9806 101.205ZM28.9006 130.891L33.2526 118.379L37.7988 130.619C34.736 131.645 31.8403 131.707 28.9006 130.891ZM25.5588 108.782C23.9657 108.998 22.4162 109.076 20.896 109.015C23.7825 104.888 28.4042 102.566 32.9806 102.526C36.7237 102.597 40.2132 104.011 42.7726 106.334C41.5856 106.246 40.8749 106.767 40.3634 107.655C39.6201 109.948 41.1908 111.646 42.0732 113.367C42.9074 114.94 42.8412 116.728 42.384 118.263L40.208 125.685L34.9623 110.103C35.5089 110.052 36.059 110.036 36.5555 109.947C37.143 109.817 37.2719 109.27 36.8663 108.937C36.7368 108.834 36.5943 108.782 36.4389 108.782L33.2915 109.015H30.9017C30.227 109.055 28.3219 108.403 28.1623 109.287C28.0798 109.627 28.334 109.894 28.6285 109.947C29.1483 110.015 29.7439 110.091 30.2217 110.142L32.5143 116.281L29.328 125.685L24.0434 110.103C24.6026 110.054 25.1692 110.037 25.6754 109.947C26.09 109.895 26.2712 109.688 26.2194 109.326C26.146 109.003 25.8586 108.786 25.5588 108.782ZM19.7303 111.191L26.6857 129.998C24.176 128.761 22.1919 126.942 20.7794 124.771C18.1956 120.648 17.9237 115.417 19.7303 111.191ZM46.9109 120.847C45.769 124.576 43.4368 127.664 40.2081 129.531C40.3634 129.117 40.6096 128.418 40.9463 127.433L44.9875 115.698C45.3761 114.558 45.6481 113.289 45.8035 111.89C45.856 111.318 45.8577 110.741 45.7646 110.219C47.4204 113.791 47.8901 117.328 46.9109 120.847Z", fill: "url(#paint7_linear_61_762)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_61_762", x1: "0", y1: "43.2353", x2: "65.8824", y2: "43.2353", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_61_762", x1: "84.7061", y1: "33.8236", x2: "160", y2: "33.8236", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint2_linear_61_762", x1: "84.7061", y1: "52.6473", x2: "141.177", y2: "52.6473", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint3_linear_61_762", x1: "0", y1: "117.235", x2: "65.8824", y2: "117.235", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint4_linear_61_762", x1: "84.7061", y1: "107.824", x2: "160", y2: "107.824", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint5_linear_61_762", x1: "84.7061", y1: "126.647", x2: "141.177", y2: "126.647", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint6_linear_61_762", x1: "16", y1: "43", x2: "50", y2: "43", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint7_linear_61_762", x1: "16", y1: "117", x2: "50", y2: "117", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }, edit: function (props) { var attributes = props.attributes; var setAttributes = props.setAttributes; var clientId = props.clientId; var blockId = attributes.blockId; var blockCssY = attributes.blockCssY; var object = attributes.object; var wrapper = attributes.wrapper; var item = attributes.item; var thumb = attributes.thumb; var elements = attributes.elements; var blockIdX = attributes.blockId ? attributes.blockId : "pg" + clientId.split("-").pop(); var blockClass = "." + blockIdX; const wrapperSelector = blockClass; const itemSelector = blockClass + " .item"; const thumbSelector = blockClass + " .thumb"; const CustomTagWrapper = wrapper.options.tag == undefined ? "ul" : `${wrapper.options.tag}`; const CustomTagItem = item.options.tag.length == undefined ? "li" : `${item.options.tag}`; var [loading, seloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Using the hook. var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [objectData, seobjectData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var breakPointX = myStore.getBreakPoint(); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockIdX = "pg" + clientId.split("-").pop(); setAttributes({ blockId: blockIdX }); myStore.generateBlockCss(blockCssY.items, blockId); }, [clientId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var blockCssObj = {}; blockCssObj[wrapperSelector] = wrapper; blockCssObj[itemSelector] = item; blockCssObj[thumbSelector] = thumb; var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); }, [blockId]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { myStore.generateBlockCss(blockCssY.items, blockId); }, [blockCssY]); const blockProps = (0,_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.useBlockProps)({ className: ` ${blockId} ${wrapper.options.class}` }); var pluginFields = { name: { id: "name", label: "Plugin Name", prefix: "Plugin Name: " }, version: { id: "version", label: "Version", prefix: "Version:" }, author: { id: "author", label: "Author", prefix: "Author" }, author_profile: { id: "author_profile", label: "Author Profile", prefix: "Author Profile" }, contributors: { id: "contributors", label: "Contributors", prefix: "Contributors", isLinked: true }, requires: { id: "requires", label: "Require WP Version", prefix: "WP Version: " }, tested: { id: "tested", label: "Tested WP Version", prefix: "WP Tested Version: " }, requires_php: { id: "requires_php", label: "Require PHP Version", prefix: "PHP Version: " }, requires_plugins: { id: "requires_plugins", label: "Require Plugins", prefix: "Require Plugins: " }, rating: { id: "rating", label: "Rating", prefix: "Rating", type: "star" }, ratings: { id: "ratings", label: "Ratings", prefix: "Ratings", type: "star" }, num_ratings: { id: "num_ratings", label: "Num Ratings", prefix: "Num Ratings", type: "star" }, support_threads: { id: "support_threads", label: "Support Threads", prefix: "Support Threads" }, support_threads_resolved: { id: "support_threads_resolved", label: "Support Threads Resolved", prefix: "Support Threads Resolved" }, active_installs: { id: "active_installs", label: "Active Install", prefix: "Active Install: " }, last_updated: { id: "last_updated", label: "Last Update", prefix: "Last Update: " }, added: { id: "added", label: "Creation Time", prefix: "Creation Time: " }, homepage: { id: "homepage", label: "Homepage", prefix: "Homepage:", isLinked: true, linkText: "Homepage" }, download_link: { id: "download_link", label: "Download Link", prefix: "Download Link", isLinked: true, linkText: "Download" }, tags: { id: "tags", label: "Tags", prefix: "Tags:" }, banners: { id: "banners", label: "Thumbnail", prefix: "Thumbnail", size: "high", isLinked: false } }; var themeFields = { name: { id: "name", label: "Name", prefix: "Theme Name: " }, version: { id: "version", label: "Version", prefix: "Version:" }, preview_url: { id: "preview_url", label: "Preview URL", prefix: "Preview URL", isLinked: true, linkText: "Preview" }, author: { id: "author", label: "Author", prefix: "Author" }, screenshot_url: { id: "screenshot_url", label: "Screenshot" }, ratings: { id: "ratings", label: "Ratings", prefix: "Ratings" }, rating: { id: "rating", label: "Rating", prefix: "Rating", type: "star" }, num_ratings: { id: "num_ratings", label: "Number of Ratings" }, reviews_url: { id: "reviews_url", label: "Reviews URL", isLinked: true, linkText: "Reviews" }, last_updated: { id: "last_updated", label: "Last Update", prefix: "Last Update: " }, creation_time: { id: "creation_time", label: "Creation Time", prefix: "Creation Time: " }, homepage: { id: "homepage", label: "Homepage", prefix: "Homepage:", isLinked: true, linkText: "Homepage" }, tags: { id: "tags", label: "Tags", prefix: "Tags: " }, download_link: { id: "download_link", label: "Download Link", prefix: "Download Link", isLinked: true, linkText: "Download" }, requires: { id: "requires", label: "Require WP Version", prefix: "WP Version: " }, requires_php: { id: "requires_php", label: "Require PHP Version", prefix: "PHP Version: " }, is_commercial: { id: "is_commercial", label: "Is Commercial", prefix: "Is Commercial" }, external_support_url: { id: "external_support_url", label: "External Support URL", prefix: "External Support URL", isLinked: true, linkText: "Support URL" }, external_repository_url: { id: "external_repository_url", label: "External Sepository URL", prefix: "External Sepository URL", isLinked: true, linkText: "Repository" } }; var allFields = { ...pluginFields, ...themeFields }; var objectTypes = { plugin: { label: "Plugins", value: "plugin" }, theme: { label: "Themes", value: "theme" } }; function onPickBlockPatterns(content, action) { const { parse } = wp.blockSerializationDefaultParser; var blocks = content.length > 0 ? parse(content) : ""; console.log(content); console.log(blocks); const attributes = blocks[0].attrs; if (action == "insert") { wp.data.dispatch("core/block-editor").insertBlocks(wp.blocks.parse(content)); } if (action == "applyStyle") { var wrapperX = attributes.wrapper; var elementsX = attributes.elements; var itemX = attributes.item; var thumbX = attributes.thumb; var objectX = attributes.object; var blockCssYX = attributes.blockCssY; var blockCssObj = {}; if (objectX != undefined) { var objectY = { ...objectX, options: object.options }; setAttributes({ object: objectY }); blockCssObj[objectSelector] = objectY; } if (thumbX != undefined) { var thumbY = { ...thumbX, options: thumb.options }; setAttributes({ thumb: thumbY }); blockCssObj[thumbSelector] = thumbY; } if (itemX != undefined) { var itemY = { ...itemX, options: item.options }; setAttributes({ item: itemY }); blockCssObj[itemSelector] = itemY; } if (elementsX != undefined) { var elementsY = { ...elementsX, options: elements.options }; setAttributes({ elements: elementsY }); blockCssObj[elementsSelector] = elementsY; } if (wrapperX != undefined) { var wrapperY = { ...wrapperX, options: wrapper.options }; setAttributes({ wrapper: wrapperY }); blockCssObj[wrapperSelector] = wrapperY; } var blockCssRules = myStore.getBlockCssRules(blockCssObj); var items = blockCssRules; setAttributes({ blockCssY: { items: items } }); } if (action == "replace") { if (confirm("Do you want to replace?")) { wp.data.dispatch("core/block-editor").replaceBlock(clientId, wp.blocks.parse(content)); } } } var RemoveQueryPram = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-move" }, title)); }; function setUserField(option, index) { //var isExist = elements.items.find(x => x.label === option.label); var elementsX = elements.items.push(option); setAttributes({ elements: { items: elements.items } }); } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { seloading(true); var postData = { slug: object.options.slug, type: object.options.type }; clearTimeout(debounce); debounce = setTimeout(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_5___default()({ path: "/post-grid/v2/wordpress_org_data", method: "POST", data: postData }).then(res => { seloading(false); if (res.data == undefined) {} else { //var data = JSON.parse(res.data); //console.log('data', data); seobjectData(res.data); } }); }, 2000); }, [object.options.slug]); function onChangeStyleWrapper(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, wrapper); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleWrapper(sudoScource, key) { var object = myStore.deletePropertyDeep(wrapper, [sudoScource, key, breakPointX]); setAttributes({ wrapper: object }); var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleWrapper(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, wrapper); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ wrapper: object }); } function onResetWrapper(sudoScources) { let obj = Object.assign({}, wrapper); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, wrapperSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ wrapper: obj }); } function onBulkAddWrapper(sudoScource, cssObj) { let obj = Object.assign({}, wrapper); obj[sudoScource] = cssObj; setAttributes({ wrapper: obj }); var selector = myStore.getElementSelector(sudoScource, wrapperSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleThumb(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, thumb); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ thumb: object }); var elementSelector = myStore.getElementSelector(sudoScource, thumbSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleThumb(sudoScource, key) { var object = myStore.deletePropertyDeep(thumb, [sudoScource, key, breakPointX]); setAttributes({ thumb: object }); var elementSelector = myStore.getElementSelector(sudoScource, thumbSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleThumb(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, thumb); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ thumb: object }); } function onResetThumb(sudoScources) { let obj = Object.assign({}, thumb); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, thumbSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ thumb: obj }); } function onBulkAddThumb(sudoScource, cssObj) { let obj = Object.assign({}, thumb); obj[sudoScource] = cssObj; setAttributes({ thumb: obj }); var selector = myStore.getElementSelector(sudoScource, thumbSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } function onChangeStyleItem(sudoScource, newVal, attr) { var path = [sudoScource, attr, breakPointX]; let obj = Object.assign({}, item); const object = myStore.updatePropertyDeep(obj, path, newVal); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(attr); let itemsX = Object.assign({}, blockCssY.items); if (itemsX[elementSelector] == undefined) { itemsX[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssItems = myStore.updatePropertyDeep(itemsX, cssPath, newVal); setAttributes({ blockCssY: { items: cssItems } }); } function onRemoveStyleItem(sudoScource, key) { var object = myStore.deletePropertyDeep(item, [sudoScource, key, breakPointX]); setAttributes({ item: object }); var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector, cssPropty, breakPointX]); setAttributes({ blockCssY: { items: cssObject } }); } function onAddStyleItem(sudoScource, key) { var path = [sudoScource, key, breakPointX]; let obj = Object.assign({}, item); var object = myStore.addPropertyDeep(obj, path, ""); setAttributes({ item: object }); } function onResetItem(sudoScources) { let obj = Object.assign({}, item); Object.entries(sudoScources).map(args => { var sudoScource = args[0]; if (obj[sudoScource] == undefined) {} else { obj[sudoScource] = {}; var elementSelector = myStore.getElementSelector(sudoScource, itemSelector); var cssObject = myStore.deletePropertyDeep(blockCssY.items, [elementSelector]); setAttributes({ blockCssY: { items: cssObject } }); } }); setAttributes({ item: obj }); } function onBulkAddItem(sudoScource, cssObj) { let obj = Object.assign({}, item); obj[sudoScource] = cssObj; setAttributes({ item: obj }); var selector = myStore.getElementSelector(sudoScource, itemSelector); var stylesObj = {}; Object.entries(cssObj).map(args => { var attr = args[0]; var cssPropty = myStore.cssAttrParse(attr); if (stylesObj[selector] == undefined) { stylesObj[selector] = {}; } if (stylesObj[selector][cssPropty] == undefined) { stylesObj[selector][cssPropty] = {}; } stylesObj[selector][cssPropty] = args[1]; }); var cssItems = { ...blockCssY.items }; var cssItemsX = { ...cssItems, ...stylesObj }; setAttributes({ blockCssY: { items: cssItemsX } }); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.InspectorControls, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Object Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { position: "bottom right", variant: "secondary", options: objectTypes, buttonTitle: objectTypes[object.options.type] == undefined ? "Choose" : objectTypes[object.options.type].label, onChange: option => { var options = { ...object.options, type: option.value }; setAttributes({ object: { styles: object.styles, options: options } }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Slug"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, { value: object.options.slug, onChange: newVal => { var options = { ...object.options, slug: newVal }; setAttributes({ object: { ...object, options: options } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, object.options.type == "plugin" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add Fields"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { position: "bottom right", variant: "secondary", options: pluginFields, buttonTitle: "Choose", onChange: setUserField, values: "" }))), object.options.type == "theme" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Add Fields"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_11__["default"], { position: "bottom right", variant: "secondary", options: themeFields, buttonTitle: "Choose", onChange: setUserField, values: "" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_6__.ReactSortable, { list: elements.items, setList: item => { setAttributes({ elements: { items: item } }); } }, elements.items.map((item, index) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { key: item.id, className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveQueryPram, { title: allFields[item.id] == undefined ? "" : allFields[item.id].label, index: index }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Button, { onClick: ev => { ev.preventDefault(); ev.stopPropagation(); var elementsX = elements.items.splice(index, 1); setAttributes({ elements: { items: elements.items } }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_17__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_18__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Prefix"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, { value: item.prefix, onChange: newVal => { elements.items[index].prefix = newVal; setAttributes({ elements: { items: elements.items } }); } })), (item.id == "homepage" || item.id == "download_link" || item.id == "preview_url" || item.id == "contributors") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "linkText"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, { value: item.linkText, onChange: newVal => { elements.items[index].linkText = newVal; setAttributes({ elements: { items: elements.items } }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { className: "my-3", label: "Is Linked?", help: elements.items[index].isLinked ? "Link Enabled" : "Link Disabled", checked: elements.items[index].isLinked ? true : false, onChange: e => { elements.items[index].isLinked = elements.items[index].isLinked ? false : true; setAttributes({ elements: { items: elements.items } }); } }))))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { className: "font-medium text-slate-900 ", title: "Wrapper", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_7__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }, { name: "css", title: "CSS Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_21__["default"], className: "tab-css" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_8__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_class_picker__WEBPACK_IMPORTED_MODULE_14__["default"], { tags: _custom_tags__WEBPACK_IMPORTED_MODULE_15__["default"], label: "CSS Class", placeholder: "Add Class", value: wrapper.options.class, onChange: newVal => { var options = { ...wrapper.options, class: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "CSS ID"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, { value: blockId, onChange: newVal => { setAttributes({ blockId: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "Wrapper Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, { label: "", value: wrapper.options.tag, options: [{ label: "Choose", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "ul", value: "ul" }, { label: "ol", value: "ol" }], onChange: newVal => { var options = { ...wrapper.options, tag: newVal }; setAttributes({ wrapper: { styles: wrapper.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_8__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_9__["default"], { blockId: blockId, obj: wrapper, onChange: onChangeStyleWrapper, onAdd: onAddStyleWrapper, onRemove: onRemoveStyleWrapper, onBulkAdd: onBulkAddWrapper, onReset: onResetWrapper })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { className: "font-medium text-slate-900 ", title: "Thumb", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_7__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_8__["default"], { name: "options" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_8__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_9__["default"], { blockId: blockId, obj: thumb, onChange: onChangeStyleThumb, onAdd: onAddStyleThumb, onRemove: onRemoveStyleThumb, onBulkAdd: onBulkAddThumb, onReset: onResetThumb })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { className: "font-medium text-slate-900 ", title: "item", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_7__["default"], { activeTab: "styles", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "options", title: "Options", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_19__["default"], className: "tab-settings" }, { name: "styles", title: "Styles", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_20__["default"], className: "tab-style" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_8__["default"], { name: "options" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 " }, "item Tag"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.SelectControl, { label: "", value: item.options.tag, options: [{ label: "No item", value: "" }, { label: "H1", value: "h1" }, { label: "H2", value: "h2" }, { label: "H3", value: "h3" }, { label: "H4", value: "h4" }, { label: "H5", value: "h5" }, { label: "H6", value: "h6" }, { label: "SPAN", value: "span" }, { label: "DIV", value: "div" }, { label: "P", value: "p" }, { label: "ul", value: "ul" }, { label: "li", value: "li" }], onChange: newVal => { var options = { ...item.options, tag: newVal }; setAttributes({ item: { styles: item.styles, options: options } }); } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_8__["default"], { name: "styles" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_9__["default"], { blockId: blockId, obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem, onBulkAdd: onBulkAddItem, onReset: onResetItem })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.PanelBody, { className: "font-medium text-slate-900 ", title: "Block Variations", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_library_block_variations__WEBPACK_IMPORTED_MODULE_13__["default"], { blockName: "wordpress-org", blockId: blockId, clientId: clientId, onChange: onPickBlockPatterns })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tutorials__WEBPACK_IMPORTED_MODULE_16__["default"], { slug: "wordpress-org" })))), loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", blockProps, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Spinner, null)), loading == false && objectData != null && object.options.type == "plugin" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagWrapper, blockProps, elements.items.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.id == "name" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.name), " "), x.id == "version" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.version), " "), x.id == "author" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.author), " "), x.id == "author_profile" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.author_profile), " "), x.id == "contributors" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", null, objectData.contributors != null && Object.entries(objectData.contributors).map((x, i) => { var data = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: data.profile }, data.display_name)); })))), x.id == "tested" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.tested), " "), x.id == "requires" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.requires), " "), x.id == "requires_php" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.requires_php), " "), x.id == "requires_plugins" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.requires_plugins), " "), x.id == "rating" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.rating), " "), x.id == "ratings" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, Object.entries(objectData.ratings).map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, x[0], ": ", x[1]); }))), x.id == "num_ratings" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.num_ratings), " "), x.id == "support_threads" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.support_threads), " "), x.id == "support_threads_resolved" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.support_threads_resolved), " "), x.id == "active_installs" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.active_installs), " "), x.id == "last_updated" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.last_updated), " "), x.id == "added" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, objectData.added), " "), x.id == "homepage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.homepage }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.homepage))), x.id == "download_link" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.download_link }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.download_link))), x.id == "banners" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: thumb.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: objectData.banners == undefined ? "" : objectData.banners.high, alt: objectData.name })), x.id == "tags" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, x.prefix), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, Object.entries(objectData.tags).map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, " ", x[1]); })))); })), loading == false && objectData != null && object.options.type == "theme" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagWrapper, blockProps, elements.items.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.id == "name" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.name), x.id == "version" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.version), x.id == "is_commercial" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, objectData.is_commercial && "Yes", !objectData.is_commercial && "No"), x.id == "preview_url" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.preview_url }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.preview_url)), x.id == "author" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.author), x.id == "screenshot_url" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.screenshot_url }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: objectData.screenshot_url == undefined ? "" : objectData.screenshot_url, alt: objectData.name })), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: objectData.screenshot_url == undefined ? "" : objectData.screenshot_url, alt: objectData.name })), x.id == "ratings" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", Object.entries(objectData.ratings).map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, i + 1, " : ", x); })), x.id == "rating" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.rating), x.id == "num_ratings" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.num_ratings), x.id == "reviews_url" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.reviews_url }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.reviews_url)), x.id == "last_updated" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.last_updated), x.id == "creation_time" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.creation_time), x.id == "homepage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.homepage }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.homepage)), x.id == "tags" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", Object.entries(objectData.tags).map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", null, " ", x[1]); })), x.id == "download_link" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.download_link }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.download_link)), x.id == "requires" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.requires), x.id == "requires_php" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.requires_php), x.id == "is_commercial" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, " ", objectData.is_commercial), x.id == "external_support_url" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.external_support_url }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.external_support_url)), x.id == "external_repository_url" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(CustomTagItem, { className: item.options.class }, x.prefix, x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: objectData.external_repository_url }, x.linkText), !x.isLinked && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, objectData.external_repository_url))); }))); }, save: function (props) { // to make a truly dynamic block, we're handling front end by render_callback under index.php file return null; } }); /***/ }), /***/ "./src/breakpoints.js": /*!****************************!*\ !*** ./src/breakpoints.js ***! \****************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const breakPoints = { Mobile: { name: "Mobile", id: "Mobile", icon: '<span class="icon-mobile-phone"></span>', min: 0, max: 767 }, Tablet: { name: "Tablet", id: "Tablet", icon: '<span class="icon-tablet"></span>', min: 768, max: 991 }, Desktop: { name: "Desktop", id: "Desktop", icon: '<span class="icon-desktop"></span>', min: 992, max: 1280 } }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (breakPoints); /***/ }), /***/ "./src/colors-presets.js": /*!*******************************!*\ !*** ./src/colors-presets.js ***! \*******************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const colorsPresets = [{ name: '9DD6DF', color: '#9DD6DF' }, { name: '18978F', color: '#18978F' }, { name: 'A084CF', color: '#A084CF' }, { name: 'DFBB9D', color: '#DFBB9D' }, { name: '774360', color: '#774360' }, { name: '3AB0FF', color: '#3AB0FF' }, { name: '51557E', color: '#51557E' }]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (colorsPresets); /***/ }), /***/ "./src/components/block-variations-picker/index.js": /*!*********************************************************!*\ !*** ./src/components/block-variations-picker/index.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _tabs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _tab__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../tab */ "./src/components/tab/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var html_to_image__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! html-to-image */ "./node_modules/html-to-image/es/index.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); /* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_8__); /* harmony import */ var imagesloaded__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); /* harmony import */ var imagesloaded__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(imagesloaded__WEBPACK_IMPORTED_MODULE_9__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [queryCss, setQueryCss] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ keyword: "", page: 1, blockName: props.blockName, category: "", isReset: true }); var [cssLibrary, setCssLibrary] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ items: [] }); var [cssLibraryCats, setCssLibraryCats] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); var [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [sudoPicker, setsudoPicker] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("isProFeature", true); const selectedBlock = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => select("core/block-editor").getSelectedBlock()); var [cssSubmission, setCssSubmission] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ enable: false, title: "", category: "", tags: "", thumb: "", email: "", status: "", // idle => ready to submit, busy => submission process, falied => submission falied, success=> Successfully submitted! successMessage: "Successfully submitted!", failedMessage: "Submission was failed!", idleMessage: "Submit to CSS Library", message: "", timeout: 2 }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { fetchCss(); }, [queryCss]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default()({ path: "/post-grid/v2/get_site_details", method: "POST", data: {} }).then(res => { // //setEmailSubscribe({ ...userDetails, email: res.email, status: res.subscribe_status }); setCssSubmission({ ...cssSubmission, email: res.email }); }); }, []); function fetchCss() { setIsLoading(true); var postData = { keyword: queryCss.keyword, page: queryCss.page, category: queryCss.category, blockName: queryCss.blockName }; postData = JSON.stringify(postData); fetch("https://getpostgrid.com/wp-json/post-grid/v2/get_block_patterns", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { console.log(res); res.posts.map(e => { console.log(e.ID, ", ", e.post_name, ", ", e.is_pro); }); var isReset = queryCss.isReset; if (isReset) { var items = res.posts; } else { res.posts.map(item => { cssLibrary.items.push(item); }); var items = cssLibrary.items; } setCssLibrary({ items: items }); setCssLibraryCats(res.terms); setTimeout(() => { loadMasonry(); }, 500); setIsLoading(false); }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } function loadMasonry() { var elem = document.querySelector("#" + props.blockName); if (elem != null) { imagesloaded__WEBPACK_IMPORTED_MODULE_9___default()(elem, function () { var msnry = new (masonry_layout__WEBPACK_IMPORTED_MODULE_8___default())(elem, { // options itemSelector: ".variation-item", gutter: 15, horizontalOrder: true, percentPosition: true // columnWidth: ".masonry-width", // fitWidth: true, }); }); } } const htmlToImageCapt = () => { var stylesheet = document.getElementById("pg-google-fonts-css"); if (stylesheet && !stylesheet.hasAttribute("disabled")) { stylesheet.setAttribute("disabled", "disabled"); //setDisabled(true); } const elementToCapture = document.querySelector("." + props.blockId); html_to_image__WEBPACK_IMPORTED_MODULE_5__.toPng(elementToCapture).then(function (dataUrl) { setCssSubmission({ ...cssSubmission, thumb: dataUrl }); setTimeout(() => { if (stylesheet && stylesheet.hasAttribute("disabled")) { stylesheet.removeAttribute("disabled"); } }, 500); //download(dataUrl, 'my-node.png'); }); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "m-auto ", id: props.blockName }, isLoading == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, { style: { height: "30px", width: "30px", color: "#1f2937" } })), cssLibrary.items.slice(0, 10).map((x, index) => { var content = x.post_content; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `item-${index} variation-item border border-solid relative border-slate-400 rounded-md overflow-hidden hover:border-black hover:shadow-md hover:shadow-slate-300 transition-all duration-150 ease-in-out shadow-md py-2 pt-3 mb-4 `, onClick: ev => { if (!x.is_pro) { props.onChange(content, "replace"); } if (x.is_pro && !isProFeature) { // alert("This feature is only available in Pro Version."); props.onChange(content, "replace"); } if (x.is_pro && isProFeature) { alert("This feature is only available in Pro Version."); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: x.thumb_url, alt: "", className: "w-[95%]" }), isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute top-1 right-3" }, !x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-lime-600 text-white text-xs px-2 rounded-sm py-1" }, "Free"), x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-orange-500 text-white text-xs px-2 rounded-sm py-1" }, "Pro"))), x.is_pro && isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-center mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { className: "cursor-pointer px-3 py-1 border-0 bg-amber-500 rounded-sm text-white outline-none focus:ring-4 shadow-lg transform active:scale-75 transition-transform text-[16px] flex items-center gap-2 justify-center ", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Subscribe to Import"))))); })), cssLibrary.items.length == 0 && !isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "No variation found.")); } class PGBlockVariationsPicker extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { blockName, blockId, clientId, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { blockId: blockId, clientId: clientId, blockName: blockName, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGBlockVariationsPicker); /***/ }), /***/ "./src/components/contact-support/index.js": /*!*************************************************!*\ !*** ./src/components/contact-support/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; class PGContactSupport extends Component { render() { var { utm } = this.props; function ContactHtml(props) { var utmPrams = new URLSearchParams(utm).toString(); var docUrl = 'https://getpostgrid.com/documentations/?' + utmPrams + '&utm_medium=Docsbutton'; var tutsUrl = 'https://www.youtube.com/playlist?list=PL0QP7T2SN94bpTVghETSePuVvRROpuEW6'; var supportCreate = 'https://pickplugins.com/create-support-ticket/?' + utmPrams + '&utm_medium=createSupportButton'; var reviewUrl = 'https://wordpress.org/support/plugin/post-grid/reviews/#new-post'; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "grid grid-cols-2 gap-2 my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { target: "_blank", href: docUrl, className: "bg-blue-600 hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded no-underline " }, "Docs")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { target: "_blank", href: tutsUrl, className: "bg-blue-600 hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded no-underline " }, "Tutorials")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "col-span-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { target: "_blank", href: supportCreate, className: "bg-blue-600 hover:text-white font-bold text-[16px] px-5 py-2 block text-center text-white rounded no-underline " }, "Create Support Ticket")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "col-span-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { target: "_blank", href: reviewUrl, className: "bg-amber-500 hover:text-white font-bold text-[16px] px-5 py-2 text-center text-white rounded no-underline flex gap-2 justify-center items-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-star-filled" }), " Write Your Reviews"))); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(ContactHtml, { utm: utm })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGContactSupport); /***/ }), /***/ "./src/components/css-align-content/index.js": /*!***************************************************!*\ !*** ./src/components/css-align-content/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { stretch: { "label": "stretch", "value": "stretch" }, center: { "label": "center", "value": "center" }, 'flex-start': { "label": "flex start ", "value": "flex-start" }, 'flex-end': { "label": "flex end ", "value": "flex-end" }, 'space-between': { "label": "space between", "value": "space-between" }, 'space-around': { "label": "space around", "value": "space-around" }, 'space-evenly': { "label": "space evenly", "value": "space-evenly" }, start: { "label": "start", "value": "start" }, end: { "label": "end", "value": "end" }, normal: { "label": "normal", "value": "normal" }, start: { "label": "start", "value": "start" }, baseline: { "label": "baseline", "value": "baseline" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Align Content", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; // console.log('x value', x) return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'alignContent'); } else { props.onChange(x.value, 'alignContent'); } // props.onChange(x.value, 'alignContent'); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { console.log(align); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'alignContent'); } else { props.onChange(align + ' !important', 'alignContent'); } } })); } class PGcssAlignContent extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssAlignContent); /***/ }), /***/ "./src/components/css-align-items/index.js": /*!*************************************************!*\ !*** ./src/components/css-align-items/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { stretch: { "label": "stretch", "value": "stretch" }, center: { "label": "center", "value": "center" }, 'flex-start': { "label": "flex start ", "value": "flex-start" }, 'flex-end': { "label": "flex end ", "value": "flex-end" }, 'space-between': { "label": "space between", "value": "space-between" }, 'space-around': { "label": "space around", "value": "space-around" }, 'space-evenly': { "label": "space evenly", "value": "space-evenly" }, start: { "label": "start", "value": "start" }, end: { "label": "end", "value": "end" }, normal: { "label": "normal", "value": "normal" }, start: { "label": "start", "value": "start" }, baseline: { "label": "baseline", "value": "baseline" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Align Items", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // props.onChange(x.value, 'alignItems'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'alignItems'); } else { props.onChange(x.value, 'alignItems'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'alignItems'); } else { props.onChange(align + ' !important', 'alignItems'); } } })); } class PGcssAlignItems extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssAlignItems); /***/ }), /***/ "./src/components/css-align-self/index.js": /*!************************************************!*\ !*** ./src/components/css-align-self/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { auto: { "label": "auto", "value": "auto" }, stretch: { "label": "Stretch", "value": "stretch" }, center: { "label": "Center", "value": "center" }, 'flex-start': { "label": "Flex start ", "value": "flex-start" }, 'flex-end': { "label": "Flex end ", "value": "flex-end" }, normal: { "label": "normal", "value": "normal" }, revert: { "label": "revert", "value": "revert" }, 'self-end': { "label": "self-end", "value": "self-end" }, ' self-start': { "label": " self-start", "value": " self-start" }, start: { "label": "start", "value": "start" }, end: { "label": "end", "value": "end" }, unset: { "label": "unset", "value": "unset" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Align Self", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'alignSelf'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'alignSelf'); } else { props.onChange(x.value, 'alignSelf'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'alignSelf'); } else { props.onChange(align + ' !important', 'alignSelf'); } } })); } class PGcssAlignSelf extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssAlignSelf); /***/ }), /***/ "./src/components/css-aspect-ratio/index.js": /*!**************************************************!*\ !*** ./src/components/css-aspect-ratio/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? 'auto' : props.val; var valX = valZ != 'auto' ? valZ.split("/")[0] : 1; var valY = valZ != 'auto' ? valZ.split("/")[1] : 1; const [isAuto, setisAuto] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes("auto") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isAuto ? 'Auto' : 'Auto?', checked: isAuto, onChange: arg => { setisAuto(isAuto => !isAuto); props.onChange('auto', 'aspectRatio'); } }), !isAuto && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: valX, type: "number", onChange: newVal => { props.onChange(newVal + '/' + valY, 'aspectRatio'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, " / "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: valY, type: "number", onChange: newVal => { props.onChange(valX + '/' + newVal, 'aspectRatio'); } }))); } class PGcssAspectRatio extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssAspectRatio); /***/ }), /***/ "./src/components/css-backdrop-filter/index.js": /*!*****************************************************!*\ !*** ./src/components/css-backdrop-filter/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : []; const [valArgs, setvalArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); function addFilter(option, index) { var isExist = valArgs.find(x => x.id === option.value); if (isExist == undefined) { var obj = {}; obj['id'] = option.value; obj['val'] = option.val; obj['unit'] = option.unit; valArgs.push(obj); var str = ''; valArgs.map(x => { str += x.id + '(' + x.val + x.unit + ') '; }); props.onChange(str, 'backdropFilter'); } } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var filtered = valParts.filter(Boolean); var res = filtered.map(x => { if (x.length != 0) { var argVal = x != undefined ? x.match(/-?\d+/g)[0] : 1; var argId = x != undefined ? x.match(/[a-zA-Z]+/g)[0] : ''; return { id: argId, val: argVal }; } }); setvalArgs(res); }, [props.val]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { //onChange('contrast(200%) brightness(150%) blur(10%)', 'filter'); }, [valArgs]); const [filterArgs, setfilterArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ blur: { label: 'Blur', value: 'blur', val: '1', unit: 'px' }, brightness: { label: 'Brightness', value: 'brightness', val: '10', unit: '%' }, contrast: { label: 'Contrast', value: 'contrast', val: '10', unit: '%' }, grayscale: { label: 'Grayscale', value: 'grayscale', val: '10', unit: '%' }, 'hue-rotate': { label: 'Hue-rotate', value: 'hue-rotate', val: '10', unit: 'deg' }, invert: { label: 'Invert', value: 'invert', val: '10', unit: '%' }, opacity: { label: 'Opacity', value: 'opacity', val: '10', unit: '%' }, saturate: { label: 'Saturate', value: 'saturate', val: '10', unit: '%' }, sepia: { label: 'Sepia', value: 'sepia', val: '10', unit: '%' } }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_2__["default"], { position: "bottom right", variant: "secondary", options: filterArgs, buttonTitle: "Add Filter", onChange: addFilter, values: "" })), valArgs != undefined && valArgs.map((arg, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex my-3 items-center justify-between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, filterArgs[arg.id].label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val, type: "number", min: 0, max: 100, onChange: newVal => { valArgs[i].val = newVal; // setvalArgs(valArgs); var str = ''; valArgs.map(x => { str += x.id + '(' + x.val + x.unit + ') '; }); props.onChange(str, 'backdropFilter'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "hover:bg-red-500 bg-red-400 text-white ml-1 inline-block p-1 cursor-pointer", onClick: ev => { valArgs.splice(i, 1); setvalArgs(valArgs); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-no-alt" })))); })); } class PGcssBackdropFilter extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackdropFilter); /***/ }), /***/ "./src/components/css-backface-visibility/index.js": /*!*********************************************************!*\ !*** ./src/components/css-backface-visibility/index.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { visible: { "label": "Visible", "value": "visible" }, hidden: { "label": "Hidden", "value": "hidden" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'backfaceVisibility'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backfaceVisibility'); } else { props.onChange(x.value, 'backfaceVisibility'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'backfaceVisibility'); } else { props.onChange(align + ' !important', 'backfaceVisibility'); } } })); } class PGcssBackfaceVisibility extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackfaceVisibility); /***/ }), /***/ "./src/components/css-background-attachment/index.js": /*!***********************************************************!*\ !*** ./src/components/css-background-attachment/index.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { scroll: { "label": "Scroll", "value": "scroll" }, fixed: { "label": "Fixed", "value": "fixed" }, local: { "label": "Local", "value": "local" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Background Attachment", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'backgroundAttachment'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backgroundAttachment'); } else { props.onChange(x.value, 'backgroundAttachment'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'backgroundAttachment'); } else { props.onChange(align + ' !important', 'backgroundAttachment'); } } })); } class PGcssBackgroundAttachment extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundAttachment); /***/ }), /***/ "./src/components/css-background-blend-mode/index.js": /*!***********************************************************!*\ !*** ./src/components/css-background-blend-mode/index.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { normal: { "label": "Normal", "value": "normal" }, multiply: { "label": "Multiply", "value": "multiply" }, screen: { "label": "Screen", "value": "screen" }, overlay: { "label": "Overlay", "value": "overlay" }, darken: { "label": "Darken", "value": "darken" }, lighten: { "label": "Lighten", "value": "lighten" }, 'color-dodge': { "label": "Color dodge", "value": "color-dodge" }, saturation: { "label": "Saturation", "value": "saturation" }, color: { "label": "Color", "value": "color" }, luminosity: { "label": "Luminosity", "value": "luminosity" }, exclusion: { "label": "exclusion", "value": "exclusion" }, hue: { "label": "hue", "value": "hue" }, 'color-burn': { "label": "color-burn", "value": "color-burn" }, 'difference': { "label": "difference", "value": "difference" }, 'hard-light': { "label": "hard-light", "value": "hard-light" }, 'soft-light': { "label": "soft-light", "value": "soft-light" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Background Blend Mode", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'backgroundBlendMode'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backgroundBlendMode'); } else { props.onChange(x.value, 'backgroundBlendMode'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'backgroundBlendMode'); } else { props.onChange(align + ' !important', 'backgroundBlendMode'); } } })); } class PGcssBackgroundBlendMode extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundBlendMode); /***/ }), /***/ "./src/components/css-background-clip/index.js": /*!*****************************************************!*\ !*** ./src/components/css-background-clip/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'border-box': { "label": "Border box", "value": "border-box" }, 'padding-box': { "label": "Padding box", "value": "padding-box" }, 'content-box': { "label": "Content box", "value": "content-box" }, 'revert-layer': { "label": "revert-layer", "value": "revert-layer" }, text: { "label": "text", "value": "text" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Background Blend Mode", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'backgroundClip'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backgroundClip'); } else { props.onChange(x.value, 'backgroundClip'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'backgroundClip'); } else { props.onChange(align + ' !important', 'backgroundClip'); } } })); } class PGcssBackgroundClip extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundClip); /***/ }), /***/ "./src/components/css-background-color/index.js": /*!******************************************************!*\ !*** ./src/components/css-background-color/index.js ***! \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [val, setval] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); const [customColor, setCustomColor] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const [newColorPreset, setNewColorPreset] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: "/post-grid/v2/get_options", method: "POST", data: { option: "post_grid_block_editor" } }).then(res => { if (res.colors.length != 0) { setCustomColor(res.colors); } }); }, []); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { const transformedColors = customColor.map((color, index) => { const name = color.substring(1).toUpperCase(); const upperCaseColor = color.toUpperCase(); return { name, color: upperCaseColor }; }); console.log(transformedColors); // const newColor = transformedColors.concat( // colorsPresets.slice(0, 6 - transformedColors.length) // ); let newColor; if (transformedColors.length >= 6) { newColor = transformedColors; } else { newColor = transformedColors.concat(_colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"].slice(0, 6 - transformedColors.length)); } setNewColorPreset(newColor); }, [customColor]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? "Important (Enabled)" : "Important?", checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(val, "backgroundColor"); } else { props.onChange(val + " !important", "backgroundColor"); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ColorPalette, { value: val, colors: newColorPreset, enableAlpha: true, onChange: newVal => { //props.onChange(newVal, 'backgroundColor'); setval(newVal); if (isImportant) { props.onChange(newVal + " !important", "backgroundColor"); } else { props.onChange(newVal, "backgroundColor"); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Global Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: val, options: [{ label: "Choose", value: "" }, { label: "Inherit", value: "inherit" }, { label: "Initial", value: "initial" }, { label: "Revert", value: "revert" }, { label: "Revert-layer", value: "revert-layer" }, { label: "Unset", value: "unset" }], onChange: newVal => { setval(newVal); if (isImportant) { props.onChange(newVal + " !important", "backgroundColor"); } else { props.onChange(newVal, "backgroundColor"); } } }))))); } class PGcssBackgroundColor extends Component { constructor(props) { super(props); this.state = { showWarning: false }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, enableAlpha, onChange, label } = this.props; var colorVal = val.replace(' !important', ''); var placeholderStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,25px 25px', backgroundSize: '50px 50px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var defaultbtnStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,25px 25px', backgroundSize: '50px 50px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var btnStyle = { backgroundColor: val, boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative h-10", style: placeholderStyle }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute w-full h-full top-0 left-0 text-center", style: btnStyle, onClick: this.handleToggleClick }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-full text-center left-0 top-1/2 -translate-y-1/2\t absolute" }, val == undefined ? 'Set Color' : colorVal)))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { enableAlpha: enableAlpha, val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundColor); /***/ }), /***/ "./src/components/css-background-image/index.js": /*!******************************************************!*\ !*** ./src/components/css-background-image/index.js ***! \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var typeArgs = { url: { label: 'Image URL', id: 'url' }, //conicGradient: { label: 'Conic Gradient', id: 'conicGradient' }, linearGradient: { label: 'Linear Gradient', id: 'linearGradient' }, radialGradient: { label: 'Radial Gradient', id: 'radialGradient' } // repeatingConicGradient: { label: 'Repeating Conic Gradient', id: 'repeatingConicGradient' }, // repeatingLinearGradient: { label: 'Repeating Linear Gradient', id: 'repeatingLinearGradient' }, // repeatingRadialGradient: { label: 'Repeating Radial Gradient', id: 'repeatingRadialGradient' }, }; var valX = props.val == undefined || props.val == null || props.val.length == 0 ? '' : props.val; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valX.split(", ").filter(n => n)); var RemoveQueryPram = function ({ index, arg }) { var typeName = ''; if (arg.includes("url")) { typeName = 'URL'; } else if (arg.includes("conic-gradient")) { typeName = 'Conic Gradient'; } else if (arg.includes("linear-gradient")) { typeName = 'Linear Gradient'; } else if (arg.includes("radial-gradient")) { typeName = 'Radial Gradient'; } else if (arg.includes("repeating-conic-gradient")) { typeName = 'R Conic Gradient'; } else if (arg.includes("repeating-linear-gradient")) { typeName = 'R Linear Gradient'; } else if (arg.includes("repeating-radial-gradient")) { typeName = 'R Radial Gradient'; } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { valArgs.splice(index, 1); var ssdsd = valArgs.concat([]); setValArgs(ssdsd); var valString = ssdsd.join(', '); props.onChange(valString, 'backgroundImage'); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, typeName.length == 0 ? '#' + index : typeName)); }; const ALLOWED_MEDIA_TYPES = ['image']; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_3__["default"], { position: "bottom right", variant: "secondary", options: typeArgs, buttonTitle: "Add", onChange: (option, index) => { if (option.id == 'url') { var dsdsf = valArgs.concat('url()'); } else if (option.id == 'linearGradient') { var dsdsf = valArgs.concat("linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)"); } else if (option.id == 'radialGradient') { var dsdsf = valArgs.concat("radial-gradient(#12c2e9 0%,#c471ed 50%,#f64f59 100%)"); } else if (option.id == 'conicGradient') { var dsdsf = valArgs.concat("conic-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)"); } setValArgs(dsdsf); var valString = valArgs.join(', '); props.onChange(valString, 'backgroundImage'); }, values: "" })), valArgs.length != 0 && valArgs.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-setting-input-gradient" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { initialOpen: false, title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveQueryPram, { index: index, arg: x }) }, x.includes("url") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: x.replace("url(", "").replace(")", ""), alt: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "mr-2", value: x.replace("url(", "").replace(")", ""), placeholder: "Image URL", onChange: newVal => { valArgs[index] = "url(" + newVal + ")"; setValArgs(valArgs); var valString = valArgs.join(", "); props.onChange(valString, "backgroundImage"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id valArgs[index] = "url(" + media.url + ")"; setValArgs(valArgs); var valString = valArgs.join(", "); props.onChange(valString, "backgroundImage"); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { className: "my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full", onClick: open }, "Open Media Library") }))), !x.includes("url") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.GradientPicker, { value: x == null || x == undefined ? null : x, onChange: currentGradient => { console.log(currentGradient); if (currentGradient == undefined) { valArgs.splice(index, 1); var ssdsd = valArgs.concat([]); setValArgs(ssdsd); var valString = ssdsd.join(", "); } else { valArgs[index] = currentGradient; setValArgs(valArgs); var valString = valArgs.join(", "); } console.log(valString); props.onChange(valString, "backgroundImage"); }, gradients: [{ name: "JShine", gradient: "linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)", slug: "jshine" }, { name: "Moonlit Asteroid", gradient: "linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)", slug: "moonlit-asteroid" }, { name: "Rastafarie", gradient: "linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)", slug: "rastafari" }] }))); })); } class PGcssBackgroundImage extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundImage); /***/ }), /***/ "./src/components/css-background-origin/index.js": /*!*******************************************************!*\ !*** ./src/components/css-background-origin/index.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'border-box': { "label": "border-box", "value": "border-box" }, 'padding-box': { "label": "padding-box", "value": "padding-box" }, 'content-box': { "label": "content-box", "value": "content-box" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Background Blend Mode", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'backgroundOrigin'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backgroundOrigin'); } else { props.onChange(x.value, 'backgroundOrigin'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'backgroundOrigin'); } else { props.onChange(align + ' !important', 'backgroundOrigin'); } } })); } class PGcssBackgroundOrigin extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundOrigin); /***/ }), /***/ "./src/components/css-background-position/index.js": /*!*********************************************************!*\ !*** ./src/components/css-background-position/index.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = [{ label: 'left top', value: 'left top' }, { label: 'left center', value: 'left center' }, { label: 'left bottom', value: 'left bottom' }, { label: 'right top', value: 'right top' }, { label: 'right center', value: 'right center' }, { label: 'right bottom', value: 'right bottom' }, { label: 'center top', value: 'center top' }, { label: 'center center', value: 'center center' }, { label: 'center bottom', value: 'center bottom' }, { label: "inherit", value: "inherit" }, { label: "initial", value: "initial" }, { label: "revert", value: "revert" }, { label: "unset", value: "unset" }]; const [isCustom, setisCustom] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.match(/-?\d+/g) == null ? false : true); const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [position, setposition] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.includes("!important") ? true : false); const [ValX, setValX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]); const [valUnitX, setvalUnitX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? 'px' : valArgs[0].match(/[a-zA-Z%]+/g)[0]); const [ValY, setValY] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined || valArgs[1].match(/-?\d+/g) == null ? 0 : valArgs[1].match(/-?\d+/g)[0]); const [valUnitY, setvalUnitY] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined || valArgs[1].match(/[a-zA-Z%]+/g) == null ? 'px' : valArgs[1].match(/[a-zA-Z%]+/g)[0]); // var ValX = (valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null) ? 0 : valArgs[0].match(/-?\d+/g)[0]; // var valUnitX = (valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null) ? 'px' : valArgs[0].match(/[a-zA-Z%]+/g)[0]; // var ValY = (valArgs[1] == undefined || valArgs[1].match(/-?\d+/g) == null) ? 0 : valArgs[1].match(/-?\d+/g)[0]; // var valUnitY = (valArgs[1] == undefined || valArgs[1].match(/[a-zA-Z%]+/g) == null) ? 'px' : valArgs[1].match(/[a-zA-Z%]+/g)[0]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isCustom ? 'Custom Value enabled?' : 'Custom Value?', checked: isCustom, onChange: arg => { //console.log(arg); setisCustom(isCustom => !isCustom); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, !isCustom && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, position.length == 0 ? 'Select...' : position)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, args.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setisCustom(false); setposition(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backgroundPosition'); } else { props.onChange(x.value, 'backgroundPosition'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), isCustom && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: ValX, type: "number", onChange: newVal => { console.log(valArgs); setValX(newVal); if (isImportant) { props.onChange(newVal + valUnitX + ' ' + ValY + valUnitY + ' ' + '!important', 'backgroundPosition'); } else { props.onChange(newVal + valUnitX + ' ' + ValY + valUnitY, 'backgroundPosition'); } } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, " / "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: ValY, type: "number", onChange: newVal => { console.log(valArgs); setValY(newVal); if (isImportant) { props.onChange(ValX + valUnitX + ' ' + newVal + valUnitY + ' ' + '!important', 'backgroundPosition'); } else { props.onChange(ValX + valUnitX + ' ' + newVal + valUnitY, 'backgroundPosition'); } } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { if (isCustom) { props.onChange(ValX + valUnitX + ' ' + ValY + valUnitY, 'backgroundPosition'); } else { props.onChange(position, 'backgroundPosition'); } } else { if (isCustom) { props.onChange(ValX + valUnitX + ' ' + ValY + valUnitY + ' ' + '!important', 'backgroundPosition'); } else { props.onChange(position + ' !important', 'backgroundPosition'); } } } })); } class PGcssBackgroundPosition extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundPosition); /***/ }), /***/ "./src/components/css-background-repeat/index.js": /*!*******************************************************!*\ !*** ./src/components/css-background-repeat/index.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { repeat: { "label": "Repeat", "value": "repeat" }, 'repeat-x': { "label": "Repeat X", "value": "repeat-x" }, 'repeat-y': { "label": "Repeat Y", "value": "repeat-y" }, 'no-repeat': { "label": "No repeat", "value": "no-repeat" }, space: { "label": "Space", "value": "space" }, round: { "label": "Round", "value": "round" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Background Repeat", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'backgroundRepeat'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'backgroundRepeat'); } else { props.onChange(x.value, 'backgroundRepeat'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'backgroundRepeat'); } else { props.onChange(align + ' !important', 'backgroundRepeat'); } } })); } class PGcssBackgroundRepeat extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundRepeat); /***/ }), /***/ "./src/components/css-background-size/index.js": /*!*****************************************************!*\ !*** ./src/components/css-background-size/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { auto: { "label": "auto", "value": "auto" }, cover: { "label": "Cover", "value": "cover" }, contain: { "label": "Contain", "value": "contain" }, custom: { "label": "Custom", "value": "custom" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; const [isMultiple, setisMultiple] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.includes(", ") ? true : false); const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(isMultiple ? props.val.split(", ") : props.val.split(" ")); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.includes("!important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "cursor-pointer bg-blue-500 text-white px-3 py-1 my-3", onClick: ev => { valArgs.push('auto'); setValArgs(valArgs); props.onChange(valArgs.join(' '), 'backgroundSize'); } }, "Add"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isMultiple ? 'Multiple (Enabled)' : 'Multiple?', checked: isMultiple, onChange: arg => { setisMultiple(isMultiple => !isMultiple); console.log(isMultiple); if (isMultiple) { if (isImportant) { props.onChange(valArgs.join(' ') + ' !important', 'backgroundSize'); } else { props.onChange(valArgs.join(' '), 'backgroundSize'); } } else { if (isImportant) { props.onChange(valArgs.join(', ') + ' !important', 'backgroundSize'); } else { props.onChange(valArgs.join(', '), 'backgroundSize'); } } } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, valArgs.map((item, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex my-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 text-white", onClick: ev => { valArgs.splice(i, 1); if (isMultiple) { if (isImportant) { props.onChange(valArgs.join(', ') + ' !important', 'backgroundSize'); } else { props.onChange(valArgs.join(', '), 'backgroundSize'); } } else { if (isImportant) { props.onChange(valArgs.join(' ') + ' !important', 'backgroundSize'); } else { props.onChange(valArgs.join(' '), 'backgroundSize'); } } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Background Repeat", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[item] == undefined ? 'Custom' : args[item].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { if (x.value == 'custom') { valArgs[i] = '0px'; } else { valArgs[i] = x.value; } props.onChange(valArgs.join(' '), 'backgroundSize'); setValArgs(valArgs); console.log(x.value); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), item.match(/-?\d+/g) != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: item.match(/-?\d+/g) == null ? '0' : item.match(/-?\d+/g)[0], type: "number", onChange: newVal => { //console.log(newVal); if (newVal.length > 0) { valArgs[i] = newVal + item.match(/[a-zA-Z%]+/g)[0]; props.onChange(valArgs.join(' '), 'backgroundSize'); setValArgs(valArgs); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, item.match(/[a-zA-Z%]+/g) == null ? 'Select...' : unitArgs[item.match(/[a-zA-Z%]+/g)[0]] == undefined ? '' : unitArgs[item.match(/[a-zA-Z%]+/g)[0]].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { var val = item.match(/-?\d+/g) == null ? 0 : item.match(/-?\d+/g)[0]; valArgs[i] = val + x.value; props.onChange(valArgs.join(' '), 'backgroundSize'); setValArgs(valArgs); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null)); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isMultiple) { if (isImportant) { props.onChange(valArgs.join(', ').replace('!important', ''), 'backgroundSize'); } else { props.onChange(valArgs.join(', ') + ' !important', 'backgroundSize'); } } else { if (isImportant) { props.onChange(valArgs.join(' ').replace('!important', ''), 'backgroundSize'); } else { props.onChange(valArgs.join(' ') + ' !important', 'backgroundSize'); } } } })); } class PGcssBackgroundSize extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBackgroundSize); /***/ }), /***/ "./src/components/css-bg-color/index.js": /*!**********************************************!*\ !*** ./src/components/css-bg-color/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ColorPalette, { value: props.value, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { props.onChange(newVal, 'bgColor'); } })))); } class PGcssBgColor extends Component { constructor(props) { super(props); this.state = { showWarning: false }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, enableAlpha, onChange, label } = this.props; var placeholderStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,25px 25px', backgroundSize: '50px 50px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var defaultbtnStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,25px 25px', backgroundSize: '50px 50px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var btnStyle = { backgroundColor: val, boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { className: "text-sm" }, "This css property is depricated, please use ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("strong", null, "Background Color"), " instead"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative h-10", style: placeholderStyle }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute w-full h-full top-0 left-0 text-center", style: btnStyle, onClick: this.handleToggleClick }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-full text-center left-0 top-1/2 -translate-y-1/2\t absolute" }, val == undefined ? 'Set Color' : val)))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { enableAlpha: enableAlpha, value: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBgColor); /***/ }), /***/ "./src/components/css-border-bottom/index.js": /*!***************************************************!*\ !*** ./src/components/css-border-bottom/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : ['0px', 'solid', '#000000']; var widthVal = valParts[0] != undefined ? valParts[0] : '0px'; var styleVal = valParts[1] != undefined ? valParts[1] : 'solid'; var colorVal = valParts[2] != undefined ? valParts[2] : '#000000'; var outlineStyleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = widthVal.match(/-?\d+/g) != null ? widthVal.match(/-?\d+/g)[0] : 1; var widthUnitX = widthVal.match(/[a-zA-Z%]+/g) != null ? widthVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [widthValY, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnitY, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [outlineWidthVal, setoutlineWidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthVal); const [outlineStyleVal, setoutlineStyleVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(styleVal); const [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValY, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal, 'borderBottom'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, widthUnitY != undefined ? unitArgs[widthUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal, 'borderBottom'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleVal ? outlineStyleArgs[outlineStyleVal].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(outlineStyleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal, 'borderBottom'); setoutlineStyleVal(x.value); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: outlineColorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal, 'borderBottom'); setoutlineColorVal(newVal); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal, 'borderBottom'); } else { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal + ' !important', 'borderBottom'); } } })); } class PGcssBorderBottom extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderBottom); /***/ }), /***/ "./src/components/css-border-collapse/index.js": /*!*****************************************************!*\ !*** ./src/components/css-border-collapse/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = [{ "label": "separate", "value": "separate" }, { "label": "collapse", "value": "collapse" }, { "label": "initial", "value": "initial" }, { "label": "inherit", "value": "inherit" }, { "label": "revert", "value": "revert" }, { "label": "unset", "value": "unset" }]; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, args.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'borderCollapse'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'borderCollapse'); } else { props.onChange(x.value, 'borderCollapse'); } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'borderCollapse'); } else { props.onChange(align + ' !important', 'borderCollapse'); } } })); } class PGcssBorderCollapse extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderCollapse); /***/ }), /***/ "./src/components/css-border-image/index.js": /*!**************************************************!*\ !*** ./src/components/css-border-image/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } const ALLOWED_MEDIA_TYPES = ["image"]; var valZ = props.val == undefined || props.val == null || props.val.length == 0 ? "url(border.png) 1 1 1 1/ 10px 10px 10px 10px / 0px 0px 0px 0px round" : props.val; var source = valZ == undefined ? "" : valZ.split(" ")[0]; var slice = valZ == undefined ? 10 : valZ.split(" ")[1].replace("/", ""); var width = valZ == undefined ? 10 : valZ.split(" ")[2].replace("/", ""); var outset = valZ == undefined ? 10 : valZ.split(" ")[3]; var repeat = valZ == undefined ? "" : valZ.split(" ")[4]; slice = slice.replaceAll(" ", "px "); slice = slice + "px"; var imageVal = source.replace('url("', ""); imageVal = imageVal.replace('")', ""); const [type, setType] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)("linear"); const [linearGradientValue, setLinearGradientValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)("linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)"); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Source")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "font-medium text-slate-900 pg-font " }, "Select Source"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { options: [{ label: "Linear Gradient", value: "linear" }, { label: "Image", value: "image" }], values: "", onChange: newVal => { setType(newVal); } })), type === "linear" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.GradientPicker, { value: linearGradientValue, onChange: currentGradient => { console.log(currentGradient); setLinearGradientValue(currentGradient); var sliceX = slice.replaceAll("px", ""); props.onChange(currentGradient + sliceX + "/ " + width + "/ " + outset + " " + repeat, "borderImage"); }, gradients: [{ name: "JShine", gradient: "linear-gradient(135deg,#12c2e9 0%,#c471ed 50%,#f64f59 100%)", slug: "jshine" }, { name: "Moonlit Asteroid", gradient: "linear-gradient(135deg,#0F2027 0%, #203A43 0%, #2c5364 100%)", slug: "moonlit-asteroid" }, { name: "Rastafarie", gradient: "linear-gradient(135deg,#1E9600 0%, #FFF200 0%, #FF0000 100%)", slug: "rastafari" }] }), type === "image" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: imageVal, alt: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "mr-2", value: imageVal.replace("url(", "").replace(")", ""), placeholder: "Image URL", onChange: newVal => { var sliceX = slice.replaceAll("px", ""); props.onChange("url(" + newVal + ") " + sliceX + "/ " + width + "/ " + outset + " " + repeat, "borderImage"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id var sliceX = slice.replaceAll("px", ""); props.onChange("url(" + media.url + ") " + sliceX + "/ " + width + "/ " + outset + " " + repeat, "borderImage"); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { className: "my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full", onClick: open }, "Open Media Library") }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Slice")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalBoxControl, { label: "", values: { top: slice.split(" ")[0], right: slice.split(" ")[1], bottom: slice.split(" ")[2], left: slice.split(" ")[3] }, onChange: nextValues => { var top = parseInt(nextValues.top); var right = parseInt(nextValues.right); var bottom = parseInt(nextValues.bottom); var left = parseInt(nextValues.left); var sliceX = top + " " + right + " " + bottom + " " + left; props.onChange(source + " " + sliceX + "/ " + width + "/ " + outset + " " + repeat, "borderImage"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Width")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalBoxControl, { label: "", values: { top: width.split(" ")[0], right: width.split(" ")[1], bottom: width.split(" ")[2], left: width.split(" ")[3] }, onChange: nextValues => { var sliceX = slice.replaceAll("px", ""); var top = nextValues.top; var right = nextValues.right; var bottom = nextValues.bottom; var left = nextValues.left; var widthX = top + " " + right + " " + bottom + " " + left; props.onChange(source + " " + sliceX + "/ " + widthX + "/ " + outset + " " + repeat, "borderImage"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Outset")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalBoxControl, { label: "", values: { top: outset.split(" ")[0], right: outset.split(" ")[1], bottom: outset.split(" ")[2], left: outset.split(" ")[3] }, onChange: nextValues => { var sliceX = slice.replaceAll("px", ""); var top = nextValues.top; var right = nextValues.right; var bottom = nextValues.bottom; var left = nextValues.left; var outsetX = top + " " + right + " " + bottom + " " + left; props.onChange(source + " " + sliceX + "/ " + width + "/ " + outsetX + " " + repeat, "borderImage"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Repeat"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: repeat, options: [{ label: "Stretch", value: "stretch" }, { label: "Repeat", value: "repeat" }, { label: "Round", value: "round" }, { label: "Space", value: "space" }, { label: "Fill", value: "fill" }], onChange: newVal => { var sliceX = slice.replaceAll("px", ""); props.onChange(source + " " + sliceX + "/ " + width + "/ " + outset + " " + newVal, "borderImage"); } }))); } class PGcssBorderImage extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderImage); /***/ }), /***/ "./src/components/css-border-left/index.js": /*!*************************************************!*\ !*** ./src/components/css-border-left/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : ['0px', 'solid', '#000000']; var widthVal = valParts[0] != undefined ? valParts[0] : '0px'; var styleVal = valParts[1] != undefined ? valParts[1] : 'solid'; var colorVal = valParts[2] != undefined ? valParts[2] : '#000000'; var outlineStyleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = widthVal.match(/-?\d+/g) != null ? widthVal.match(/-?\d+/g)[0] : 1; var widthUnitX = widthVal.match(/[a-zA-Z%]+/g) != null ? widthVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [widthValY, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnitY, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [outlineWidthVal, setoutlineWidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthVal); const [outlineStyleVal, setoutlineStyleVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(styleVal); const [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValY, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal, 'borderLeft'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, widthUnitY != undefined ? unitArgs[widthUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal, 'borderLeft'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleVal ? outlineStyleArgs[outlineStyleVal].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(outlineStyleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal, 'borderLeft'); setoutlineStyleVal(x.value); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: outlineColorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal, 'borderLeft'); setoutlineColorVal(newVal); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(outlineWidthVal + ' ' + outlineStyleVal + ' ' + outlineColorVal, 'borderLeft'); } else { props.onChange(outlineWidthVal + ' ' + outlineStyleVal + ' ' + outlineColorVal + ' !important', 'borderLeft'); } } })); } class PGcssBorderLeft extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderLeft); /***/ }), /***/ "./src/components/css-border-radius/index.js": /*!***************************************************!*\ !*** ./src/components/css-border-radius/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var important = ''; if (typeof props.val == 'object') { var topX = props.val.top; var rightX = props.val.right; var bottomX = props.val.bottom; var leftX = props.val.left; var important = ''; } else { var valParts = props.val != undefined ? props.val.split(" ") : ['5px', '5px', '5px', '5px', '']; var topX = valParts[0]; var rightX = valParts[1]; var bottomX = valParts[2]; var leftX = valParts[3]; var important = valParts[4]; } const [valX, setvalX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ top: topX, right: rightX, bottom: bottomX, left: leftX }); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(valParts.includes("!important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { label: "", values: valX, onChange: nextValues => { // setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }) // props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'borderRadius'); setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }); if (isImportant) { props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left + ' !important', 'borderRadius'); } else { props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'borderRadius'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(valX.top + ' ' + valX.right + ' ' + valX.bottom + ' ' + valX.left, 'borderRadius'); } else { props.onChange(valX.top + ' ' + valX.right + ' ' + valX.bottom + ' ' + valX.left + ' !important', 'borderRadius'); } } })); } class PGcssBorderRadius extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderRadius); /***/ }), /***/ "./src/components/css-border-right/index.js": /*!**************************************************!*\ !*** ./src/components/css-border-right/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : ['0px', 'solid', '#000000']; var widthVal = valParts[0] != undefined ? valParts[0] : '0px'; var styleVal = valParts[1] != undefined ? valParts[1] : 'solid'; var colorVal = valParts[2] != undefined ? valParts[2] : '#000000'; var outlineStyleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = widthVal.match(/-?\d+/g) != null ? widthVal.match(/-?\d+/g)[0] : 1; var widthUnitX = widthVal.match(/[a-zA-Z%]+/g) != null ? widthVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [widthValY, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnitY, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [outlineWidthVal, setoutlineWidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthVal); const [outlineStyleVal, setoutlineStyleVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(styleVal); const [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValY, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal, 'borderRight'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, widthUnitY != undefined ? unitArgs[widthUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal, 'borderRight'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleVal ? outlineStyleArgs[outlineStyleVal].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(outlineStyleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal, 'borderRight'); setoutlineStyleVal(x.value); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: outlineColorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal, 'borderRight'); setoutlineColorVal(newVal); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(outlineWidthVal + ' ' + outlineStyleVal + ' ' + outlineColorVal, 'borderRight'); } else { props.onChange(outlineWidthVal + ' ' + outlineStyleVal + ' ' + outlineColorVal + ' !important', 'borderRight'); } } })); } class PGcssBorderRight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderRight); /***/ }), /***/ "./src/components/css-border-spacing/index.js": /*!****************************************************!*\ !*** ./src/components/css-border-spacing/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '1px 1px #000000' : props.val; var valParts = valZ != undefined ? valZ.split(" ") : ['1px', '1px', '#000000']; var horizontalVal = valParts[0]; var vericalVal = valParts[1]; var colorVal = valParts[2]; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // auto: { "label": "AUTO", "value": "auto" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; var horizontalValX = horizontalVal != undefined ? horizontalVal.match(/-?\d+/g)[0] : 1; var horizontalUnitX = horizontalVal != undefined ? horizontalVal.match(/[a-zA-Z%]+/g)[0] : 'px'; var vericalValX = vericalVal != undefined ? vericalVal.match(/-?\d+/g)[0] : 1; var vericalUnitX = vericalVal != undefined ? vericalVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [horizontalValY, sethorizontalVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(horizontalValX); const [horizontalUnitY, sethorizontalUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(horizontalUnitX); const [vericalValY, setvericalVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(vericalValX); const [vericalUnitY, setvericalUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(vericalUnitX); const [outlinehorizontalVal, setoutlinehorizontalVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(horizontalVal); const [outlinevericalVal, setoutlinevericalVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(vericalVal); const [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "grid grid-cols-2 gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Horizontal"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: horizontalValY, type: "number", onChange: newVal => { sethorizontalVal(newVal); props.onChange(newVal + horizontalUnitY + ' ' + outlinevericalVal, 'borderSpacing'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, horizontalUnitY != undefined ? unitArgs[horizontalUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { sethorizontalUnit(x.value); props.onChange(horizontalValY + x.value + ' ' + outlinevericalVal, 'borderSpacing'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Verical"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: vericalValY, type: "number", onChange: newVal => { setvericalVal(newVal); props.onChange(outlinehorizontalVal + ' ' + newVal + vericalUnitY, 'borderSpacing'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, vericalUnitY != undefined ? unitArgs[vericalUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setvericalUnit(x.value); props.onChange(outlinehorizontalVal + ' ' + vericalValY + x.value, 'borderSpacing'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(horizontalVal + ' ' + vericalVal + ' ', 'borderSpacing'); } else { props.onChange(horizontalVal + ' ' + vericalVal + ' ' + ' !important', 'borderSpacing'); } } })); } class PGcssBorderSpacing extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; var args = { fill: { "label": "fill", "value": "fill" }, contain: { "label": "contain", "value": "contain" }, cover: { "label": "cover", "value": "cover" }, 'scale-down': { "label": "scale-down", "value": "scale-down" }, none: { "label": "none", "value": "none" } }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderSpacing); /***/ }), /***/ "./src/components/css-border-top/index.js": /*!************************************************!*\ !*** ./src/components/css-border-top/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : ['0px', 'solid', '#000000']; var widthVal = valParts[0] != undefined ? valParts[0] : '0px'; var styleVal = valParts[1] != undefined ? valParts[1] : 'solid'; var colorVal = valParts[2] != undefined ? valParts[2] : '#000000'; var outlineStyleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = widthVal.match(/-?\d+/g) != null ? widthVal.match(/-?\d+/g)[0] : 1; var widthUnitX = widthVal.match(/[a-zA-Z%]+/g) != null ? widthVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [widthValY, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnitY, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [outlineWidthVal, setoutlineWidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthVal); const [outlineStyleVal, setoutlineStyleVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(styleVal); const [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValY, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal, 'borderTop'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, widthUnitY != undefined ? unitArgs[widthUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal, 'borderTop'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleVal ? outlineStyleArgs[outlineStyleVal].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(outlineStyleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal, 'borderTop'); setoutlineStyleVal(x.value); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: outlineColorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal, 'borderTop'); setoutlineColorVal(newVal); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal, 'borderTop'); } else { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal + ' !important', 'borderTop'); } } })); } class PGcssBorderTop extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorderTop); /***/ }), /***/ "./src/components/css-border/index.js": /*!********************************************!*\ !*** ./src/components/css-border/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : ['0px', 'solid', '#000000']; var widthVal = valParts[0] != undefined ? valParts[0] : '0px'; var styleVal = valParts[1] != undefined ? valParts[1] : 'solid'; var colorVal = valParts[2] != undefined ? valParts[2] : '#000000'; var outlineStyleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = widthVal.match(/-?\d+/g) != null ? widthVal.match(/-?\d+/g)[0] : 1; var widthUnitX = widthVal.match(/[a-zA-Z%]+/g) != null ? widthVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [widthValY, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnitY, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [outlineWidthVal, setoutlineWidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthVal); const [outlineStyleVal, setoutlineStyleVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(styleVal); const [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValY, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal, 'border'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, widthUnitY != undefined ? unitArgs[widthUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal, 'border'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleVal ? outlineStyleArgs[outlineStyleVal].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(outlineStyleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal, 'border'); setoutlineStyleVal(x.value); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Border Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: outlineColorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal, 'border'); setoutlineColorVal(newVal); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal, 'border'); } else { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal + ' !important', 'border'); } } })); } class PGcssBorder extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBorder); /***/ }), /***/ "./src/components/css-bottom/index.js": /*!********************************************!*\ !*** ./src/components/css-bottom/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; if (typeof props.val == 'object') { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; } var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'bottom'); } else { props.onChange(widthUnit, 'bottom'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'bottom'); } else { props.onChange(newVal + widthUnit, 'bottom'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'bottom'); } else { props.onChange(x.value, 'bottom'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'bottom'); } else { props.onChange(widthVal + x.value, 'bottom'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'bottom'); } else { props.onChange(widthVal + widthUnit, 'bottom'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'bottom'); } else { props.onChange(widthVal + widthUnit + ' !important', 'bottom'); } } } })); } class PGcssBottom extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBottom); /***/ }), /***/ "./src/components/css-box-shadow/index.js": /*!************************************************!*\ !*** ./src/components/css-box-shadow/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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 _colors_presets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* 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__); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px 0px 10px 5px #50547d4f' : props.val; // var valZ = (props.val == null || props.val == undefined || props.val.length == 0) ? '0px' : props.val; var h = valZ != undefined ? parseInt(valZ.split(" ")[0].match(/-?\d+/g)[0]) : 0; var v = valZ != undefined ? parseInt(valZ.split(" ")[1].match(/-?\d+/g)[0]) : 0; var blur = valZ != undefined ? parseInt(valZ.split(" ")[2].match(/-?\d+/g)[0]) : 10; var spread = valZ != undefined ? parseInt(valZ.split(" ")[3].match(/-?\d+/g)[0]) : 5; var color = valZ != undefined ? valZ.split(" ")[4] : '#dddddd'; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "H-Offset")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, { min: "-1000", max: "1000", step: "1", currentInput: h, value: h, onChange: newVal => { props.onChange(newVal + 'px ' + v + 'px ' + blur + 'px ' + spread + 'px ' + color, 'boxShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "V-Offset")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, { min: "-1000", max: "1000", step: "1", value: v, onChange: newVal => { props.onChange(h + 'px ' + newVal + 'px ' + blur + 'px ' + spread + 'px ' + color, 'boxShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Blur")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, { min: "0", max: "1000", step: "1", value: blur, onChange: newVal => { props.onChange(h + 'px ' + v + 'px ' + newVal + 'px ' + spread + 'px ' + color, 'boxShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Spread")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, { min: "0", max: "1000", step: "1", value: spread, onChange: newVal => { props.onChange(h + 'px ' + v + 'px ' + blur + 'px ' + newVal + 'px ' + color, 'boxShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: color, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_1__["default"], enableAlpha: true, onChange: newVal => { props.onChange(h + 'px ' + v + 'px ' + blur + 'px ' + spread + 'px ' + newVal, 'boxShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(h + 'px ' + v + 'px ' + blur + 'px ' + spread + 'px ' + color, 'boxShadow'); } else { props.onChange(h + 'px ' + v + 'px ' + blur + 'px ' + spread + 'px ' + color + ' !important', 'boxShadow'); } } })); } class PGcssBoxShadow extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBoxShadow); /***/ }), /***/ "./src/components/css-box-sizing/index.js": /*!************************************************!*\ !*** ./src/components/css-box-sizing/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'border-box': { "label": "border-box", "value": "border-box" }, 'content-box': { "label": "content-box", "value": "content-box" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Box Sizing", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'boxSizing'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'boxSizing'); } else { props.onChange(x.value, 'boxSizing'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'boxSizing'); } else { props.onChange(align + ' !important', 'boxSizing'); } } })); } class PGcssBoxSizing extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssBoxSizing); /***/ }), /***/ "./src/components/css-class-picker/index.js": /*!**************************************************!*\ !*** ./src/components/css-class-picker/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus-circle.js"); /* 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 _custom_tags__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../custom-tags */ "./src/custom-tags.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } //var val = (typeof props.val == 'object') ? props.val : props.val.split(" "); //const [valArgs, setValArgs] = useState(props.val == undefined ? [] : val); const [search, setsearch] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ enable: false, keyword: "" }); const [keyword, setKeyword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const [filteredOptions, setfilteredOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const tags = props.tags; // useEffect(() => { // //props.onChange(valArgs.join(' ')); // }, [valArgs]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { //console.log(typeof props.val); //var val = (typeof props.val == 'object') ? props.val : props.val.split(" "); //setValArgs(val); }, [props.val]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { //console.log(search); }, [search]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " p-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center capitalize font-medium text-slate-900 text-[13px] " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("h3", { className: "!capitalize !text-[13px] !mb-0 pg-font " }, props.label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 focus:outline-none focus:bg-gray-700", onClick: ev => { setsearch({ ...search, enable: !search.enable }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"], { fill: "#fff", size: "20", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "text-[13px] " }, "Add"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "pg-setting-input-textarea" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { className: "w-full", value: props.val, placeholder: props.placeholder, onChange: newVal => { props.onChange(newVal); } }))), search.enable && // <> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Popover, { position: "bottom left" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " p-2 w-[300px] pg-font pg-setting-input-text custom-scrollbar\t" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalInputControl, { autoComplete: "off", className: "p-3 w-full", placeholder: props.placeholder == undefined ? "Search..." : props.placeholder, value: keyword, onChange: newVal => { var newValX = newVal.replace(/[^a-zA-Z ]/g, ""); if (newValX.length > 0) { setKeyword(newValX); } if (typeof tags == "object") { setfilteredOptions({}); var newOptions = {}; Object.entries(tags).map(args => { var index = args[0]; var x = args[1]; let position = x.label.toLowerCase().search(newValX.toLowerCase()); if (position < 0) { x.exclude = true; } else { x.exclude = false; } newOptions[index] = x; }); setfilteredOptions(newOptions); } else { setfilteredOptions([]); var newOptions = []; tags.map((x, index) => { let position = x.label.toLowerCase().search(newValX.toLowerCase()); if (position < 0) { x.exclude = true; } else { x.exclude = false; } //newOptions.push(x); }); setfilteredOptions(newOptions); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, keyword.length == 0 && typeof tags == "object" && Object.entries(tags).map(args => { var index = args[0]; var x = args[1]; var id = args[0]; var item = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [typeof value == "object" && value.includes(isNumeric(index) ? parseInt(index) : index) ? "border-b cursor-pointer bg-slate-200 p-2 block" : "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] "], onClick: ev => { if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { // onChange(x, index); props.onChange(props.val + " " + item.id); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "text-gray-400" : ""] }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label)), x.isPro && // <span className="pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white"> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://pickplugins.com/post-grid/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro") // </span> ), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); }), keyword.length == 0 && typeof tags == "array" && tags.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [typeof value == "object" && value.includes(IsNumeric(index) ? parseInt(index) : index) ? "border-b cursor-pointer bg-slate-200 p-2 block" : "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] "], onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { // onChange(x, index); props.onChange(props.val + " " + item.id); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label, " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); }), keyword.length > 0 && typeof filteredOptions == "object" && Object.entries(filteredOptions).map(args => { var index = args[0]; var x = args[1]; if (x.exclude == false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] ", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { // onChange(x, index); props.onChange(props.val + " " + item.id); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label, " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); } }), keyword.length > 0 && typeof filteredOptions == "array" && filteredOptions.map((x, index) => { if (x.exclude == false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] ", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { // onChange(x, index); props.onChange(props.val + " " + item.id); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label, " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); } }), keyword.length > 0 && typeof filteredOptions == "object" && Object.entries(filteredOptions).length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No tags found."), keyword.length > 0 && filteredOptions.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No tags found.")))) // </> ); } class PGcssClassPicker extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { value, placeholder, tags, label, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: value, placeholder: placeholder, tags: tags, label: label, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssClassPicker); /***/ }), /***/ "./src/components/css-clear/index.js": /*!*******************************************!*\ !*** ./src/components/css-clear/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { none: { "label": "None", "value": "none" }, left: { "label": "Left", "value": "left" }, right: { "label": "Right", "value": "right" }, both: { "label": "Both", "value": "both" }, "inline-end": { "label": "inline-end", "value": "inline-end" }, "inline-start": { "label": "inline-start", "value": "inline-start" } // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'clear'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'clear'); } else { props.onChange(x.value, 'clear'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'clear'); } else { props.onChange(align + ' !important', 'clear'); } } })); } class PGcssClear extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssClear); /***/ }), /***/ "./src/components/css-clip/index.js": /*!******************************************!*\ !*** ./src/components/css-clip/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val; if (typeof props.val == 'object') { var topX = props.val.top; var rightX = props.val.right; var bottomX = props.val.bottom; var leftX = props.val.left; } else { var valParts = props.val != undefined ? props.val.split(" ") : ['5px', '5px', '5px', '5px']; var topX = valParts[0]; var rightX = valParts[1]; var bottomX = valParts[2]; var leftX = valParts[3]; } const [valX, setvalX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ top: topX, right: rightX, bottom: bottomX, left: leftX }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { label: "", values: valX, onChange: nextValues => { setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }); //nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'clip'); } })); } class PGcssClip extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssClip); /***/ }), /***/ "./src/components/css-color/index.js": /*!*******************************************!*\ !*** ./src/components/css-color/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [val, setval] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); const [customColor, setCustomColor] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const [newColorPreset, setNewColorPreset] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: "/post-grid/v2/get_options", method: "POST", data: { option: "post_grid_block_editor" } }).then(res => { if (res.colors.length != 0) { setCustomColor(res.colors); } }); }, []); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { const transformedColors = customColor.map((color, index) => { const name = color.substring(1).toUpperCase(); const upperCaseColor = color.toUpperCase(); return { name, color: upperCaseColor }; }); console.log(transformedColors); // const newColor = transformedColors.concat( // colorsPresets.slice(0, 6 - transformedColors.length) // ); let newColor; if (transformedColors.length >= 6) { newColor = transformedColors; } else { newColor = transformedColors.concat(_colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"].slice(0, 6 - transformedColors.length)); } setNewColorPreset(newColor); }, [customColor]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? "Important (Enabled)" : "Important?", checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(val, "color"); } else { props.onChange(val + " !important", "color"); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ColorPalette, { value: val, colors: newColorPreset, enableAlpha: true, onChange: newVal => { //props.onChange(newVal, 'color'); setval(newVal); if (isImportant) { props.onChange(newVal + " !important", "color"); } else { props.onChange(newVal, "color"); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Global Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: val, options: [{ label: "Choose", value: "" }, { label: "Inherit", value: "inherit" }, { label: "Initial", value: "initial" }, { label: "Revert", value: "revert" }, { label: "Revert-layer", value: "revert-layer" }, { label: "Unset", value: "unset" }], onChange: newVal => { setval(newVal); if (isImportant) { props.onChange(newVal + " !important", "color"); } else { props.onChange(newVal, "color"); } } }))))); } class PGcssColor extends Component { constructor(props) { super(props); this.state = { showWarning: false }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, enableAlpha, onChange, label } = this.props; console.log(val); var colorVal = val.replace(' !important', ''); var placeholderStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,25px 25px', backgroundSize: '50px 50px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var defaultbtnStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,25px 25px', backgroundSize: '50px 50px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var btnStyle = { backgroundColor: val, boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative h-10", style: placeholderStyle }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute w-full h-full top-0 left-0 text-center", style: btnStyle, onClick: this.handleToggleClick }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-full text-center left-0 top-1/2 -translate-y-1/2\t absolute" }, val == undefined ? 'Set Color' : colorVal)))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { enableAlpha: enableAlpha, val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssColor); /***/ }), /***/ "./src/components/css-column-count/index.js": /*!**************************************************!*\ !*** ./src/components/css-column-count/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: align, type: "number", onChange: newVal => { //setwidthVal(newVal); setalign(newVal); if (isImportant) { props.onChange(newVal + ' !important', 'columnCount'); } else { props.onChange(newVal, 'columnCount'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'columnCount'); } else { props.onChange(align + ' !important', 'columnCount'); } } })); } class PGcssColumnCount extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssColumnCount); /***/ }), /***/ "./src/components/css-column-gap/index.js": /*!************************************************!*\ !*** ./src/components/css-column-gap/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'columnGap'); } else { props.onChange(widthUnit, 'columnGap'); } } else { //props.onChange(newVal + widthUnit, 'columnGap'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'columnGap'); } else { props.onChange(newVal + widthUnit, 'columnGap'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'columnGap'); } else { props.onChange(x.value, 'columnGap'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'columnGap'); } else { props.onChange(widthVal + x.value, 'columnGap'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'columnGap'); } else { props.onChange(widthVal + widthUnit, 'columnGap'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'columnGap'); } else { props.onChange(widthVal + widthUnit + ' !important', 'columnGap'); } } } })); } class PGcssColumnGap extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssColumnGap); /***/ }), /***/ "./src/components/css-column-rule/index.js": /*!*************************************************!*\ !*** ./src/components/css-column-rule/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val.length == 0 || props.val == undefined ? ['0px', 'solid', '#000000', ''] : props.val.split(" "); var widthVal = valParts[0] != undefined ? valParts[0] : '0px'; var styleVal = valParts[1] != undefined ? valParts[1] : 'solid'; var colorVal = valParts[2] != undefined ? valParts[2] : '#000000'; var importantVal = valParts[3] != undefined ? valParts[3] : ''; var outlineStyleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var widthValX = widthVal.match(/-?\d+/g) != null ? widthVal.match(/-?\d+/g)[0] : 1; var widthUnitX = widthVal.match(/[a-zA-Z%]+/g) != null ? widthVal.match(/[a-zA-Z%]+/g)[0] : 'px'; const [widthValY, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnitY, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [outlineimportantVal, setoutlineimportantVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(importantVal.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, " valParts: ", JSON.stringify(valParts)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, " widthVal: ", JSON.stringify(widthVal)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, " styleVal: ", JSON.stringify(styleVal)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, " colorVal: ", JSON.stringify(colorVal)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValY, type: "number", onChange: newVal => { setwidthVal(newVal); if (outlineimportantVal) { props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal + ' ' + '!important', 'columnRule'); } else { props.onChange(newVal + widthUnitY + ' ' + styleVal + ' ' + colorVal, 'columnRule'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, unitArgs[widthUnitY] == undefined ? 'Select...' : unitArgs[widthUnitY].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (outlineimportantVal) { props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal + ' ' + '!important', 'columnRule'); } else { props.onChange(widthValY + x.value + ' ' + styleVal + ' ' + colorVal, 'columnRule'); } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleArgs[styleVal] == undefined ? 'Select...' : outlineStyleArgs[styleVal].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(outlineStyleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { if (outlineimportantVal) { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal + ' ' + '!important', 'columnRule'); } else { props.onChange(widthVal + ' ' + x.value + ' ' + colorVal, 'columnRule'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: colorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { console.log(widthVal); if (outlineimportantVal) { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal + ' ' + '!important', 'columnRule'); } else { props.onChange(widthVal + ' ' + styleVal + ' ' + newVal, 'columnRule'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: outlineimportantVal ? 'Important Enabled' : 'Important?', checked: outlineimportantVal, onChange: arg => { setoutlineimportantVal(outlineimportantVal => !outlineimportantVal); if (outlineimportantVal) { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal, 'columnRule'); } else { props.onChange(widthVal + ' ' + styleVal + ' ' + colorVal + ' ' + '!important', 'columnRule'); } } })); } class PGcssColumnRule extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssColumnRule); /***/ }), /***/ "./src/components/css-content/index.js": /*!*********************************************!*\ !*** ./src/components/css-content/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var content = props.val == null || props.val == undefined ? '' : props.val.replaceAll('"', ''); content = content.replaceAll('u0022', ''); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: content, type: "text", onChange: newVal => { //setwidthVal(newVal); props.onChange('"' + newVal + '"', 'content'); } })); } class PGcssContent extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssContent); /***/ }), /***/ "./src/components/css-cursor/index.js": /*!********************************************!*\ !*** ./src/components/css-cursor/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { auto: { "label": "auto", "value": "auto" }, pointer: { "label": "pointer", "value": "pointer" }, progress: { "label": "progress", "value": "progress" }, alias: { "label": "alias", "value": "alias" }, cell: { "label": "cell", "value": "cell" }, copy: { "label": "copy", "value": "copy" }, crosshair: { "label": "crosshair", "value": "crosshair" }, default: { "label": "default", "value": "default" }, grab: { "label": "grab", "value": "grab" }, grabbing: { "label": "grabbing", "value": "grabbing" }, help: { "label": "help", "value": "help" }, move: { "label": "move", "value": "move" }, 'col-resize': { "label": "col-resize", "value": "col-resize" }, 'context-menu': { "label": "context-menu", "value": "context-menu" }, 'e-resize': { "label": "e-resize", "value": "e-resize" }, 'ew-resize': { "label": "ew-resize", "value": "ew-resize" }, 'n-resize': { "label": "n-resize", "value": "n-resize" }, 'ne-resize': { "label": "ne-resize", "value": "ne-resize" }, 'nesw-resize': { "label": "nesw-resize", "value": "nesw-resize" }, 'ns-resize': { "label": "ns-resize", "value": "ns-resize" }, 'nw-resize': { "label": "nw-resize", "value": "nw-resize" }, 'nwse-resize': { "label": "nwse-resize", "value": "nwse-resize" }, 'no-drop': { "label": "no-drop", "value": "no-drop" }, 'none': { "label": "none", "value": "none" }, 'not-allowed': { "label": "not-allowed", "value": "not-allowed" }, 'row-resize': { "label": "row-resize", "value": "row-resize" }, 's-resize;': { "label": "s-resize;", "value": "s-resize;" }, 'se-resize': { "label": "se-resize", "value": "se-resize" }, 'sw-resize': { "label": "sw-resize", "value": "sw-resize" }, 'text': { "label": "text", "value": "text" }, 'w-resize': { "label": "w-resize", "value": "w-resize" }, 'wait': { "label": "wait", "value": "wait" }, 'zoom-in': { "label": "zoom-in", "value": "zoom-in" }, 'zoom-out': { "label": "zoom-out", "value": "zoom-out" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'cursor'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'cursor'); } else { props.onChange(x.value, 'cursor'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'cursor'); } else { props.onChange(align + ' !important', 'cursor'); } } })); } class PGcssCursor extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssCursor); /***/ }), /***/ "./src/components/css-direction/index.js": /*!***********************************************!*\ !*** ./src/components/css-direction/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { ltr: { "label": "ltr", "value": "ltr" }, rtl: { "label": "rtl", "value": "rtl" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Align Content", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'direction'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'direction'); } else { props.onChange(x.value, 'direction'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'direction'); } else { props.onChange(align + ' !important', 'direction'); } } })); } class PGcssDirection extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssDirection); /***/ }), /***/ "./src/components/css-display/index.js": /*!*********************************************!*\ !*** ./src/components/css-display/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { none: { "label": "None", "value": "none" }, block: { "label": "Block", "value": "block" }, inline: { "label": "Inline", "value": "inline" }, 'inline-block': { "label": "Inline Block", "value": "inline-block" }, grid: { "label": "Grid", "value": "grid" }, flex: { "label": "Flex", "value": "flex" }, contents: { "label": "contents", "value": "contents" }, 'inline-flex': { "label": "inline-flex", "value": "inline-flex" }, 'inline-grid': { "label": "inline-grid", "value": "inline-grid" }, 'inline-table': { "label": "inline-table", "value": "inline-table" }, 'list-item': { "label": "list-item", "value": "list-item" }, // 'run-in': { "label": "run-in", "value": "run-in" }, table: { "label": "table", "value": "table" }, 'table-caption': { "label": "table-caption", "value": "table-caption" }, 'table-column-group': { "label": "table-column-group", "value": "table-column-group" }, 'table-header-group': { "label": "table-header-group", "value": "table-header-group" }, 'table-footer-group': { "label": "table-footer-group", "value": "table-footer-group" }, 'table-row-group': { "label": "table-row-group", "value": "table-row-group" }, 'table-cell': { "label": "table-cell", "value": "table-cell" }, 'table-column': { "label": "table-column", "value": "table-column" }, 'table-row': { "label": "table-row", "value": "table-row" }, 'flow-root': { "label": "flow-root", "value": "flow-root" }, 'inline-grid': { "label": "inline-grid", "value": "inline-grid" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'display'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'display'); } else { props.onChange(x.value, 'display'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'display'); } else { props.onChange(align + ' !important', 'display'); } } })); } class PGcssDisplay extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssDisplay); /***/ }), /***/ "./src/components/css-filter/index.js": /*!********************************************!*\ !*** ./src/components/css-filter/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val == null || props.val == undefined || props.val.length == 0 ? [] : props.val.split(" "); var [valArgs, setvalArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); function addFilter(option, index) { var isExist = valArgs.find(x => x.id === option.value); if (isExist == undefined) { var obj = {}; obj['id'] = option.value; obj['val'] = option.val; valArgs.push(obj); var str = ''; valArgs.map(x => { if (x.id == 'blur') { str += x.id + '(' + x.val + 'px) '; } else if (x.id == 'hue-rotate') { str += x.id + '(' + x.val + 'deg) '; } else { str += x.id + '(' + x.val + '%) '; } }); props.onChange(str, 'filter'); } } (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var filtered = valParts.filter(Boolean); var res = filtered.map(x => { if (x.length != 0) { var argVal = x != undefined ? x.match(/-?\d+/g)[0] : 1; var argId = x != undefined ? x.match(/[a-zA-Z]+/g)[0] : ''; return { id: argId, val: argVal }; } }); setvalArgs(res); }, [props.val]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [valArgs]); const [filterArgs, setfilterArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ blur: { label: 'Blur', value: 'blur', val: '1', unit: 'px' }, brightness: { label: 'Brightness', value: 'brightness', val: '10', unit: '%' }, contrast: { label: 'Contrast', value: 'contrast', val: '10', unit: '%' }, grayscale: { label: 'Grayscale', value: 'grayscale', val: '10', unit: '%' }, 'hue-rotate': { label: 'Hue-rotate', value: 'hue-rotate', val: '10', unit: 'deg' }, invert: { label: 'Invert', value: 'invert', val: '10', unit: '%' }, opacity: { label: 'Opacity', value: 'opacity', val: '10', unit: '%' }, saturate: { label: 'Saturate', value: 'saturate', val: '10', unit: '%' }, sepia: { label: 'Sepia', value: 'sepia', val: '10', unit: '%' } }); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_2__["default"], { position: "bottom right", variant: "secondary", options: filterArgs, buttonTitle: "Add Filter", onChange: addFilter, values: "" })), valArgs != undefined && valArgs.map((arg, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex my-3 items-center justify-between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, filterArgs[arg.id] != undefined ? filterArgs[arg.id].label : arg.id), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val, type: "number", min: 0, max: 100, onChange: newVal => { valArgs[i].val = newVal; // setvalArgs(valArgs); var str = ''; valArgs.map(x => { if (x.id == 'blur') { str += x.id + '(' + x.val + 'px) '; } else if (x.id == 'hue-rotate') { str += x.id + '(' + x.val + 'deg) '; } else { str += x.id + '(' + x.val + '%) '; } }); props.onChange(str, 'filter'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "hover:bg-red-500 bg-red-400 text-white ml-1 inline-block p-1 cursor-pointer", onClick: ev => { valArgs.splice(i, 1); setvalArgs(valArgs); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-no-alt" })))); })); } class PGcssFilter extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFilter); /***/ }), /***/ "./src/components/css-flex-basis/index.js": /*!************************************************!*\ !*** ./src/components/css-flex-basis/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnit, 'flexBasis'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthVal + x.value, 'flexBasis'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal + widthUnit, 'flexBasis'); } else { props.onChange(widthVal + widthUnit + ' !important', 'flexBasis'); } } })); } class PGcssFlexBasis extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFlexBasis); /***/ }), /***/ "./src/components/css-flex-direction/index.js": /*!****************************************************!*\ !*** ./src/components/css-flex-direction/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { row: { "label": "row", "value": "row" }, 'row-reverse': { "label": "row-reverse", "value": "row-reverse" }, column: { "label": "column", "value": "column" }, 'column-reverse': { "label": "column-reverse", "value": "column-reverse" } }; var valX = props.val == undefined || props.val == null || props.val.length == 0 ? 'wrap' : props.val; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valX.split(" ")); const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[value] == undefined ? 'Select...' : args[value].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setValue(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'flexDirection'); } else { props.onChange(x.value, 'flexDirection'); } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(value, 'flexDirection'); } else { props.onChange(value + ' !important', 'flexDirection'); } } })); } class PGcssFlexDirection extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFlexDirection); /***/ }), /***/ "./src/components/css-flex-flow/index.js": /*!***********************************************!*\ !*** ./src/components/css-flex-flow/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { row: { "label": "row", "value": "row" }, "row-reverse": { "label": "row-reverse", "value": "row-reverse" }, column: { "label": "column", "value": "column" }, "column-reverse": { "label": "column-reverse", "value": "column-reverse" }, nowrap: { "label": "nowrap", "value": "nowrap" }, wrap: { "label": "wrap", "value": "wrap" }, "wrap-reverse": { "label": "wrap-reverse", "value": "wrap-reverse" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" }, revert: { "label": "revert", "value": "revert" }, "revert-layer": { "label": "revert-layer", "value": "revert-layer" }, unset: { "label": "unset", "value": "unset" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '' : props.val; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.split(" ")); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { valArgs.push(x.value); setValArgs(valArgs); props.onChange(valArgs.join(' '), 'flexFlow'); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), valArgs.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center my-1 border hover:bg-gray-400 cursor-pointer" }, " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 mr-2 p-1", onClick: ev => { valArgs.splice(i, 1); setValArgs(valArgs); props.onChange(valArgs.join(' '), 'flexFlow'); } }, " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: '#fff', icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"] }), " "), " ", x); })); } class PGcssFlexFlow extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFlexFlow); /***/ }), /***/ "./src/components/css-flex-grow/index.js": /*!***********************************************!*\ !*** ./src/components/css-flex-grow/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4 justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal, 'flexGrow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthValX, 'flexGrow'); } else { props.onChange(widthValX + ' !important', 'flexGrow'); } } })); } class PGcssFlexGrow extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFlexGrow); /***/ }), /***/ "./src/components/css-flex-shrink/index.js": /*!*************************************************!*\ !*** ./src/components/css-flex-shrink/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4 justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal, 'flexShrink'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthValX, 'flexShrink'); } else { props.onChange(widthValX + ' !important', 'flexShrink'); } } })); } class PGcssFlexShrink extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFlexShrink); /***/ }), /***/ "./src/components/css-flex-wrap/index.js": /*!***********************************************!*\ !*** ./src/components/css-flex-wrap/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { nowrap: { "label": "nowrap", "value": "nowrap" }, wrap: { "label": "wrap", "value": "wrap" }, 'wrap-reverse': { "label": "wrap-reverse", "value": "wrap-reverse" } }; var valX = props.val == undefined || props.val == null || props.val.length == 0 ? 'wrap' : props.val; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valX.split(" ")); const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[value] == undefined ? 'Select...' : args[value].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setValue(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'flexWrap'); } else { props.onChange(x.value, 'flexWrap'); } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(value, 'flexWrap'); } else { props.onChange(value + ' !important', 'flexWrap'); } } })); } class PGcssFlexWrap extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFlexWrap); /***/ }), /***/ "./src/components/css-float/index.js": /*!*******************************************!*\ !*** ./src/components/css-float/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { none: { "label": "None", "value": "none" }, left: { "label": "Left", "value": "left" }, right: { "label": "Right", "value": "right" }, "inline-end": { "label": "inline-end", "value": "inline-end" }, "inline-start": { "label": "inline-start", "value": "inline-start" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'float'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'float'); } else { props.onChange(x.value, 'float'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'float'); } else { props.onChange(align + ' !important', 'float'); } } })); } class PGcssFloat extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFloat); /***/ }), /***/ "./src/components/css-font-family/index.js": /*!*************************************************!*\ !*** ./src/components/css-font-family/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var isLoaded = props.isLoaded; console.log(isLoaded); var fontsLibrary = ["ABeeZee", "Abel", "Abhaya Libre", "Aboreto", "Abril Fatface", "Abyssinica SIL", "Aclonica", "Acme", "Actor", "Adamina", "Advent Pro", "Agdasima", "Aguafina Script", "Akatab", "Akaya Kanadaka", "Akaya Telivigala", "Akronim", "Akshar", "Aladin", "Alata", "Alatsi", "Albert Sans", "Aldrich", "Alef", "Alegreya", "Alegreya SC", "Alegreya Sans", "Alegreya Sans SC", "Aleo", "Alex Brush", "Alexandria", "Alfa Slab One", "Alice", "Alike", "Alike Angular", "Alkalami", "Alkatra", "Allan", "Allerta", "Allerta Stencil", "Allison", "Allura", "Almarai", "Almendra", "Almendra Display", "Almendra SC", "Alumni Sans", "Alumni Sans Collegiate One", "Alumni Sans Inline One", "Alumni Sans Pinstripe", "Amarante", "Amaranth", "Amatic SC", "Amethysta", "Amiko", "Amiri", "Amiri Quran", "Amita", "Anaheim", "Andada Pro", "Andika", "Anek Bangla", "Anek Devanagari", "Anek Gujarati", "Anek Gurmukhi", "Anek Kannada", "Anek Latin", "Anek Malayalam", "Anek Odia", "Anek Tamil", "Anek Telugu", "Angkor", "Annie Use Your Telescope", "Anonymous Pro", "Antic", "Antic Didone", "Antic Slab", "Anton", "Antonio", "Anuphan", "Anybody", "Aoboshi One", "Arapey", "Arbutus", "Arbutus Slab", "Architects Daughter", "Archivo", "Archivo Black", "Archivo Narrow", "Are You Serious", "Aref Ruqaa", "Aref Ruqaa Ink", "Arima", "Arimo", "Arizonia", "Armata", "Arsenal", "Artifika", "Arvo", "Arya", "Asap", "Asap Condensed", "Asar", "Asset", "Assistant", "Astloch", "Asul", "Athiti", "Atkinson Hyperlegible", "Atma", "Atomic Age", "Aubrey", "Audiowide", "Autour One", "Average", "Average Sans", "Averia Gruesa Libre", "Averia Libre", "Averia Sans Libre", "Averia Serif Libre", "Azeret Mono", "B612", "B612 Mono", "BIZ UDGothic", "BIZ UDMincho", "BIZ UDPGothic", "BIZ UDPMincho", "Babylonica", "Bacasime Antique", "Bad Script", "Bagel Fat One", "Bahiana", "Bahianita", "Bai Jamjuree", "Bakbak One", "Ballet", "Baloo 2", "Baloo Bhai 2", "Baloo Bhaijaan 2", "Baloo Bhaina 2", "Baloo Chettan 2", "Baloo Da 2", "Baloo Paaji 2", "Baloo Tamma 2", "Baloo Tammudu 2", "Baloo Thambi 2", "Balsamiq Sans", "Balthazar", "Bangers", "Barlow", "Barlow Condensed", "Barlow Semi Condensed", "Barriecito", "Barrio", "Basic", "Baskervville", "Battambang", "Baumans", "Bayon", "Be Vietnam Pro", "Beau Rivage", "Bebas Neue", "Belanosima", "Belgrano", "Bellefair", "Belleza", "Bellota", "Bellota Text", "BenchNine", "Benne", "Bentham", "Berkshire Swash", "Besley", "Beth Ellen", "Bevan", "BhuTuka Expanded One", "Big Shoulders Display", "Big Shoulders Inline Display", "Big Shoulders Inline Text", "Big Shoulders Stencil Display", "Big Shoulders Stencil Text", "Big Shoulders Text", "Bigelow Rules", "Bigshot One", "Bilbo", "Bilbo Swash Caps", "BioRhyme", "BioRhyme Expanded", "Birthstone", "Birthstone Bounce", "Biryani", "Bitter", "Black And White Picture", "Black Han Sans", "Black Ops One", "Blaka", "Blaka Hollow", "Blaka Ink", "Blinker", "Bodoni Moda", "Bokor", "Bona Nova", "Bonbon", "Bonheur Royale", "Boogaloo", "Borel", "Bowlby One", "Bowlby One SC", "Braah One", "Brawler", "Bree Serif", "Bruno Ace", "Bruno Ace SC", "Brygada 1918", "Bubblegum Sans", "Bubbler One", "Buda", "Buenard", "Bungee", "Bungee Hairline", "Bungee Inline", "Bungee Outline", "Bungee Shade", "Bungee Spice", "Butcherman", "Butterfly Kids", "Cabin", "Cabin Condensed", "Cabin Sketch", "Caesar Dressing", "Cagliostro", "Cairo", "Cairo Play", "Caladea", "Calistoga", "Calligraffitti", "Cambay", "Cambo", "Candal", "Cantarell", "Cantata One", "Cantora One", "Caprasimo", "Capriola", "Caramel", "Carattere", "Cardo", "Carlito", "Carme", "Carrois Gothic", "Carrois Gothic SC", "Carter One", "Castoro", "Castoro Titling", "Catamaran", "Caudex", "Caveat", "Caveat Brush", "Cedarville Cursive", "Ceviche One", "Chakra Petch", "Changa", "Changa One", "Chango", "Charis SIL", "Charm", "Charmonman", "Chathura", "Chau Philomene One", "Chela One", "Chelsea Market", "Chenla", "Cherish", "Cherry Bomb One", "Cherry Cream Soda", "Cherry Swash", "Chewy", "Chicle", "Chilanka", "Chivo", "Chivo Mono", "Chokokutai", "Chonburi", "Cinzel", "Cinzel Decorative", "Clicker Script", "Climate Crisis", "Coda", "Codystar", "Coiny", "Combo", "Comfortaa", "Comforter", "Comforter Brush", "Comic Neue", "Coming Soon", "Comme", "Commissioner", "Concert One", "Condiment", "Content", "Contrail One", "Convergence", "Cookie", "Copse", "Corben", "Corinthia", "Cormorant", "Cormorant Garamond", "Cormorant Infant", "Cormorant SC", "Cormorant Unicase", "Cormorant Upright", "Courgette", "Courier Prime", "Cousine", "Coustard", "Covered By Your Grace", "Crafty Girls", "Creepster", "Crete Round", "Crimson Pro", "Crimson Text", "Croissant One", "Crushed", "Cuprum", "Cute Font", "Cutive", "Cutive Mono", "DM Mono", "DM Sans", "DM Serif Display", "DM Serif Text", "Dai Banna SIL", "Damion", "Dancing Script", "Dangrek", "Darker Grotesque", "Darumadrop One", "David Libre", "Dawning of a New Day", "Days One", "Dekko", "Dela Gothic One", "Delicious Handrawn", "Delius", "Delius Swash Caps", "Delius Unicase", "Della Respira", "Denk One", "Devonshire", "Dhurjati", "Didact Gothic", "Diphylleia", "Diplomata", "Diplomata SC", "Do Hyeon", "Dokdo", "Domine", "Donegal One", "Dongle", "Doppio One", "Dorsa", "Dosis", "DotGothic16", "Dr Sugiyama", "Duru Sans", "DynaPuff", "Dynalight", "EB Garamond", "Eagle Lake", "East Sea Dokdo", "Eater", "Economica", "Eczar", "Edu NSW ACT Foundation", "Edu QLD Beginner", "Edu SA Beginner", "Edu TAS Beginner", "Edu VIC WA NT Beginner", "El Messiri", "Electrolize", "Elsie", "Elsie Swash Caps", "Emblema One", "Emilys Candy", "Encode Sans", "Encode Sans Condensed", "Encode Sans Expanded", "Encode Sans SC", "Encode Sans Semi Condensed", "Encode Sans Semi Expanded", "Engagement", "Englebert", "Enriqueta", "Ephesis", "Epilogue", "Erica One", "Esteban", "Estonia", "Euphoria Script", "Ewert", "Exo", "Exo 2", "Expletus Sans", "Explora", "Fahkwang", "Familjen Grotesk", "Fanwood Text", "Farro", "Farsan", "Fascinate", "Fascinate Inline", "Faster One", "Fasthand", "Fauna One", "Faustina", "Federant", "Federo", "Felipa", "Fenix", "Festive", "Figtree", "Finger Paint", "Finlandica", "Fira Code", "Fira Mono", "Fira Sans", "Fira Sans Condensed", "Fira Sans Extra Condensed", "Fjalla One", "Fjord One", "Flamenco", "Flavors", "Fleur De Leah", "Flow Block", "Flow Circular", "Flow Rounded", "Foldit", "Fondamento", "Fontdiner Swanky", "Forum", "Fragment Mono", "Francois One", "Frank Ruhl Libre", "Fraunces", "Freckle Face", "Fredericka the Great", "Fredoka", "Freehand", "Fresca", "Frijole", "Fruktur", "Fugaz One", "Fuggles", "Fuzzy Bubbles", "GFS Didot", "GFS Neohellenic", "Gabriela", "Gaegu", "Gafata", "Gajraj One", "Galada", "Galdeano", "Galindo", "Gamja Flower", "Gantari", "Gasoek One", "Gayathri", "Gelasio", "Gemunu Libre", "Genos", "Gentium Book Plus", "Gentium Plus", "Geo", "Geologica", "Georama", "Geostar", "Geostar Fill", "Germania One", "Gideon Roman", "Gidugu", "Gilda Display", "Girassol", "Give You Glory", "Glass Antiqua", "Glegoo", "Gloock", "Gloria Hallelujah", "Glory", "Gluten", "Goblin One", "Gochi Hand", "Goldman", "Golos Text", "Gorditas", "Gothic A1", "Gotu", "Goudy Bookletter 1911", "Gowun Batang", "Gowun Dodum", "Graduate", "Grand Hotel", "Grandiflora One", "Grandstander", "Grape Nuts", "Gravitas One", "Great Vibes", "Grechen Fuemen", "Grenze", "Grenze Gotisch", "Grey Qo", "Griffy", "Gruppo", "Gudea", "Gugi", "Gulzar", "Gupter", "Gurajada", "Gwendolyn", "Habibi", "Hachi Maru Pop", "Hahmlet", "Halant", "Hammersmith One", "Hanalei", "Hanalei Fill", "Handjet", "Handlee", "Hanken Grotesk", "Hanuman", "Happy Monkey", "Harmattan", "Headland One", "Heebo", "Henny Penny", "Hepta Slab", "Herr Von Muellerhoff", "Hi Melody", "Hina Mincho", "Hind", "Hind Guntur", "Hind Madurai", "Hind Siliguri", "Hind Vadodara", "Holtwood One SC", "Homemade Apple", "Homenaje", "Hubballi", "Hurricane", "IBM Plex Mono", "IBM Plex Sans", "IBM Plex Sans Arabic", "IBM Plex Sans Condensed", "IBM Plex Sans Devanagari", "IBM Plex Sans Hebrew", "IBM Plex Sans JP", "IBM Plex Sans KR", "IBM Plex Sans Thai", "IBM Plex Sans Thai Looped", "IBM Plex Serif", "IM Fell DW Pica", "IM Fell DW Pica SC", "IM Fell Double Pica", "IM Fell Double Pica SC", "IM Fell English", "IM Fell English SC", "IM Fell French Canon", "IM Fell French Canon SC", "IM Fell Great Primer", "IM Fell Great Primer SC", "Ibarra Real Nova", "Iceberg", "Iceland", "Imbue", "Imperial Script", "Imprima", "Inconsolata", "Inder", "Indie Flower", "Ingrid Darling", "Inika", "Inknut Antiqua", "Inria Sans", "Inria Serif", "Inspiration", "Instrument Sans", "Instrument Serif", "Inter", "Inter Tight", "Irish Grover", "Island Moments", "Istok Web", "Italiana", "Italianno", "Itim", "Jacques Francois", "Jacques Francois Shadow", "Jaldi", "JetBrains Mono", "Jim Nightshade", "Joan", "Jockey One", "Jolly Lodger", "Jomhuria", "Jomolhari", "Josefin Sans", "Josefin Slab", "Jost", "Joti One", "Jua", "Judson", "Julee", "Julius Sans One", "Junge", "Jura", "Just Another Hand", "Just Me Again Down Here", "K2D", "Kablammo", "Kadwa", "Kaisei Decol", "Kaisei HarunoUmi", "Kaisei Opti", "Kaisei Tokumin", "Kalam", "Kameron", "Kanit", "Kantumruy Pro", "Karantina", "Karla", "Karma", "Katibeh", "Kaushan Script", "Kavivanar", "Kavoon", "Kdam Thmor Pro", "Keania One", "Kelly Slab", "Kenia", "Khand", "Khmer", "Khula", "Kings", "Kirang Haerang", "Kite One", "Kiwi Maru", "Klee One", "Knewave", "KoHo", "Kodchasan", "Koh Santepheap", "Kolker Brush", "Konkhmer Sleokchher", "Kosugi", "Kosugi Maru", "Kotta One", "Koulen", "Kranky", "Kreon", "Kristi", "Krona One", "Krub", "Kufam", "Kulim Park", "Kumar One", "Kumar One Outline", "Kumbh Sans", "Kurale", "La Belle Aurore", "Labrada", "Lacquer", "Laila", "Lakki Reddy", "Lalezar", "Lancelot", "Langar", "Lateef", "Lato", "Lavishly Yours", "League Gothic", "League Script", "League Spartan", "Leckerli One", "Ledger", "Lekton", "Lemon", "Lemonada", "Lexend", "Lexend Deca", "Lexend Exa", "Lexend Giga", "Lexend Mega", "Lexend Peta", "Lexend Tera", "Lexend Zetta", "Libre Barcode 128", "Libre Barcode 128 Text", "Libre Barcode 39", "Libre Barcode 39 Extended", "Libre Barcode 39 Extended Text", "Libre Barcode 39 Text", "Libre Barcode EAN13 Text", "Libre Baskerville", "Libre Bodoni", "Libre Caslon Display", "Libre Caslon Text", "Libre Franklin", "Licorice", "Life Savers", "Lilita One", "Lily Script One", "Limelight", "Linden Hill", "Lisu Bosa", "Literata", "Liu Jian Mao Cao", "Livvic", "Lobster", "Lobster Two", "Londrina Outline", "Londrina Shadow", "Londrina Sketch", "Londrina Solid", "Long Cang", "Lora", "Love Light", "Love Ya Like A Sister", "Loved by the King", "Lovers Quarrel", "Luckiest Guy", "Lugrasimo", "Lumanosimo", "Lunasima", "Lusitana", "Lustria", "Luxurious Roman", "Luxurious Script", "M PLUS 1", "M PLUS 1 Code", "M PLUS 1p", "M PLUS 2", "M PLUS Code Latin", "M PLUS Rounded 1c", "Ma Shan Zheng", "Macondo", "Macondo Swash Caps", "Mada", "Magra", "Maiden Orange", "Maitree", "Major Mono Display", "Mako", "Mali", "Mallanna", "Mandali", "Manjari", "Manrope", "Mansalva", "Manuale", "Marcellus", "Marcellus SC", "Marck Script", "Margarine", "Marhey", "Markazi Text", "Marko One", "Marmelad", "Martel", "Martel Sans", "Martian Mono", "Marvel", "Mate", "Mate SC", "Material Icons", "Material Icons Outlined", "Material Icons Round", "Material Icons Sharp", "Material Icons Two Tone", "Material Symbols Outlined", "Material Symbols Rounded", "Material Symbols Sharp", "Maven Pro", "McLaren", "Mea Culpa", "Meddon", "MedievalSharp", "Medula One", "Meera Inimai", "Megrim", "Meie Script", "Meow Script", "Merienda", "Merriweather", "Merriweather Sans", "Metal", "Metal Mania", "Metamorphous", "Metrophobic", "Michroma", "Milonga", "Miltonian", "Miltonian Tattoo", "Mina", "Mingzat", "Miniver", "Miriam Libre", "Mirza", "Miss Fajardose", "Mitr", "Mochiy Pop One", "Mochiy Pop P One", "Modak", "Modern Antiqua", "Mogra", "Mohave", "Moirai One", "Molengo", "Molle", "Monda", "Monofett", "Monomaniac One", "Monoton", "Monsieur La Doulaise", "Montaga", "Montagu Slab", "MonteCarlo", "Montez", "Montserrat", "Montserrat Alternates", "Montserrat Subrayada", "Moo Lah Lah", "Moon Dance", "Moul", "Moulpali", "Mountains of Christmas", "Mouse Memoirs", "Mr Bedfort", "Mr Dafoe", "Mr De Haviland", "Mrs Saint Delafield", "Mrs Sheppards", "Ms Madi", "Mukta", "Mukta Mahee", "Mukta Malar", "Mukta Vaani", "Mulish", "Murecho", "MuseoModerno", "My Soul", "Mynerve", "Mystery Quest", "NTR", "Nabla", "Nanum Brush Script", "Nanum Gothic", "Nanum Gothic Coding", "Nanum Myeongjo", "Nanum Pen Script", "Narnoor", "Neonderthaw", "Nerko One", "Neucha", "Neuton", "New Rocker", "New Tegomin", "News Cycle", "Newsreader", "Niconne", "Niramit", "Nixie One", "Nobile", "Nokora", "Norican", "Nosifer", "Notable", "Nothing You Could Do", "Noticia Text", "Noto Color Emoji", "Noto Emoji", "Noto Kufi Arabic", "Noto Music", "Noto Naskh Arabic", "Noto Nastaliq Urdu", "Noto Rashi Hebrew", "Noto Sans", "Noto Sans Adlam", "Noto Sans Adlam Unjoined", "Noto Sans Anatolian Hieroglyphs", "Noto Sans Arabic", "Noto Sans Armenian", "Noto Sans Avestan", "Noto Sans Balinese", "Noto Sans Bamum", "Noto Sans Bassa Vah", "Noto Sans Batak", "Noto Sans Bengali", "Noto Sans Bhaiksuki", "Noto Sans Brahmi", "Noto Sans Buginese", "Noto Sans Buhid", "Noto Sans Canadian Aboriginal", "Noto Sans Carian", "Noto Sans Caucasian Albanian", "Noto Sans Chakma", "Noto Sans Cham", "Noto Sans Cherokee", "Noto Sans Chorasmian", "Noto Sans Coptic", "Noto Sans Cuneiform", "Noto Sans Cypriot", "Noto Sans Cypro Minoan", "Noto Sans Deseret", "Noto Sans Devanagari", "Noto Sans Display", "Noto Sans Duployan", "Noto Sans Egyptian Hieroglyphs", "Noto Sans Elbasan", "Noto Sans Elymaic", "Noto Sans Ethiopic", "Noto Sans Georgian", "Noto Sans Glagolitic", "Noto Sans Gothic", "Noto Sans Grantha", "Noto Sans Gujarati", "Noto Sans Gunjala Gondi", "Noto Sans Gurmukhi", "Noto Sans HK", "Noto Sans Hanifi Rohingya", "Noto Sans Hanunoo", "Noto Sans Hatran", "Noto Sans Hebrew", "Noto Sans Imperial Aramaic", "Noto Sans Indic Siyaq Numbers", "Noto Sans Inscriptional Pahlavi", "Noto Sans Inscriptional Parthian", "Noto Sans JP", "Noto Sans Javanese", "Noto Sans KR", "Noto Sans Kaithi", "Noto Sans Kannada", "Noto Sans Kayah Li", "Noto Sans Kharoshthi", "Noto Sans Khmer", "Noto Sans Khojki", "Noto Sans Khudawadi", "Noto Sans Lao", "Noto Sans Lao Looped", "Noto Sans Lepcha", "Noto Sans Limbu", "Noto Sans Linear A", "Noto Sans Linear B", "Noto Sans Lisu", "Noto Sans Lycian", "Noto Sans Lydian", "Noto Sans Mahajani", "Noto Sans Malayalam", "Noto Sans Mandaic", "Noto Sans Manichaean", "Noto Sans Marchen", "Noto Sans Masaram Gondi", "Noto Sans Math", "Noto Sans Mayan Numerals", "Noto Sans Medefaidrin", "Noto Sans Meetei Mayek", "Noto Sans Mende Kikakui", "Noto Sans Meroitic", "Noto Sans Miao", "Noto Sans Modi", "Noto Sans Mongolian", "Noto Sans Mono", "Noto Sans Mro", "Noto Sans Multani", "Noto Sans Myanmar", "Noto Sans NKo", "Noto Sans Nabataean", "Noto Sans Nag Mundari", "Noto Sans Nandinagari", "Noto Sans New Tai Lue", "Noto Sans Newa", "Noto Sans Nushu", "Noto Sans Ogham", "Noto Sans Ol Chiki", "Noto Sans Old Hungarian", "Noto Sans Old Italic", "Noto Sans Old North Arabian", "Noto Sans Old Permic", "Noto Sans Old Persian", "Noto Sans Old Sogdian", "Noto Sans Old South Arabian", "Noto Sans Old Turkic", "Noto Sans Oriya", "Noto Sans Osage", "Noto Sans Osmanya", "Noto Sans Pahawh Hmong", "Noto Sans Palmyrene", "Noto Sans Pau Cin Hau", "Noto Sans Phags Pa", "Noto Sans Phoenician", "Noto Sans Psalter Pahlavi", "Noto Sans Rejang", "Noto Sans Runic", "Noto Sans SC", "Noto Sans Samaritan", "Noto Sans Saurashtra", "Noto Sans Sharada", "Noto Sans Shavian", "Noto Sans Siddham", "Noto Sans SignWriting", "Noto Sans Sinhala", "Noto Sans Sogdian", "Noto Sans Sora Sompeng", "Noto Sans Soyombo", "Noto Sans Sundanese", "Noto Sans Syloti Nagri", "Noto Sans Symbols", "Noto Sans Symbols 2", "Noto Sans Syriac", "Noto Sans Syriac Eastern", "Noto Sans TC", "Noto Sans Tagalog", "Noto Sans Tagbanwa", "Noto Sans Tai Le", "Noto Sans Tai Tham", "Noto Sans Tai Viet", "Noto Sans Takri", "Noto Sans Tamil", "Noto Sans Tamil Supplement", "Noto Sans Tangsa", "Noto Sans Telugu", "Noto Sans Thaana", "Noto Sans Thai", "Noto Sans Thai Looped", "Noto Sans Tifinagh", "Noto Sans Tirhuta", "Noto Sans Ugaritic", "Noto Sans Vai", "Noto Sans Vithkuqi", "Noto Sans Wancho", "Noto Sans Warang Citi", "Noto Sans Yi", "Noto Sans Zanabazar Square", "Noto Serif", "Noto Serif Ahom", "Noto Serif Armenian", "Noto Serif Balinese", "Noto Serif Bengali", "Noto Serif Devanagari", "Noto Serif Display", "Noto Serif Dogra", "Noto Serif Ethiopic", "Noto Serif Georgian", "Noto Serif Grantha", "Noto Serif Gujarati", "Noto Serif Gurmukhi", "Noto Serif HK", "Noto Serif Hebrew", "Noto Serif JP", "Noto Serif KR", "Noto Serif Kannada", "Noto Serif Khitan Small Script", "Noto Serif Khmer", "Noto Serif Khojki", "Noto Serif Lao", "Noto Serif Makasar", "Noto Serif Malayalam", "Noto Serif Myanmar", "Noto Serif NP Hmong", "Noto Serif Oriya", "Noto Serif Ottoman Siyaq", "Noto Serif SC", "Noto Serif Sinhala", "Noto Serif TC", "Noto Serif Tamil", "Noto Serif Tangut", "Noto Serif Telugu", "Noto Serif Thai", "Noto Serif Tibetan", "Noto Serif Toto", "Noto Serif Vithkuqi", "Noto Serif Yezidi", "Noto Traditional Nushu", "Nova Cut", "Nova Flat", "Nova Mono", "Nova Oval", "Nova Round", "Nova Script", "Nova Slim", "Nova Square", "Numans", "Nunito", "Nunito Sans", "Nuosu SIL", "Odibee Sans", "Odor Mean Chey", "Offside", "Oi", "Old Standard TT", "Oldenburg", "Ole", "Oleo Script", "Oleo Script Swash Caps", "Oooh Baby", "Open Sans", "Oranienbaum", "Orbit", "Orbitron", "Oregano", "Orelega One", "Orienta", "Original Surfer", "Oswald", "Outfit", "Over the Rainbow", "Overlock", "Overlock SC", "Overpass", "Overpass Mono", "Ovo", "Oxanium", "Oxygen", "Oxygen Mono", "PT Mono", "PT Sans", "PT Sans Caption", "PT Sans Narrow", "PT Serif", "PT Serif Caption", "Pacifico", "Padauk", "Padyakke Expanded One", "Palanquin", "Palanquin Dark", "Palette Mosaic", "Pangolin", "Paprika", "Parisienne", "Passero One", "Passion One", "Passions Conflict", "Pathway Extreme", "Pathway Gothic One", "Patrick Hand", "Patrick Hand SC", "Pattaya", "Patua One", "Pavanam", "Paytone One", "Peddana", "Peralta", "Permanent Marker", "Petemoss", "Petit Formal Script", "Petrona", "Philosopher", "Phudu", "Piazzolla", "Piedra", "Pinyon Script", "Pirata One", "Plaster", "Play", "Playball", "Playfair", "Playfair Display", "Playfair Display SC", "Plus Jakarta Sans", "Podkova", "Poiret One", "Poller One", "Poltawski Nowy", "Poly", "Pompiere", "Pontano Sans", "Poor Story", "Poppins", "Port Lligat Sans", "Port Lligat Slab", "Potta One", "Pragati Narrow", "Praise", "Prata", "Preahvihear", "Press Start 2P", "Pridi", "Princess Sofia", "Prociono", "Prompt", "Prosto One", "Proza Libre", "Public Sans", "Puppies Play", "Puritan", "Purple Purse", "Qahiri", "Quando", "Quantico", "Quattrocento", "Quattrocento Sans", "Questrial", "Quicksand", "Quintessential", "Qwigley", "Qwitcher Grypen", "REM", "Racing Sans One", "Radio Canada", "Radley", "Rajdhani", "Rakkas", "Raleway", "Raleway Dots", "Ramabhadra", "Ramaraja", "Rambla", "Rammetto One", "Rampart One", "Ranchers", "Rancho", "Ranga", "Rasa", "Rationale", "Ravi Prakash", "Readex Pro", "Recursive", "Red Hat Display", "Red Hat Mono", "Red Hat Text", "Red Rose", "Redacted", "Redacted Script", "Redressed", "Reem Kufi", "Reem Kufi Fun", "Reem Kufi Ink", "Reenie Beanie", "Reggae One", "Revalia", "Rhodium Libre", "Ribeye", "Ribeye Marrow", "Righteous", "Risque", "Road Rage", "Roboto", "Roboto Condensed", "Roboto Flex", "Roboto Mono", "Roboto Serif", "Roboto Slab", "Rochester", "Rock 3D", "Rock Salt", "RocknRoll One", "Rokkitt", "Romanesco", "Ropa Sans", "Rosario", "Rosarivo", "Rouge Script", "Rowdies", "Rozha One", "Rubik", "Rubik 80s Fade", "Rubik Beastly", "Rubik Bubbles", "Rubik Burned", "Rubik Dirt", "Rubik Distressed", "Rubik Gemstones", "Rubik Glitch", "Rubik Iso", "Rubik Marker Hatch", "Rubik Maze", "Rubik Microbe", "Rubik Mono One", "Rubik Moonrocks", "Rubik Pixels", "Rubik Puddles", "Rubik Spray Paint", "Rubik Storm", "Rubik Vinyl", "Rubik Wet Paint", "Ruda", "Rufina", "Ruge Boogie", "Ruluko", "Rum Raisin", "Ruslan Display", "Russo One", "Ruthie", "Rye", "STIX Two Text", "Sacramento", "Sahitya", "Sail", "Saira", "Saira Condensed", "Saira Extra Condensed", "Saira Semi Condensed", "Saira Stencil One", "Salsa", "Sanchez", "Sancreek", "Sansita", "Sansita Swashed", "Sarabun", "Sarala", "Sarina", "Sarpanch", "Sassy Frass", "Satisfy", "Sawarabi Gothic", "Sawarabi Mincho", "Scada", "Scheherazade New", "Schibsted Grotesk", "Schoolbell", "Scope One", "Seaweed Script", "Secular One", "Sedgwick Ave", "Sedgwick Ave Display", "Sen", "Send Flowers", "Sevillana", "Seymour One", "Shadows Into Light", "Shadows Into Light Two", "Shalimar", "Shantell Sans", "Shanti", "Share", "Share Tech", "Share Tech Mono", "Shippori Antique", "Shippori Antique B1", "Shippori Mincho", "Shippori Mincho B1", "Shizuru", "Shojumaru", "Short Stack", "Shrikhand", "Siemreap", "Sigmar", "Sigmar One", "Signika", "Signika Negative", "Silkscreen", "Simonetta", "Single Day", "Sintony", "Sirin Stencil", "Six Caps", "Skranji", "Slabo 13px", "Slabo 27px", "Slackey", "Slackside One", "Smokum", "Smooch", "Smooch Sans", "Smythe", "Sniglet", "Snippet", "Snowburst One", "Sofadi One", "Sofia", "Sofia Sans", "Sofia Sans Condensed", "Sofia Sans Extra Condensed", "Sofia Sans Semi Condensed", "Solitreo", "Solway", "Song Myung", "Sono", "Sonsie One", "Sora", "Sorts Mill Goudy", "Source Code Pro", "Source Sans 3", "Source Serif 4", "Space Grotesk", "Space Mono", "Special Elite", "Spectral", "Spectral SC", "Spicy Rice", "Spinnaker", "Spirax", "Splash", "Spline Sans", "Spline Sans Mono", "Squada One", "Square Peg", "Sree Krushnadevaraya", "Sriracha", "Srisakdi", "Staatliches", "Stalemate", "Stalinist One", "Stardos Stencil", "Stick", "Stick No Bills", "Stint Ultra Condensed", "Stint Ultra Expanded", "Stoke", "Strait", "Style Script", "Stylish", "Sue Ellen Francisco", "Suez One", "Sulphur Point", "Sumana", "Sunflower", "Sunshiney", "Supermercado One", "Sura", "Suranna", "Suravaram", "Suwannaphum", "Swanky and Moo Moo", "Syncopate", "Syne", "Syne Mono", "Syne Tactile", "Tai Heritage Pro", "Tajawal", "Tangerine", "Tapestry", "Taprom", "Tauri", "Taviraj", "Teko", "Tektur", "Telex", "Tenali Ramakrishna", "Tenor Sans", "Text Me One", "Texturina", "Thasadith", "The Girl Next Door", "The Nautigal", "Tienne", "Tillana", "Tilt Neon", "Tilt Prism", "Tilt Warp", "Timmana", "Tinos", "Tiro Bangla", "Tiro Devanagari Hindi", "Tiro Devanagari Marathi", "Tiro Devanagari Sanskrit", "Tiro Gurmukhi", "Tiro Kannada", "Tiro Tamil", "Tiro Telugu", "Titan One", "Titillium Web", "Tomorrow", "Tourney", "Trade Winds", "Train One", "Trirong", "Trispace", "Trocchi", "Trochut", "Truculenta", "Trykker", "Tsukimi Rounded", "Tulpen One", "Turret Road", "Twinkle Star", "Ubuntu", "Ubuntu Condensed", "Ubuntu Mono", "Uchen", "Ultra", "Unbounded", "Uncial Antiqua", "Underdog", "Unica One", "UnifrakturCook", "UnifrakturMaguntia", "Unkempt", "Unlock", "Unna", "Updock", "Urbanist", "VT323", "Vampiro One", "Varela", "Varela Round", "Varta", "Vast Shadow", "Vazirmatn", "Vesper Libre", "Viaoda Libre", "Vibes", "Vibur", "Victor Mono", "Vidaloka", "Viga", "Vina Sans", "Voces", "Volkhov", "Vollkorn", "Vollkorn SC", "Voltaire", "Vujahday Script", "Waiting for the Sunrise", "Wallpoet", "Walter Turncoat", "Warnes", "Water Brush", "Waterfall", "Wellfleet", "Wendy One", "Whisper", "WindSong", "Wire One", "Wix Madefor Display", "Wix Madefor Text", "Work Sans", "Xanh Mono", "Yaldevi", "Yanone Kaffeesatz", "Yantramanav", "Yatra One", "Yellowtail", "Yeon Sung", "Yeseva One", "Yesteryear", "Yomogi", "Yrsa", "Ysabeau", "Ysabeau Infant", "Ysabeau Office", "Ysabeau SC", "Yuji Boku", "Yuji Hentaigana Akari", "Yuji Hentaigana Akebono", "Yuji Mai", "Yuji Syuku", "Yusei Magic", "ZCOOL KuaiLe", "ZCOOL QingKe HuangYou", "ZCOOL XiaoWei", "Zen Antique", "Zen Antique Soft", "Zen Dots", "Zen Kaku Gothic Antique", "Zen Kaku Gothic New", "Zen Kurenaido", "Zen Loop", "Zen Maru Gothic", "Zen Old Mincho", "Zen Tokyo Zoo", "Zeyada", "Zhi Mang Xing", "Zilla Slab", "Zilla Slab Highlight"]; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? "" : props.val; const [fonts, setfonts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val == null || props.val == undefined || props.val.length == 0 ? [] : valZ.split(",")); const [keyword, setkeyword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [fontsFiltered, setfontsFiltered] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const [customFonts, setCustomFonts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const [fontFaceCSS, setFontFaceCSS] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: "/post-grid/v2/get_options", method: "POST", data: { option: "post_grid_block_editor" } }).then(res => { if (res.customFonts !== undefined && res.customFonts.length != 0) { setCustomFonts(res.customFonts); } }); }, []); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var str = ""; { customFonts.length != 0 && customFonts.map((font, index) => { var fontFamily = font.family; var src = font.src[0].url; var fontWeight = font.weight; str += `@font-face { font-family: '${fontFamily}'; src: url('${src}'); font-weight: ${fontWeight}; }`; }); } setFontFaceCSS(str); var wpfooter = document.getElementById("wpfooter"); var divWrap = document.getElementById("pg-font-face"); if (divWrap != undefined) { document.getElementById("pg-font-face").outerHTML = ""; } var divWrap = '<div id="pg-font-face"></div>'; wpfooter.insertAdjacentHTML("beforeend", divWrap); var csswrappg = document.getElementById("pg-font-face"); var fontFace = "<style>" + str + "</style>"; csswrappg.insertAdjacentHTML("beforeend", fontFace); }, [customFonts]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " mt-4" }, !isLoaded && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)), isLoaded && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(react_sortablejs__WEBPACK_IMPORTED_MODULE_2__.ReactSortable, { list: fonts, setList: item => { console.log(item); setfonts(item); props.onChange(item.toString(), "fontFamily"); } }, fonts.map((font, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { key: i, className: "flex my-3 items-center justify-between cursor-move hover:bg-gray-300" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 p-1 mr-2 cursor-pointer ", onClick: ev => { fonts.splice(i, 1); setfonts(fonts); props.onChange(fonts.toString(), "fontFamily"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { style: { fontFamily: font } }, font)), i == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-yellow-500 p-1" }, "Primary")); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: keyword, type: "text", autocomplete: "off", onChange: newVal => { setkeyword(newVal); var newValX = newVal.replace(/[^a-zA-Z ]/g, ""); var newOptions = []; fontsLibrary.map(font => { let position = font.toLowerCase().search(newValX.toLowerCase()); if (position < 0) {} else { newOptions.push(font); } }); console.log(newOptions); setfontsFiltered(newOptions); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-gray-400 text-white p-1 px-2 cursor-pointer", onClick: ev => { fonts.unshift(keyword); var fontsY = fonts.slice(0, 3); setfonts(fontsY); //setfonts(fonts); props.onChange(fontsY.toString(), "fontFamily"); } }, "Add")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3 h-60 overflow-y-scroll" }, keyword.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, customFonts.length > 0 && customFonts.map(font => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-1 my-1 bg-white hover:bg-gray-300 border flex items-center cursor-pointer", style: { fontFamily: font.family }, onClick: ev => { var fontsX = fonts.unshift(font.family); var fontsY = fonts.slice(0, 3); console.log(fontsX); // var fontsY = fonts.slice(0, 3); setfonts(fontsY); props.onChange(fontsY.toString(), "fontFamily"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, " ", font.family)); }), fontsLibrary.map(font => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-1 my-1 bg-white hover:bg-gray-300 border flex items-center cursor-pointer", style: { fontFamily: font }, onClick: ev => { var fontsX = fonts.unshift(font); console.log(fontsX); var fontsY = fonts.slice(0, 3); setfonts(fontsY); console.log(fontsY); props.onChange(fontsY.toString(), "fontFamily"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, " ", font)); })), keyword.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, fontsFiltered.map(font => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-1 my-1 bg-white hover:bg-gray-300 border flex items-center cursor-pointer", style: { fontFamily: font }, onClick: ev => { var fontsX = fonts.unshift(font); var fontsY = fonts.slice(0, 3); setfonts(fontsY); //setfonts(fonts); props.onChange(fonts.toString(), "fontFamily"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, " ", font)); })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null)); } class PGcssFontFamily extends Component { constructor(props) { super(props); this.state = { showWarning: true, isLoaded: false }; this.handleToggleClick = this.handleToggleClick.bind(this); } componentDidMount() { setTimeout(() => { this.setState(state => ({ isLoaded: !state.isLoaded })); }, 1000); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning, isLoaded: this.state.isLoaded }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFontFamily); /***/ }), /***/ "./src/components/css-font-size/index.js": /*!***********************************************!*\ !*** ./src/components/css-font-size/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // large: { "label": "large", "value": "large" }, // larger: { "label": "larger", "value": "larger" }, // medium: { "label": "medium", "value": "medium" }, // small: { "label": "small", "value": "small" }, // smaller: { "label": "smaller", "value": "smaller" }, // "x-large": { "label": "x-large", "value": "x-large" }, // "x-small": { "label": "x-small", "value": "x-small" }, // "xx-large": { "label": "xx-large", "value": "xx-large" }, // "xx-small": { "label": "xx-small", "value": "xx-small" }, // "xxx-large": { "label": "xxx-large", "value": "xxx-large" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, // initial: { "label": "initial", "value": "initial" }, // inherit: { "label": "inherit", "value": "inherit" }, }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; valZ = typeof valZ == 'object' ? (valZ.val == undefined ? 'px' : valZ.val) + (valZ.unit == undefined ? 'px' : valZ.unit) : valZ; var widthValX = valZ == undefined || valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g) == null ? 0 : valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", step: "0.01", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'fontSize'); } else { props.onChange(widthUnit, 'fontSize'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'fontSize'); } else { props.onChange(newVal + widthUnit, 'fontSize'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'fontSize'); } else { props.onChange(x.value, 'fontSize'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'fontSize'); } else { props.onChange(widthVal + x.value, 'fontSize'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'fontSize'); } else { props.onChange(widthVal + widthUnit, 'fontSize'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'fontSize'); } else { props.onChange(widthVal + widthUnit + ' !important', 'fontSize'); } } } })); } class PGcssFontSize extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFontSize); /***/ }), /***/ "./src/components/css-font-stretch/index.js": /*!**************************************************!*\ !*** ./src/components/css-font-stretch/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'ultra-condensed': { "label": "ultra-condensed", "value": "ultra-condensed" }, 'extra-condensed': { "label": "extra-condensed", "value": "extra-condensed" }, 'condensed': { "label": "condensed", "value": "condensed" }, 'semi-condensed': { "label": "semi-condensed", "value": "semi-condensed" }, 'normal': { "label": "normal", "value": "normal" }, 'semi-expanded': { "label": "semi-expanded", "value": "semi-expanded" }, 'expanded': { "label": "expanded", "value": "expanded" }, 'extra-expanded': { "label": "extra-expanded", "value": "extra-expanded" }, 'ultra-expanded': { "label": "ultra-expanded", "value": "ultra-expanded" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'fontStretch'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'fontStretch'); } else { props.onChange(x.value, 'fontStretch'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'fontStretch'); } else { props.onChange(align + ' !important', 'fontStretch'); } } })); } class PGcssFontStretch extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFontStretch); /***/ }), /***/ "./src/components/css-font-style/index.js": /*!************************************************!*\ !*** ./src/components/css-font-style/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { normal: { "label": "normal", "value": "normal" }, italic: { "label": "italic", "value": "italic" }, oblique: { "label": "oblique", "value": "oblique" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'fontStyle'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'fontStyle'); } else { props.onChange(x.value, 'fontStyle'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'fontStyle'); } else { props.onChange(align + ' !important', 'fontStyle'); } } })); } class PGcssFontStyle extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFontStyle); /***/ }), /***/ "./src/components/css-font-variant-caps/index.js": /*!*******************************************************!*\ !*** ./src/components/css-font-variant-caps/index.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'normal': { "label": "normal", "value": "normal" }, 'small-caps': { "label": "small-caps", "value": "small-caps" }, 'all-small-caps': { "label": "all-small-caps", "value": "all-small-caps" }, 'petite-caps': { "label": "petite-caps", "value": "petite-caps" }, 'all-petite-caps': { "label": "all-petite-caps", "value": "all-petite-caps" }, 'unicase': { "label": "unicase", "value": "unicase" }, 'titling-caps': { "label": "titling-caps", "value": "titling-caps" }, 'initial': { "label": "initial", "value": "initial" }, 'inherit': { "label": "inherit", "value": "inherit" }, 'unset': { "label": "unset", "value": "unset" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'fontVariantCaps'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'fontVariantCaps'); } else { props.onChange(x.value, 'fontVariantCaps'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'fontVariantCaps'); } else { props.onChange(align + ' !important', 'fontVariantCaps'); } } })); } class PGcssFontVariantCaps extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFontVariantCaps); /***/ }), /***/ "./src/components/css-font-weight/index.js": /*!*************************************************!*\ !*** ./src/components/css-font-weight/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'normal': { "label": "normal", "value": "normal" }, 'bold': { "label": "bold", "value": "bold" }, 'bolder': { "label": "bolder", "value": "bolder" }, 'lighter': { "label": "lighter", "value": "lighter" }, '100': { "label": "100", "value": "100" }, '200': { "label": "200", "value": "200" }, '300': { "label": "300", "value": "300" }, '400': { "label": "400", "value": "400" }, '500': { "label": "500", "value": "500" }, '600': { "label": "600", "value": "600" }, '700': { "label": "700", "value": "700" }, '800': { "label": "800", "value": "800" }, '900': { "label": "900", "value": "900" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'fontWeight'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'fontWeight'); } else { props.onChange(x.value, 'fontWeight'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'fontWeight'); } else { props.onChange(align + ' !important', 'fontWeight'); } } })); } class PGcssFontWeight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssFontWeight); /***/ }), /***/ "./src/components/css-gap/index.js": /*!*****************************************!*\ !*** ./src/components/css-gap/index.js ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'gap'); } else { props.onChange(widthUnit, 'gap'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'gap'); } else { props.onChange(newVal + widthUnit, 'gap'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'gap'); } else { props.onChange(x.value, 'gap'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'gap'); } else { props.onChange(widthVal + x.value, 'gap'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'gap'); } else { props.onChange(widthVal + widthUnit, 'gap'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'gap'); } else { props.onChange(widthVal + widthUnit + ' !important', 'gap'); } } } })); } class PGcssGap extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGap); /***/ }), /***/ "./src/components/css-grid-column-end/index.js": /*!*****************************************************!*\ !*** ./src/components/css-grid-column-end/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4 justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); // props.onChange(newVal, 'gridColumnEnd'); if (isImportant) { props.onChange(newVal + ' !important', 'gridColumnEnd'); } else { props.onChange(newVal, 'gridColumnEnd'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal, 'gridColumnEnd'); } else { props.onChange(widthVal + ' !important', 'gridColumnEnd'); } } })); } class PGcssGridColumnEnd extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGridColumnEnd); /***/ }), /***/ "./src/components/css-grid-column-start/index.js": /*!*******************************************************!*\ !*** ./src/components/css-grid-column-start/index.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); // props.onChange(newVal, 'gridColumnStart'); if (isImportant) { props.onChange(newVal + ' !important', 'gridColumnStart'); } else { props.onChange(newVal, 'gridColumnStart'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal, 'gridColumnStart'); } else { props.onChange(widthVal + ' !important', 'gridColumnStart'); } } })); } class PGcssGridColumnStart extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGridColumnStart); /***/ }), /***/ "./src/components/css-grid-row-end/index.js": /*!**************************************************!*\ !*** ./src/components/css-grid-row-end/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); // props.onChange(newVal, 'gridRowEnd'); if (isImportant) { props.onChange(newVal + ' !important', 'gridRowEnd'); } else { props.onChange(newVal, 'gridRowEnd'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal, 'gridRowEnd'); } else { props.onChange(widthVal + ' !important', 'gridRowEnd'); } } })); } class PGcssGridRowEnd extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGridRowEnd); /***/ }), /***/ "./src/components/css-grid-row-start/index.js": /*!****************************************************!*\ !*** ./src/components/css-grid-row-start/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4 justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); // props.onChange(newVal, 'gridRowStart'); if (isImportant) { props.onChange(newVal + ' !important', 'gridRowStart'); } else { props.onChange(newVal, 'gridRowStart'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal, 'gridRowStart'); } else { props.onChange(widthVal + ' !important', 'gridRowStart'); } } })); } class PGcssGridRowStart extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGridRowStart); /***/ }), /***/ "./src/components/css-grid-template-columns/index.js": /*!***********************************************************!*\ !*** ./src/components/css-grid-template-columns/index.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } console.log(props.val); //var valParts = ['1fr', '1fr', '1fr']; var valParts = props.val == undefined || props.val == null || props.val.length == 0 ? ['1fr'] : props.val.split(" "); var unitArgs = { fr: { "label": "FR", "value": "fr" }, px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; const [valArgs, setvalArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valParts); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [props.val]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-green-600 hover:bg-green-500 rounded-sm inline-block cursor-pointer text-white px-3 py-1 my-4", onClick: ev => { var valArgsX = valArgs.concat('1fr'); setvalArgs(valArgsX); console.log(valArgsX.join(' ')); props.onChange(valArgsX.join(' '), 'gridTemplateColumns'); } }, "Add"), valArgs.map((part, index) => { var valNumber = part.match(/-?\d+/g) != null ? part.match(/-?\d+/g)[0] : 1; var valUnit = part.match(/[a-zA-Z%]+/g) != null ? part.match(/[a-zA-Z%]+/g)[0] : 'fr'; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 inline-block hover:bg-red-400 mx-3 p-1 cursor-pointer", onClick: ev => { valArgs.splice(index, 1); setvalArgs(valArgs); props.onChange(valArgs.join(' '), 'gridTemplateColumns'); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: valNumber, type: "number", onChange: newVal => { var valIndex = newVal + valUnit; valArgs[index] = valIndex; setvalArgs(valArgs); props.onChange(valArgs.join(' '), 'gridTemplateColumns'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valUnit != undefined ? unitArgs[valUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var j = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { console.log(index); //props.onChange(valNumber + x.value, 'border'); var valIndex = valNumber + x.value; valArgs[index] = valIndex; setvalArgs(valArgs); props.onChange(valArgs.join(' '), 'gridTemplateColumns'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))); })); } class PGcssGridTemplateColumns extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGridTemplateColumns); /***/ }), /***/ "./src/components/css-grid-template-rows/index.js": /*!********************************************************!*\ !*** ./src/components/css-grid-template-rows/index.js ***! \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } //var valParts = ['1fr', '1fr', '1fr']; var valParts = props.val == undefined || props.val == null || props.val.length == 0 ? ['1fr'] : props.val.split(" "); var unitArgs = { fr: { "label": "FR", "value": "fr" }, px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, // "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } // none: { "label": "none", "value": "none" }, // inherit: { "label": "inherit", "value": "inherit" }, // initial: { "label": "initial", "value": "initial" }, // revert: { "label": "revert", "value": "revert" }, // unset: { "label": "unset", "value": "unset" }, }; const [valArgs, setvalArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valParts); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [props.val]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-green-600 hover:bg-green-500 rounded-sm inline-block cursor-pointer text-white px-3 py-1 my-4", onClick: ev => { var valArgsX = valArgs.concat('1fr'); setvalArgs(valArgsX); console.log(valArgsX.join(' ')); props.onChange(valArgsX.join(' '), 'gridTemplateRows'); } }, "Add"), valArgs.map((part, index) => { var valNumber = part.match(/-?\d+/g) != null ? part.match(/-?\d+/g)[0] : 1; var valUnit = part.match(/[a-zA-Z%]+/g) != null ? part.match(/[a-zA-Z%]+/g)[0] : 'fr'; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 inline-block hover:bg-red-400 mx-3 p-1 cursor-pointer", onClick: ev => { valArgs.splice(index, 1); setvalArgs(valArgs); props.onChange(valArgs.join(' '), 'gridTemplateRows'); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: valNumber, type: "number", onChange: newVal => { var valIndex = newVal + valUnit; valArgs[index] = valIndex; setvalArgs(valArgs); props.onChange(valArgs.join(' '), 'gridTemplateRows'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valUnit != undefined ? unitArgs[valUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var j = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { console.log(index); //props.onChange(valNumber + x.value, 'border'); var valIndex = valNumber + x.value; valArgs[index] = valIndex; setvalArgs(valArgs); props.onChange(valArgs.join(' '), 'gridTemplateRows'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))); })); } class PGcssGridTemplateRows extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssGridTemplateRows); /***/ }), /***/ "./src/components/css-height/index.js": /*!********************************************!*\ !*** ./src/components/css-height/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; if (typeof props.val == 'object') { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.split(" ")); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); var widthValX = valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]; var widthUnitX = valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? 'px' : valArgs[0].match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); // if (widthUnit == 'auto') { // props.onChange(widthUnit, 'height'); // } else { // props.onChange(newVal + widthUnit, 'height'); // } if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'height'); } else { props.onChange(widthUnit, 'height'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'height'); } else { props.onChange(newVal + widthUnit, 'height'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'height'); } else { props.onChange(x.value, 'height'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'height'); } else { props.onChange(widthVal + x.value, 'height'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'height'); } else { props.onChange(widthVal + widthUnit, 'height'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'height'); } else { props.onChange(widthVal + widthUnit + ' !important', 'height'); } } } })); } class PGcssHeight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssHeight); /***/ }), /***/ "./src/components/css-justify-content/index.js": /*!*****************************************************!*\ !*** ./src/components/css-justify-content/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { start: { "label": "start", "value": "start" }, end: { "label": "end", "value": "end" }, left: { "label": "left", "value": "left" }, center: { "label": "center", "value": "center" }, right: { "label": "right", "value": "right" }, stretch: { "label": "stretch", "value": "stretch" }, 'flex-start': { "label": "flex start ", "value": "flex-start" }, 'flex-end': { "label": "flex end ", "value": "flex-end" }, 'space-between': { "label": "space between", "value": "space-between" }, 'space-around': { "label": "space around", "value": "space-around" }, 'space-evenly': { "label": "space evenly", "value": "space-evenly" }, normal: { "label": "normal", "value": "normal" }, start: { "label": "start", "value": "start" }, baseline: { "label": "baseline", "value": "baseline" }, revert: { "label": "revert", "value": "revert" }, unset: { "label": "unset", "value": "unset" }, inherit: { "label": "inherit", "value": "inherit" }, initial: { "label": "initial", "value": "initial" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Align Content", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // props.onChange(x.value, 'justifyContent'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'justifyContent'); } else { props.onChange(x.value, 'justifyContent'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'justifyContent'); } else { props.onChange(align + ' !important', 'justifyContent'); } } })); } class PGcssJustifyContent extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssJustifyContent); /***/ }), /***/ "./src/components/css-keyframes/index.js": /*!***********************************************!*\ !*** ./src/components/css-keyframes/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [keyframesX, setkeyframesX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.keyframes); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { console.log('useEffect'); console.log(keyframesX); props.onChange(keyframesX); }, [keyframesX]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { console.log('useEffect'); console.log(props.keyframes); }, [props.keyframes]); function FrameTitle({ entryIndex, frameIndex }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 text-white p-1 mr-1 rounded-sm ", onClick: ev => { console.log(frameIndex); var keyframes = { ...keyframesX }; delete keyframes[entryIndex].frames[frameIndex]; setkeyframesX(keyframes); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, frameIndex), "%"); } function EntryTitle({ entryIndex, name }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 text-white p-1 mr-1 rounded-sm ", onClick: ev => { var keyframes = { ...keyframesX }; delete keyframes[entryIndex]; setkeyframesX(keyframes); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, name)); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 inline-block cursor-pointer my-3 text-white px-3 py-2", onClick: ev => { var length = keyframesX == null ? 0 : Object.entries(keyframesX).length; const d = new Date(); let time = d.getTime(); var keyframes = { ...keyframesX }; keyframes[time] = { name: 'pgAnimate' + (length + 1), frames: { '0': { 'background-color': 'red' }, '100': { 'background-color': 'yellow', left: '0px', top: '0px' } } }; setkeyframesX(keyframes); } }, "Add"), keyframesX != null && Object.entries(keyframesX).map(entry => { var entryIndex = entry[0]; var args = entry[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(EntryTitle, { name: args.name, entryIndex: entryIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Animation Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { type: "text", className: "mr-2", value: args.name, onChange: newVal => { var keyframes = { ...keyframesX }; keyframes[entryIndex]['name'] = newVal; setkeyframesX(keyframes); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 inline-block cursor-pointer my-2 text-white px-3 py-2", onClick: ev => { var keyframes = { ...keyframesX }; var frames = keyframes[entryIndex].frames; console.log(frames); // var num = Math.random() * 100; // var numX = Math.floor(num); // console.log(numX); //frames[40] = { 'background-color': 'red' } //setkeyframesX(keyframes); } }, "Add"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-5" }, Object.entries(args.frames).map(x => { var frameIndex = x[0]; var frameAttr = x[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(FrameTitle, { entryIndex: entryIndex, frameIndex: frameIndex }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Frame Step"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { type: "number", className: "mr-2", value: frameIndex, onChange: newVal => { var keyframes = { ...keyframesX }; var framesArgs = keyframes[entryIndex].frames[frameIndex]; keyframes[entryIndex].frames[newVal] = framesArgs; delete keyframes[entryIndex].frames[frameIndex]; setkeyframesX(keyframes); } }), "%"), Object.entries(frameAttr).map(attr => { var attrIndex = attr[0]; var attrVal = attr[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, attrIndex); })); }))); })); } class PGcssKeyframes extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { keyframes, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { keyframes: keyframes, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssKeyframes); /***/ }), /***/ "./src/components/css-left/index.js": /*!******************************************!*\ !*** ./src/components/css-left/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; if (typeof props.val == 'object') { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; } var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'left'); } else { props.onChange(widthUnit, 'left'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'left'); } else { props.onChange(newVal + widthUnit, 'left'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'left'); } else { props.onChange(x.value, 'left'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'left'); } else { props.onChange(widthVal + x.value, 'left'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'left'); } else { props.onChange(widthVal + widthUnit, 'left'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'left'); } else { props.onChange(widthVal + widthUnit + ' !important', 'left'); } } } })); } class PGcssLeft extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssLeft); /***/ }), /***/ "./src/components/css-letter-spacing/index.js": /*!****************************************************!*\ !*** ./src/components/css-letter-spacing/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g) == null ? 0 : valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'letterSpacing'); } else { props.onChange(widthUnit, 'letterSpacing'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'letterSpacing'); } else { props.onChange(newVal + widthUnit, 'letterSpacing'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Letter Spacing", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'letterSpacing'); } else { props.onChange(x.value, 'letterSpacing'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'letterSpacing'); } else { props.onChange(widthVal + x.value, 'letterSpacing'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'letterSpacing'); } else { props.onChange(widthVal + widthUnit, 'letterSpacing'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'letterSpacing'); } else { props.onChange(widthVal + widthUnit + ' !important', 'letterSpacing'); } } } })); } class PGcssLetterSpacing extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssLetterSpacing); /***/ }), /***/ "./src/components/css-library/index.js": /*!*********************************************!*\ !*** ./src/components/css-library/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/settings.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/styles.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var html_to_image__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! html-to-image */ "./node_modules/html-to-image/es/index.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [queryCss, setQueryCss] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ keyword: "", page: 1, category: "", isReset: true }); var [cssLibrary, setCssLibrary] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ items: [] }); var [cssLibraryCats, setCssLibraryCats] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); var [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [sudoPicker, setsudoPicker] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("isProFeature", true); var [cssSubmission, setCssSubmission] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ enable: false, title: "", category: "", tags: "", thumb: "", email: "", status: "", // idle => ready to submit, busy => submission process, falied => submission falied, success=> Successfully submitted! successMessage: "Successfully submitted!", failedMessage: "Submission was failed!", idleMessage: "Submit to CSS Library", message: "", timeout: 2 }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { fetchCss(); }, [queryCss]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default()({ path: "/post-grid/v2/get_site_details", method: "POST", data: {} }).then(res => { // //setEmailSubscribe({ ...userDetails, email: res.email, status: res.subscribe_status }); setCssSubmission({ ...cssSubmission, email: res.email }); }); }, []); function fetchCss() { setIsLoading(true); var postData = { keyword: queryCss.keyword, page: queryCss.page, category: queryCss.category }; postData = JSON.stringify(postData); fetch("https://getpostgrid.com/wp-json/post-grid/v2/get_post_css", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { var isReset = queryCss.isReset; if (isReset) { var items = res.posts; } else { res.posts.map(item => { cssLibrary.items.push(item); }); var items = cssLibrary.items; } //console.log(items); setCssLibrary({ items: items }); setCssLibraryCats(res.terms); setIsLoading(false); }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } const htmlToImageCapt = () => { const eleementToCapture = document.querySelector("." + props.blockId); html_to_image__WEBPACK_IMPORTED_MODULE_5__.toPng(eleementToCapture).then(function (dataUrl) { setCssSubmission({ ...cssSubmission, thumb: dataUrl }); //download(dataUrl, 'my-node.png'); }); }; const [isHovered, setIsHovered] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [hoverValue, setHoverValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_3__["default"], { activeTab: "cssItems", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "cssItems", title: "Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"], className: "tab-cssItems" }, { name: "submit", title: "Submission", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"], className: "tab-submit" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_4__["default"], { name: "cssItems" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: queryCss.keyword, type: "text", placeholder: "Search Styles...", onChange: newVal => { clearTimeout(debounce); debounce = setTimeout(() => { setQueryCss({ keyword: newVal, page: 1, category: queryCss.category, isReset: true }); }, 1000); //fetchLayouts(); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { className: "w-full", style: { margin: 0 }, label: "", value: queryCss.category, options: cssLibraryCats, onChange: newVal => { setQueryCss({ keyword: queryCss.keyword, page: 1, category: newVal, isReset: true }); //fetchLayouts(); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "items" }, cssLibrary.items.map((x, index) => { var objCss = JSON.parse(x.post_content); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `item-${index} border border-solid relative border-slate-400 rounded-md shadow-md py-2 my-3 `, onMouseEnter: () => { setIsHovered(true); setHoverValue(index); }, onMouseLeave: () => { setIsHovered(false); setHoverValue(""); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative pb-2 bg-black/10" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: x.thumb_url, alt: x.ID, onClick: ev => { //console.log(objCss); // var objCss = { // styles: { "backgroundColor": { "Desktop": "#9DD6DF" }, "textAlign": { "Desktop": "center" }, "border": { "Desktop": "5px dashed #000000" } }, hover: { "border": { "Desktop": "2px dashed #A084CF" } } // } props.onChange(objCss); } }), isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute top-0 right-2" }, !x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-lime-600 text-white text-xs px-2 rounded-sm py-1" }, "Free"), x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-orange-500 text-white text-xs px-2 rounded-sm py-1" }, "Pro"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 mb-0 w-full bg-slate-400 bg-opacity-30 flex items-center justify-center flex-wrap gap-2 opacity-100 visible h-[max-content]" }, x.is_pro && isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.post_title, className: "px-3 py-2 bg-amber-500 rounded-sm text-white outline-none focus:ring-4 shadow-lg transform active:scale-75 transition-transform flex items-center gap-2 justify-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Subscribe to Import"))), (!x.is_pro || x.is_pro && !isProFeature) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex pg-span-hidden items-center justify-between w-full flex-wrap gap-2 px-4 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: " no-underline hover:text-gray-800 text-gray-800 text-sm font-semibold px-2 rounded-sm py-1", target: "_blank", href: x.url, title: x.post_title }, x.post_title.length > 17 ? `${x.post_title.substring(0, 17)}...` : x.post_title), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "hover:bg-slate-300 p-2 cursor-pointer relative inline-flex", onClick: ev => { setsudoPicker(sudoPicker => { return sudoPicker == null ? x.ID : null; }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "186px", height: "186px", viewBox: "0 -6 16 16", version: "1.1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("title", null, "Apply Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "gradient1", x1: "7.91394", y1: "99.4278", x2: "154.067", y2: "99.4278", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "gradient2", x1: "126.935", y1: "155.123", x2: "178.095", y2: "155.123", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", { id: "Free-Icons", stroke: "none", "stroke-width": "1", fill: "none", "fill-rule": "evenodd" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", { transform: "translate(-1119.000000, -756.000000)", fill: "#000000", "fill-rule": "nonzero", id: "Group" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("g", { transform: "translate(1115.000000, 746.000000)", id: "Shape" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M6,10 C4.8954305,10 4,10.8954305 4,12 C4,13.1045695 4.8954305,14 6,14 C7.1045695,14 8,13.1045695 8,12 C8,10.8954305 7.1045695,10 6,10 Z", fill: "url(#gradient1)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M12,10 C10.8954305,10 10,10.8954305 10,12 C10,13.1045695 10.8954305,14 12,14 C13.1045695,14 14,13.1045695 14,12 C14,10.8954305 13.1045695,10 12,10 Z", fill: "url(#gradient1)" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M18,10 C16.8954305,10 16,10.8954305 16,12 C16,13.1045695 16.8954305,14 18,14 C19.1045695,14 20,13.1045695 20,12 C20,10.8954305 19.1045695,10 18,10 Z", fill: "url(#gradient2)" }))))) })), sudoPicker == x.ID && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom left" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-40 p-2" // className="w-32 p-2 border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 block last-of-type:border-b-0 min-h-[40px] " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2 border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:pg-text-color hover:bg-slate-200 block last-of-type:border-b-0 last-of-type:hover:border-b min-h-[40px] " // className="p-2 cursor-pointer hover:bg-slate-300" , onClick: ev => { props.onChange(objCss); } }, "Apply All"), Object.entries(objCss).map(item => { var sudoIndex = item[0]; var sudoArgs = item[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2 border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 block last-of-type:border-b-0 min-h-[40px] " // className="p-2 cursor-pointer hover:bg-slate-300" , onClick: ev => { var css = {}; css[sudoIndex] = objCss[sudoIndex]; props.onChange(css); } }, sudoIndex); })))))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-full rounded-sm py-2 bg-blue-500 text-[14px] font-bold text-white cursor-pointer my-3 text-center", onClick: _ev => { var page = queryCss.page + 1; setQueryCss({ keyword: queryCss.keyword, page: page, category: queryCss.category, isReset: false }); } }, isLoading == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)), "Load More")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_4__["default"], { name: "submit" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Item Title"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "w-full", value: cssSubmission.title, type: "text", placeholder: "Ex: Blue Button", onChange: newVal => { setCssSubmission({ ...cssSubmission, title: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Choose category"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { className: "w-full", style: { margin: 0 }, label: "", value: cssSubmission.category, options: cssLibraryCats, onChange: newVal => { setCssSubmission({ ...cssSubmission, category: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Add Some Tags"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "w-full", value: cssSubmission.tags, type: "text", placeholder: "button, blue button", onChange: newVal => { setCssSubmission({ ...cssSubmission, tags: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { onClick: htmlToImageCapt, className: "bg-green-700 text-white p-3 px-5 cursor-pointer" }, "Take Screenshot"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Preview Thumbnail"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: cssSubmission.thumb })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Your Email"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "w-full", value: cssSubmission.email, type: "text", placeholder: "", onChange: newVal => { setCssSubmission({ ...cssSubmission, email: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 my-5 px-10 py-3 text-white cursor-pointer text-center rounded-sm mb-5", onClick: ev => { setIsLoading(true); setCssSubmission({ ...cssSubmission, status: "busy" }); var objX = Object.assign({}, props.obj); if (objX.options != undefined) { delete objX.options; } var postData = { title: cssSubmission.title, content: objX, thumb: cssSubmission.thumb, category: cssSubmission.category, tags: cssSubmission.tags }; postData = JSON.stringify(postData); fetch("https://getpostgrid.com/wp-json/post-grid/v2/submit_css", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { if (res.status == "success") { setCssSubmission({ ...cssSubmission, status: "success", message: res.message }); setTimeout(() => { setCssSubmission({ ...cssSubmission, status: "idle", message: res.message }); }, 3000); } else { setCssSubmission({ ...cssSubmission, status: "falied", message: res.message }); setTimeout(() => { setCssSubmission({ ...cssSubmission, status: "idle", message: res.message }); }, 3000); } }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } }, "Submit to CSS Library", cssSubmission.status == "busy" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null))), cssSubmission.status == "success" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " font-bold text-green-700" }, cssSubmission.successMessage), cssSubmission.status == "falied" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " font-bold text-red-500" }, cssSubmission.failedMessage), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, cssSubmission.message))))); } class PGCssLibrary extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { blockId, obj, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { blockId: blockId, obj: obj, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGCssLibrary); /***/ }), /***/ "./src/components/css-line-height/index.js": /*!*************************************************!*\ !*** ./src/components/css-line-height/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, normal: { "label": "Normal", "value": "normal" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; if (typeof props.val == 'object') { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.split(" ")); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); var widthValX = valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]; var widthUnitX = valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? 'px' : valArgs[0].match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (widthUnit != 'max-content' || widthUnit != 'min-content' || widthUnit != 'inherit' || widthUnit != 'initial' || widthUnit != 'revert' || widthUnit != 'revert-layer' || widthUnit != 'unset') && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, widthUnit != 'normal' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'normal' || widthUnit == 'max-content' || widthUnit == 'min-content' || widthUnit == 'inherit' || widthUnit == 'initial' || widthUnit == 'revert' || widthUnit == 'revert-layer' || widthUnit == 'unset' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'normal') { // props.onChange(widthUnit, 'lineHeight'); if (isImportant) { props.onChange(widthUnit + ' !important', 'lineHeight'); } else { props.onChange(widthUnit, 'lineHeight'); } } else { //props.onChange(newVal + widthUnit, 'lineHeight'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'lineHeight'); } else { props.onChange(newVal + widthUnit, 'lineHeight'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, unitArgs[widthUnit] == undefined ? 'Select...' : unitArgs[widthUnit].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'normal') { if (isImportant) { props.onChange(x.value + ' !important', 'lineHeight'); } else { props.onChange(x.value, 'lineHeight'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'lineHeight'); } else { props.onChange(widthVal + x.value, 'lineHeight'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'normal') { props.onChange(widthUnit, 'lineHeight'); } else { props.onChange(widthVal + widthUnit, 'lineHeight'); } } else { if (widthUnit == 'normal') { props.onChange(widthUnit + ' !important', 'lineHeight'); } else { props.onChange(widthVal + widthUnit + ' !important', 'lineHeight'); } } } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Global Value "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: widthUnit, options: [{ label: 'Choose', value: 'px' }, { label: 'normal', value: 'normal' }, { label: 'Inherit', value: 'inherit' }, { label: 'Initial', value: 'initial' }, { label: 'Revert', value: 'revert' }, { label: 'Revert-layer', value: 'revert-layer' }, { label: 'Unset', value: 'unset' }], onChange: newVal => { setwidthUnit(newVal); if (newVal == 'normal' || newVal == 'max-content' || newVal == 'min-content' || newVal == 'inherit' || newVal == 'initial' || newVal == 'revert' || newVal == 'revert-layer' || newVal == 'unset') { if (isImportant) { props.onChange(newVal + ' !important', 'lineHeight'); } else { props.onChange(newVal, 'lineHeight'); } } else { if (isImportant) { props.onChange(widthVal + newVal + ' !important', 'lineHeight'); } else { props.onChange(widthVal + newVal, 'lineHeight'); } } } })))); } class PGcssLineHeight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssLineHeight); /***/ }), /***/ "./src/components/css-list-style/index.js": /*!************************************************!*\ !*** ./src/components/css-list-style/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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 _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(" ") : ['square', 'inside', 'url("sqpurple.gif")']; var type = valParts[0] != undefined ? valParts[0] : 'square'; var position = valParts[1] != undefined ? valParts[1] : 'inside'; var image = valParts[2] != undefined ? valParts[2] : 'url("sqpurple.gif")'; var imageVal = image.replace('url("', ''); imageVal = imageVal.replace('")', ''); var typeArgs = [{ label: 'Select..', value: '' }, { label: 'disc', value: 'disc' }, { label: 'armenian', value: 'armenian' }, { label: 'circle', value: 'circle' }, { label: 'cjk-ideographic', value: 'cjk-ideographic' }, { label: 'decimal', value: 'decimal' }, { label: 'decimal-leading-zero', value: 'decimal-leading-zero' }, { label: 'georgian', value: 'georgian' }, { label: 'hebrew', value: 'hebrew' }, { label: 'hiragana', value: 'hiragana' }, { label: 'hiragana-iroha', value: 'hiragana-iroha' }, { label: 'katakana', value: 'katakana' }, { label: 'katakana-iroha', value: 'katakana-iroha' }, { label: 'lower-alpha', value: 'lower-alpha' }, { label: 'lower-greek', value: 'lower-greek' }, { label: 'lower-latin', value: 'lower-latin' }, { label: 'lower-roman', value: 'lower-roman' }, { label: 'square', value: 'square' }, { label: 'upper-alpha', value: 'upper-alpha' }, { label: 'upper-greek', value: 'upper-greek' }, { label: 'upper-latin', value: 'upper-latin' }, { label: 'upper-roman', value: 'upper-roman' }, { label: 'none', value: 'none' }]; const ALLOWED_MEDIA_TYPES = ['image']; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Type"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_3__["default"], { position: "bottom right", variant: "secondary", options: typeArgs, buttonTitle: type, onChange: (option, index) => { props.onChange(option.value + ' ' + position + ' ' + image, 'listStyle'); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Position"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_3__["default"], { position: "bottom right", variant: "secondary", options: [{ label: 'inside', value: 'inside' }, { label: 'outside', value: 'outside' }], buttonTitle: position, onChange: (option, index) => { props.onChange(type + ' ' + option.value + ' ' + image, 'listStyle'); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("img", { src: imageVal, alt: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__.MediaUpload, { className: "bg-blue-500", onSelect: media => { // media.id props.onChange(type + ' ' + position + ' url("' + media.url + '")', 'listStyle'); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { className: "my-3 bg-blue-500 text-white border border-solid border-gray-300 text-center w-full", onClick: open }, "Open Media Library") }))); } class PGcssListStyle extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssListStyle); /***/ }), /***/ "./src/components/css-margin-bottom/index.js": /*!***************************************************!*\ !*** ./src/components/css-margin-bottom/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'marginBottom'); } else { props.onChange(widthUnit, 'marginBottom'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'marginBottom'); } else { props.onChange(newVal + widthUnit, 'marginBottom'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'marginBottom'); } else { props.onChange(x.value, 'marginBottom'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'marginBottom'); } else { props.onChange(widthVal + x.value, 'marginBottom'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'marginBottom'); } else { props.onChange(widthVal + widthUnit, 'marginBottom'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'marginBottom'); } else { props.onChange(widthVal + widthUnit + ' !important', 'marginBottom'); } } } })); } class PGcssMarginBottom extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMarginBottom); /***/ }), /***/ "./src/components/css-margin-left/index.js": /*!*************************************************!*\ !*** ./src/components/css-margin-left/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'marginLeft'); } else { props.onChange(widthUnit, 'marginLeft'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'marginLeft'); } else { props.onChange(newVal + widthUnit, 'marginLeft'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'marginLeft'); } else { props.onChange(x.value, 'marginLeft'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'marginLeft'); } else { props.onChange(widthVal + x.value, 'marginLeft'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'marginLeft'); } else { props.onChange(widthVal + widthUnit, 'marginLeft'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'marginLeft'); } else { props.onChange(widthVal + widthUnit + ' !important', 'marginLeft'); } } } })); } class PGcssMarginLeft extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMarginLeft); /***/ }), /***/ "./src/components/css-margin-right/index.js": /*!**************************************************!*\ !*** ./src/components/css-margin-right/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'marginRight'); } else { props.onChange(widthUnit, 'marginRight'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'marginRight'); } else { props.onChange(newVal + widthUnit, 'marginRight'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'marginRight'); } else { props.onChange(x.value, 'marginRight'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'marginRight'); } else { props.onChange(widthVal + x.value, 'marginRight'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'marginRight'); } else { props.onChange(widthVal + widthUnit, 'marginRight'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'marginRight'); } else { props.onChange(widthVal + widthUnit + ' !important', 'marginRight'); } } } })); } class PGcssMarginRight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMarginRight); /***/ }), /***/ "./src/components/css-margin-top/index.js": /*!************************************************!*\ !*** ./src/components/css-margin-top/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'marginTop'); } else { props.onChange(widthUnit, 'marginTop'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'marginTop'); } else { props.onChange(newVal + widthUnit, 'marginTop'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'marginTop'); } else { props.onChange(x.value, 'marginTop'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'marginTop'); } else { props.onChange(widthVal + x.value, 'marginTop'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'marginTop'); } else { props.onChange(widthVal + widthUnit, 'marginTop'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'marginTop'); } else { props.onChange(widthVal + widthUnit + ' !important', 'marginTop'); } } } })); } class PGcssMarginTop extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMarginTop); /***/ }), /***/ "./src/components/css-margin/index.js": /*!********************************************!*\ !*** ./src/components/css-margin/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var important = ''; if (typeof props.val == 'object') { var topX = props.val.top; var rightX = props.val.right; var bottomX = props.val.bottom; var leftX = props.val.left; var important = ''; var valParts = [topX, rightX, bottomX, leftX, '']; } else { var valParts = props.val != undefined ? props.val.split(" ") : ['5px', '5px', '5px', '5px', '']; var topX = valParts[0]; var rightX = valParts[1]; var bottomX = valParts[2]; var leftX = valParts[3]; var important = valParts[4]; } const [valX, setvalX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ top: topX, right: rightX, bottom: bottomX, left: leftX }); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(valParts.includes("!important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { label: "", values: valX, onChange: nextValues => { // setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }) // props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'margin'); setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }); if (isImportant) { props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left + ' !important', 'margin'); } else { props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'margin'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(valX.top + ' ' + valX.right + ' ' + valX.bottom + ' ' + valX.left, 'margin'); } else { props.onChange(valX.top + ' ' + valX.right + ' ' + valX.bottom + ' ' + valX.left + ' !important', 'margin'); } } })); } class PGcssMargin extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMargin); /***/ }), /***/ "./src/components/css-max-height/index.js": /*!************************************************!*\ !*** ./src/components/css-max-height/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'maxHeight'); } else { props.onChange(widthUnit, 'maxHeight'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'maxHeight'); } else { props.onChange(newVal + widthUnit, 'maxHeight'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'maxHeight'); } else { props.onChange(x.value, 'maxHeight'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'maxHeight'); } else { props.onChange(widthVal + x.value, 'maxHeight'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'maxHeight'); } else { props.onChange(widthVal + widthUnit, 'maxHeight'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'maxHeight'); } else { props.onChange(widthVal + widthUnit + ' !important', 'maxHeight'); } } } })); } class PGcssMaxHeight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMaxHeight); /***/ }), /***/ "./src/components/css-max-width/index.js": /*!***********************************************!*\ !*** ./src/components/css-max-width/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { label: "PX", value: "px" }, em: { label: "EM", value: "em" }, rem: { label: "REM", value: "rem" }, auto: { label: "AUTO", value: "auto" }, "%": { label: "%", value: "%" }, cm: { label: "CM", value: "cm" }, mm: { label: "MM", value: "mm" }, in: { label: "IN", value: "in" }, pt: { label: "PT", value: "pt" }, pc: { label: "PC", value: "pc" }, ex: { label: "EX", value: "ex" }, ch: { label: "CH", value: "ch" }, vw: { label: "VW", value: "vw" }, vh: { label: "VH", value: "vh" }, vmin: { label: "VMIN", value: "vmin" }, vmax: { label: "VMAX", value: "vmax" } }; if (typeof props.val == "object") { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? "0px" : props.val; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.split(" ")); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); var widthValX = valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]; var widthUnitX = valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? "px" : valArgs[0].match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, widthUnit != "auto" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == "auto" ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == "auto") { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + " !important", "maxWidth"); } else { props.onChange(widthUnit, "maxWidth"); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + " !important", "maxWidth"); } else { props.onChange(newVal + widthUnit, "maxWidth"); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : "Select...")), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { setwidthUnit(x.value); if (x.value == "auto") { if (isImportant) { props.onChange(x.value + " !important", "maxWidth"); } else { props.onChange(x.value, "maxWidth"); } } else { if (isImportant) { props.onChange(widthVal + x.value + " !important", "maxWidth"); } else { props.onChange(widthVal + x.value, "maxWidth"); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important Enabled" : "Important?", checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == "auto") { props.onChange(widthUnit, "maxWidth"); } else { props.onChange(widthVal + widthUnit, "maxWidth"); } } else { if (widthUnit == "auto") { props.onChange(widthUnit + " !important", "maxWidth"); } else { props.onChange(widthVal + widthUnit + " !important", "maxWidth"); } } } })); } class PGcssMaxWidth extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMaxWidth); /***/ }), /***/ "./src/components/css-min-height/index.js": /*!************************************************!*\ !*** ./src/components/css-min-height/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'minHeight'); } else { props.onChange(widthUnit, 'minHeight'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'minHeight'); } else { props.onChange(newVal + widthUnit, 'minHeight'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'minHeight'); } else { props.onChange(x.value, 'minHeight'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'minHeight'); } else { props.onChange(widthVal + x.value, 'minHeight'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'minHeight'); } else { props.onChange(widthVal + widthUnit, 'minHeight'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'minHeight'); } else { props.onChange(widthVal + widthUnit + ' !important', 'minHeight'); } } } })); } class PGcssMinHeight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMinHeight); /***/ }), /***/ "./src/components/css-min-width/index.js": /*!***********************************************!*\ !*** ./src/components/css-min-width/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; if (typeof props.val == 'object') { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.split(" ")); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); var widthValX = valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]; var widthUnitX = valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? 'px' : valArgs[0].match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'minWidth'); } else { props.onChange(widthUnit, 'minWidth'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'minWidth'); } else { props.onChange(newVal + widthUnit, 'minWidth'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'minWidth'); } else { props.onChange(x.value, 'minWidth'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'minWidth'); } else { props.onChange(widthVal + x.value, 'minWidth'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'minWidth'); } else { props.onChange(widthVal + widthUnit, 'minWidth'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'minWidth'); } else { props.onChange(widthVal + widthUnit + ' !important', 'minWidth'); } } } })); } class PGcssMinWidth extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssMinWidth); /***/ }), /***/ "./src/components/css-object-fit/index.js": /*!************************************************!*\ !*** ./src/components/css-object-fit/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { fill: { "label": "fill", "value": "fill" }, contain: { "label": "contain", "value": "contain" }, cover: { "label": "cover", "value": "cover" }, 'scale-down': { "label": "scale-down", "value": "scale-down" }, none: { "label": "none", "value": "none" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'objectFit'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'objectFit'); } else { props.onChange(x.value, 'objectFit'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'objectFit'); } else { props.onChange(align + ' !important', 'objectFit'); } } })); } class PGcssObjectFit extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssObjectFit); /***/ }), /***/ "./src/components/css-opacity/index.js": /*!*********************************************!*\ !*** ./src/components/css-opacity/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? "0" : props.val; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", min: "0", max: "1", step: "0.01", onChange: newVal => { setwidthVal(newVal); if (isImportant) { props.onChange(newVal + " !important", "opacity"); } else { props.onChange(newVal, "opacity"); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important (Enabled)" : "Important?", checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal, "opacity"); } else { props.onChange(widthVal + " !important", "opacity"); } } })); } class PGcssOpacity extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOpacity); /***/ }), /***/ "./src/components/css-order/index.js": /*!*******************************************!*\ !*** ./src/components/css-order/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0' : props.val; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); if (isImportant) { props.onChange(newVal + ' !important', 'order'); } else { props.onChange(newVal, 'order'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthVal, 'order'); } else { props.onChange(widthVal + ' !important', 'order'); } } })); } class PGcssOrder extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOrder); /***/ }), /***/ "./src/components/css-outline-offset/index.js": /*!****************************************************!*\ !*** ./src/components/css-outline-offset/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); props.onChange(newVal + widthUnit, 'outlineOffset'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); props.onChange(widthVal + x.value, 'outlineOffset'); } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }))); } class PGcssOutlineOffset extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOutlineOffset); /***/ }), /***/ "./src/components/css-outline/index.js": /*!*********************************************!*\ !*** ./src/components/css-outline/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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 _colors_presets__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* 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__); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '10px solid #50547d4f' : props.val; var blur = valZ != undefined ? parseInt(valZ.split(" ")[0].match(/-?\d+/g)[0]) : 2; var style = valZ != undefined ? valZ.split(" ")[1] : 'solid'; var color = valZ != undefined ? valZ.split(" ")[2] : '#dddddd'; var styleArgs = { none: { "label": "None", "value": "none" }, hidden: { "label": "Hidden", "value": "hidden" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Width")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.RangeControl, { min: "0", max: "100", step: "1", value: blur, onChange: newVal => { props.onChange(+newVal + 'px ' + style + ' ' + color, 'outline'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_4__["default"], { position: "bottom right", variant: "secondary", options: styleArgs, buttonTitle: styleArgs[style] == undefined ? 'Choose' : styleArgs[style].label, onChange: (option, index) => { props.onChange(blur + 'px ' + option.value + ' ' + color, 'outline'); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { for: "" }, "Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_3__["default"], { value: color, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_1__["default"], enableAlpha: true, onChange: newVal => { props.onChange(blur + 'px ' + style + ' ' + newVal, 'outline'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(blur + 'px' + ' ' + style + ' ' + color, 'outline'); } else { props.onChange(blur + 'px' + ' ' + style + ' ' + color + ' !important', 'outline'); } } })); } class PGcssoutline extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssoutline); /***/ }), /***/ "./src/components/css-overflow-x/index.js": /*!************************************************!*\ !*** ./src/components/css-overflow-x/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { scroll: { "label": "Scroll", "value": "scroll" }, hidden: { "label": "Hidden", "value": "hidden" }, auto: { "label": "Auto", "value": "auto" }, visible: { "label": "Visible", "value": "visible" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'overflowX'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'overflowX'); } else { props.onChange(x.value, 'overflowX'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'overflowX'); } else { props.onChange(align + ' !important', 'overflowX'); } } })); } class PGcssOverflowX extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOverflowX); /***/ }), /***/ "./src/components/css-overflow-y/index.js": /*!************************************************!*\ !*** ./src/components/css-overflow-y/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { scroll: { "label": "Scroll", "value": "scroll" }, hidden: { "label": "Hidden", "value": "hidden" }, auto: { "label": "Auto", "value": "auto" }, visible: { "label": "Visible", "value": "visible" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'overflowY'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'overflowY'); } else { props.onChange(x.value, 'overflowY'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'overflowY'); } else { props.onChange(align + ' !important', 'overflowY'); } } })); } class PGcssOverflowY extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOverflowY); /***/ }), /***/ "./src/components/css-overflow/index.js": /*!**********************************************!*\ !*** ./src/components/css-overflow/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { scroll: { "label": "Scroll", "value": "scroll" }, hidden: { "label": "Hidden", "value": "hidden" }, auto: { "label": "Auto", "value": "auto" }, clip: { "label": "Clip", "value": "clip" }, visible: { "label": "Visible", "value": "visible" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'overflow'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'overflow'); } else { props.onChange(x.value, 'overflow'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'overflow'); } else { props.onChange(align + ' !important', 'overflow'); } } })); } class PGcssOverflow extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOverflow); /***/ }), /***/ "./src/components/css-padding-bottom/index.js": /*!****************************************************!*\ !*** ./src/components/css-padding-bottom/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'paddingBottom'); } else { props.onChange(widthUnit, 'paddingBottom'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'paddingBottom'); } else { props.onChange(newVal + widthUnit, 'paddingBottom'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'paddingBottom'); } else { props.onChange(x.value, 'paddingBottom'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'paddingBottom'); } else { props.onChange(widthVal + x.value, 'paddingBottom'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'paddingBottom'); } else { props.onChange(widthVal + widthUnit, 'paddingBottom'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'paddingBottom'); } else { props.onChange(widthVal + widthUnit + ' !important', 'paddingBottom'); } } } })); } class PGcssPaddingBottom extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPaddingBottom); /***/ }), /***/ "./src/components/css-padding-left/index.js": /*!**************************************************!*\ !*** ./src/components/css-padding-left/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'paddingLeft'); } else { props.onChange(widthUnit, 'paddingLeft'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'paddingLeft'); } else { props.onChange(newVal + widthUnit, 'paddingLeft'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'paddingLeft'); } else { props.onChange(x.value, 'paddingLeft'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'paddingLeft'); } else { props.onChange(widthVal + x.value, 'paddingLeft'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'paddingLeft'); } else { props.onChange(widthVal + widthUnit, 'paddingLeft'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'paddingLeft'); } else { props.onChange(widthVal + widthUnit + ' !important', 'paddingLeft'); } } } })); } class PGcssPaddingLeft extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPaddingLeft); /***/ }), /***/ "./src/components/css-padding-right/index.js": /*!***************************************************!*\ !*** ./src/components/css-padding-right/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'paddingRight'); } else { props.onChange(widthUnit, 'paddingRight'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'paddingRight'); } else { props.onChange(newVal + widthUnit, 'paddingRight'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'paddingRight'); } else { props.onChange(x.value, 'paddingRight'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'paddingRight'); } else { props.onChange(widthVal + x.value, 'paddingRight'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'paddingRight'); } else { props.onChange(widthVal + widthUnit, 'paddingRight'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'paddingRight'); } else { props.onChange(widthVal + widthUnit + ' !important', 'paddingRight'); } } } })); } class PGcssPaddingRight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPaddingRight); /***/ }), /***/ "./src/components/css-padding-top/index.js": /*!*************************************************!*\ !*** ./src/components/css-padding-top/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { label: "PX", value: "px" }, em: { label: "EM", value: "em" }, rem: { label: "REM", value: "rem" }, auto: { label: "AUTO", value: "auto" }, "%": { label: "%", value: "%" }, cm: { label: "CM", value: "cm" }, mm: { label: "MM", value: "mm" }, in: { label: "IN", value: "in" }, pt: { label: "PT", value: "pt" }, pc: { label: "PC", value: "pc" }, ex: { label: "EX", value: "ex" }, ch: { label: "CH", value: "ch" }, vw: { label: "VW", value: "vw" }, vh: { label: "VH", value: "vh" }, vmin: { label: "VMIN", value: "vmin" }, vmax: { label: "VMAX", value: "vmax" } }; console.log(props.val); var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? "0px" : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? "px" : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != "auto" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == "auto" ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == "auto") { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + " !important", "paddingTop"); } else { props.onChange(widthUnit, "paddingTop"); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + " !important", "paddingTop"); } else { props.onChange(newVal + widthUnit, "paddingTop"); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : "Select...")), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { setwidthUnit(x.value); if (x.value == "auto") { if (isImportant) { props.onChange(x.value + " !important", "paddingTop"); } else { props.onChange(x.value, "paddingTop"); } } else { if (isImportant) { props.onChange(widthVal + x.value + " !important", "paddingTop"); } else { props.onChange(widthVal + x.value, "paddingTop"); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important Enabled" : "Important?", checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == "auto") { props.onChange(widthUnit, "paddingTop"); } else { props.onChange(widthVal + widthUnit, "paddingTop"); } } else { if (widthUnit == "auto") { props.onChange(widthUnit + " !important", "paddingTop"); } else { props.onChange(widthVal + widthUnit + " !important", "paddingTop"); } } } })); } class PGcssPaddingTop extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPaddingTop); /***/ }), /***/ "./src/components/css-padding/index.js": /*!*********************************************!*\ !*** ./src/components/css-padding/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var important = ''; if (typeof props.val == 'object') { var topX = props.val.top; var rightX = props.val.right; var bottomX = props.val.bottom; var leftX = props.val.left; var important = ''; var valParts = [topX, rightX, bottomX, leftX, '']; } else { var valParts = props.val != undefined ? props.val.split(" ") : ['5px', '5px', '5px', '5px', '']; var topX = valParts[0]; var rightX = valParts[1]; var bottomX = valParts[2]; var leftX = valParts[3]; var important = valParts[4]; } const [valX, setvalX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ top: topX, right: rightX, bottom: bottomX, left: leftX }); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(valParts == undefined ? false : valParts.includes("!important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalBoxControl, { label: "", values: valX, onChange: nextValues => { // setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }) // props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'padding'); setvalX({ top: nextValues.top, right: nextValues.right, bottom: nextValues.bottom, left: nextValues.left }); if (isImportant) { props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left + ' !important', 'padding'); } else { props.onChange(nextValues.top + ' ' + nextValues.right + ' ' + nextValues.bottom + ' ' + nextValues.left, 'padding'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(valX.top + ' ' + valX.right + ' ' + valX.bottom + ' ' + valX.left, 'padding'); } else { props.onChange(valX.top + ' ' + valX.right + ' ' + valX.bottom + ' ' + valX.left + ' !important', 'padding'); } } })); } class PGcssPadding extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPadding); /***/ }), /***/ "./src/components/css-perspective/index.js": /*!*************************************************!*\ !*** ./src/components/css-perspective/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { label: "PX", value: "px" }, em: { label: "EM", value: "em" }, rem: { label: "REM", value: "rem" }, cm: { label: "CM", value: "cm" }, mm: { label: "MM", value: "mm" }, in: { label: "IN", value: "in" }, pt: { label: "PT", value: "pt" }, pc: { label: "PC", value: "pc" }, ex: { label: "EX", value: "ex" }, ch: { label: "CH", value: "ch" }, vw: { label: "VW", value: "vw" }, vh: { label: "VH", value: "vh" }, vmin: { label: "VMIN", value: "vmin" }, vmax: { label: "VMAX", value: "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? "0px" : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? "px" : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); if (widthUnit == "auto") { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + " !important", "perspective"); } else { props.onChange(widthUnit, "perspective"); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + " !important", "perspective"); } else { props.onChange(newVal + widthUnit, "perspective"); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? unitArgs[widthUnit].label : "Select...")), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { setwidthUnit(x.value); if (x.value == "auto") { if (isImportant) { props.onChange(x.value + " !important", "perspective"); } else { props.onChange(x.value, "perspective"); } } else { if (isImportant) { props.onChange(widthVal + x.value + " !important", "perspective"); } else { props.onChange(widthVal + x.value, "perspective"); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important Enabled" : "Important?", checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == "auto") { props.onChange(widthUnit, "perspective"); } else { props.onChange(widthVal + widthUnit, "perspective"); } } else { if (widthUnit == "auto") { props.onChange(widthUnit + " !important", "perspective"); } else { props.onChange(widthVal + widthUnit + " !important", "perspective"); } } } })); } class PGcssPerspective extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPerspective); /***/ }), /***/ "./src/components/css-position/index.js": /*!**********************************************!*\ !*** ./src/components/css-position/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { static: { "label": "static", "value": "static" }, absolute: { "label": "absolute", "value": "absolute" }, fixed: { "label": "fixed", "value": "fixed" }, relative: { "label": "relative", "value": "relative" }, sticky: { "label": "sticky", "value": "sticky" } }; var valX = props.val == undefined || props.val == null || props.val.length == 0 ? 'relative' : props.val; console.log('props.val', props.val); const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valX.split(" ")); const [value, setValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); console.log('value', value); console.log('isImportant', isImportant); console.log('args[value]', args[value]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[value] == undefined ? 'Select...' : args[value].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setValue(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'position'); } else { props.onChange(x.value, 'position'); } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(value, 'position'); } else { props.onChange(value + ' !important', 'position'); } } })); } class PGcssPosition extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssPosition); /***/ }), /***/ "./src/components/css-right/index.js": /*!*******************************************!*\ !*** ./src/components/css-right/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'right'); } else { props.onChange(widthUnit, 'right'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'right'); } else { props.onChange(newVal + widthUnit, 'right'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'right'); } else { props.onChange(x.value, 'right'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'right'); } else { props.onChange(widthVal + x.value, 'right'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'right'); } else { props.onChange(widthVal + widthUnit, 'right'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'right'); } else { props.onChange(widthVal + widthUnit + ' !important', 'right'); } } } })); } class PGcssRight extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssRight); /***/ }), /***/ "./src/components/css-row-gap/index.js": /*!*********************************************!*\ !*** ./src/components/css-row-gap/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'rowGap'); if (isImportant) { props.onChange(widthUnit + ' !important', 'rowGap'); } else { props.onChange(widthUnit, 'rowGap'); } } else { //props.onChange(newVal + widthUnit, 'rowGap'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'rowGap'); } else { props.onChange(newVal + widthUnit, 'rowGap'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'rowGap'); } else { props.onChange(x.value, 'rowGap'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'rowGap'); } else { props.onChange(widthVal + x.value, 'rowGap'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'rowGap'); } else { props.onChange(widthVal + widthUnit, 'rowGap'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'rowGap'); } else { props.onChange(widthVal + widthUnit + ' !important', 'rowGap'); } } } })); } class PGcssRowGap extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssRowGap); /***/ }), /***/ "./src/components/css-table-layout/index.js": /*!**************************************************!*\ !*** ./src/components/css-table-layout/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { auto: { "label": "auto", "value": "auto" }, fixed: { "label": "fixed", "value": "fixed" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" } }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? args[props.val].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { onChange(x.value, 'tableLayout'); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })); } class PGcssTableLayout extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTableLayout); /***/ }), /***/ "./src/components/css-text-align-last/index.js": /*!*****************************************************!*\ !*** ./src/components/css-text-align-last/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { auto: { "label": "auto", "value": "auto" }, left: { "label": "left", "value": "left" }, right: { "label": "right", "value": "right" }, center: { "label": "center", "value": "center" }, justify: { "label": "justify", "value": "justify" }, start: { "label": "start", "value": "start" }, end: { "label": "end", "value": "end" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" } }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? args[props.val].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { onChange(x.value, 'textAlignLast'); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })); } class PGcssTextAlignLast extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextAlignLast); /***/ }), /***/ "./src/components/css-text-align/index.js": /*!************************************************!*\ !*** ./src/components/css-text-align/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { left: { label: "left", value: "left" }, center: { label: "center", value: "center" }, right: { label: "right", value: "right" }, justify: { label: "justify", value: "justify" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? "Select..." : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { // onChange(x.value, 'textAlign'); setalign(x.value); if (isImportant) { props.onChange(x.value + " !important", "textAlign"); } else { props.onChange(x.value, "textAlign"); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important (Enabled)" : "Important?", checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, "textAlign"); } else { props.onChange(align + " !important", "textAlign"); } } })); } class PGcssTextAlign extends Component { // var { onChange } = this.props; constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; // function Html(prop) { // var args = { // left: { label: "left", value: "left" }, // center: { label: "center", value: "center" }, // right: { label: "right", value: "right" }, // justify: { label: "justify", value: "justify" }, // }; // const [isImportant, setImportant] = useState( // valArgs[1] == undefined ? false : true // ); // return ( // <> // <div> // <div // className={[ // val == "left" // ? "bg-blue-600 text-white inline-block px-2 py-1 border cursor-pointer" // : "inline-block px-2 py-1 border cursor-pointer", // ]} // onClick={(ev) => { // onChange("left", "textAlign"); // }} // > // <svg // width="24" // height="24" // xmlns="http://www.w3.org/2000/svg" // viewBox="0 0 24 24" // aria-hidden="true" // focusable="false" // > // <path d="M4 19.8h8.9v-1.5H4v1.5zm8.9-15.6H4v1.5h8.9V4.2zm-8.9 7v1.5h16v-1.5H4z"></path> // </svg> // </div> // <div // className={[ // val == "center" // ? "bg-blue-600 text-white inline-block px-2 py-1 border cursor-pointer" // : "inline-block px-2 py-1 border cursor-pointer", // ]} // onClick={(ev) => { // onChange("center", "textAlign"); // }} // > // <svg // width="24" // height="24" // xmlns="http://www.w3.org/2000/svg" // viewBox="0 0 24 24" // aria-hidden="true" // focusable="false" // > // <path d="M16.4 4.2H7.6v1.5h8.9V4.2zM4 11.2v1.5h16v-1.5H4zm3.6 8.6h8.9v-1.5H7.6v1.5z"></path> // </svg> // </div> // <div // className={[ // val == "right" // ? "bg-blue-600 text-white inline-block px-2 py-1 border cursor-pointer" // : "inline-block px-2 py-1 border cursor-pointer", // ]} // onClick={(ev) => { // onChange("right", "textAlign"); // }} // > // <svg // width="24" // height="24" // xmlns="http://www.w3.org/2000/svg" // viewBox="0 0 24 24" // aria-hidden="true" // focusable="false" // > // <path d="M11.1 19.8H20v-1.5h-8.9v1.5zm0-15.6v1.5H20V4.2h-8.9zM4 12.8h16v-1.5H4v1.5z"></path> // </svg> // </div> // <div // className={[ // val == "justify" // ? "bg-blue-600 text-white inline-block px-2 py-1 border cursor-pointer" // : "inline-block px-2 py-1 border cursor-pointer", // ]} // onClick={(ev) => { // onChange("justify", "textAlign"); // }} // > // <svg // width="20" // height="20" // viewBox="0 0 24 24" // aria-hidden="true" // xmlns="http://www.w3.org/2000/svg" // > // <rect width="20" height="2.35838" fill="black" /> // <rect y="10.8208" width="20" height="2.35838" fill="black" /> // <rect y="21.6416" width="20" height="2.35838" fill="black" /> // </svg> // </div> // </div> // {/* <ToggleControl // help={isImportant ? "Important (Enabled)" : "Important?"} // checked={isImportant} // onChange={(arg) => { // setImportant((isImportant) => !isImportant); // if (isImportant) { // props.onChange(align, "textAlign"); // } else { // props.onChange(align + " !important", "textAlign"); // } // }} // /> */} // </> // ); // } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextAlign); /***/ }), /***/ "./src/components/css-text-decoration/index.js": /*!*****************************************************!*\ !*** ./src/components/css-text-decoration/index.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? 'underline #000000 wavy 1px !important' : props.val; var valParts = valZ != undefined || valZ != null ? valZ.split(" ") : ['underline', '#000000', 'wavy', '1px', '!important']; if (valParts.length == 5) { var lineVal = [valParts[0]]; var colorVal = valParts[1]; var styleVal = valParts[2]; var thicknessVal = valParts[3]; } if (valParts.length == 6) { var lineVal = [valParts[0], valParts[1]]; var colorVal = valParts[2]; var styleVal = valParts[3]; var thicknessVal = valParts[4]; } if (valParts.length == 7) { var lineVal = [valParts[0], valParts[1], valParts[2]]; var colorVal = valParts[3]; var styleVal = valParts[4]; var thicknessVal = valParts[5]; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var thicknessValX = thicknessVal != undefined ? thicknessVal.match(/-?\d+/g)[0] : 1; var thicknessUnitX = thicknessVal != undefined ? thicknessVal.match(/[a-zA-Z%]+/g)[0] : 'px'; var [thicknessValY, setthicknessVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(thicknessValX); var [thicknessUnitY, setthicknessUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(thicknessUnitX); var [outlinelineVal, setoutlinelineVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(lineVal); var [outlineColorVal, setoutlineColorVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(colorVal); var [outlineStyleVal, setoutlineStyleVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(styleVal); var [outlineThicknessVal, setoutlineThicknessVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(thicknessValY + thicknessUnitY); var [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); var [textDecoration, setTextDecoration] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ "line": ['underline'], "style": 'double', "color": "#000000", "thicknessVal": "1", "thicknessUnit": "px" }); var lineArgs = { none: { "label": "None", "value": "none" }, overline: { "label": "Overline", "value": "overline" }, underline: { "label": "Underline", "value": "underline" }, 'line-through': { "label": "Line Through", "value": "line-through" } }; var styleArgs = { none: { "label": "None", "value": "none" }, solid: { "label": "Solid", "value": "solid" }, double: { "label": "Double", "value": "double" }, wavy: { "label": "wavy", "value": "wavy" }, dotted: { "label": "Dotted", "value": "dotted" }, dashed: { "label": "Dashed", "value": "dashed" }, groove: { "label": "Groove", "value": "groove" }, ridge: { "label": "Ridge", "value": "ridge" }, inset: { "label": "Inset", "value": "inset" }, outset: { "label": "Outset", "value": "outset" } }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => {}, [textDecoration]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { // var valParts = props.val != undefined ? props.val.split(" ") : ['underline', '#000000', 'wavy', '1px']; }, [props.val]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Line"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, Object.entries(lineArgs).map(arg => { var i = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: outlinelineVal != undefined && outlinelineVal.indexOf(x.value) !== -1 ? '!bg-blue-500 text-white px-2 inline-block m-1 py-1 cursor-pointer' : 'px-2 inline-block m-1 py-1 bg-gray-300 cursor-pointer', onClick: ev => { if (outlinelineVal.indexOf(x.value) < 0) { if (x.value == 'none') { outlinelineVal = ['none']; } else { outlinelineVal.push(x.value); } setoutlinelineVal(outlinelineVal); setTextDecoration({ ...textDecoration, line: outlinelineVal }); if (isImportant) { props.onChange(outlinelineVal.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal + ' ' + '!important', 'textDecoration'); } else { props.onChange(outlinelineVal.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal, 'textDecoration'); } } else { var arr = outlinelineVal.filter(item => item !== x.value); setTextDecoration({ ...textDecoration, line: arr }); setoutlinelineVal(arr); if (isImportant) { props.onChange(arr.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal + ' ' + '!important', 'textDecoration'); } else { props.onChange(arr.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal, 'textDecoration'); } } } }, x.label); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Color"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ColorPalette, { value: outlineColorVal, colors: _colors_presets__WEBPACK_IMPORTED_MODULE_2__["default"], enableAlpha: true, onChange: newVal => { setoutlineColorVal(newVal); setTextDecoration({ ...textDecoration, color: newVal }); if (isImportant) { props.onChange(textDecoration.line.join(' ') + ' ' + newVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal + ' ' + '!important', 'textDecoration'); } else { props.onChange(textDecoration.line.join(' ') + ' ' + newVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal, 'textDecoration'); } } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, outlineStyleVal ? styleArgs[outlineStyleVal].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(styleArgs).map(arg => { var index = arg[0]; var x = arg[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setoutlineStyleVal(x.value); setTextDecoration({ ...textDecoration, style: x.value }); if (isImportant) { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + x.value + ' ' + outlineThicknessVal + ' ' + '!important', 'textDecoration'); } else { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + x.value + ' ' + outlineThicknessVal, 'textDecoration'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Thickness"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: thicknessValY, type: "number", onChange: newVal => { setthicknessVal(newVal); setoutlineThicknessVal(newVal + thicknessUnitY); setTextDecoration({ ...textDecoration, thicknessVal: newVal }); if (isImportant) { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + newVal + thicknessUnitY + ' ' + '!important', 'textDecoration'); } else { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + newVal + thicknessUnitY, 'textDecoration'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom right", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, thicknessUnitY != undefined ? unitArgs[thicknessUnitY].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setthicknessUnit(x.value); setoutlineThicknessVal(thicknessValY + x.value); if (isImportant) { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + thicknessValY + x.value + ' ' + '!important', 'textDecoration'); } else { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + thicknessValY + x.value, 'textDecoration'); } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal, 'textDecoration'); } else { props.onChange(textDecoration.line.join(' ') + ' ' + outlineColorVal + ' ' + outlineStyleVal + ' ' + outlineThicknessVal + ' ' + '!important', 'textDecoration'); } } })); } class PGcssTextDecoration extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextDecoration); /***/ }), /***/ "./src/components/css-text-indent/index.js": /*!*************************************************!*\ !*** ./src/components/css-text-indent/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g) == null ? 0 : valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4 items-center gap-[4px] pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'textIndent'); } else { props.onChange(widthUnit, 'textIndent'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'textIndent'); } else { props.onChange(newVal + widthUnit, 'textIndent'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Text Indent", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'textIndent'); } else { props.onChange(x.value, 'textIndent'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'textIndent'); } else { props.onChange(widthVal + x.value, 'textIndent'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'textIndent'); } else { props.onChange(widthVal + widthUnit, 'textIndent'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'textIndent'); } else { props.onChange(widthVal + widthUnit + ' !important', 'textIndent'); } } } })); } class PGcssTextIndent extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextIndent); /***/ }), /***/ "./src/components/css-text-justify/index.js": /*!**************************************************!*\ !*** ./src/components/css-text-justify/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { none: { "label": "none", "value": "none" }, auto: { "label": "auto", "value": "auto" }, 'inter-word': { "label": "inter-word", "value": "inter-word" }, 'inter-character': { "label": "inter-character", "value": "inter-character" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'textJustify'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'textJustify'); } else { props.onChange(x.value, 'textJustify'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'textJustify'); } else { props.onChange(align + ' !important', 'textJustify'); } } })); } class PGcssTextJustify extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextJustify); /***/ }), /***/ "./src/components/css-text-overflow/index.js": /*!***************************************************!*\ !*** ./src/components/css-text-overflow/index.js ***! \***************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { clip: { "label": "Clip", "value": "clip" }, ellipsis: { "label": "Ellipsis", "value": "ellipsis" }, string: { "label": "String", "value": "string" }, initial: { "label": "initial", "value": "initial" }, inherit: { "label": "inherit", "value": "inherit" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'textOverflow'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'textOverflow'); } else { props.onChange(x.value, 'textOverflow'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'textOverflow'); } else { props.onChange(align + ' !important', 'textOverflow'); } } })); } class PGcssTextOverflow extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextOverflow); /***/ }), /***/ "./src/components/css-text-shadow/index.js": /*!*************************************************!*\ !*** ./src/components/css-text-shadow/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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 _colors_presets__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../colors-presets */ "./src/colors-presets.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/block-editor */ "@wordpress/block-editor"); /* harmony import */ var _wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_4__); /* harmony import */ var _components_input_color_picker__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/input-color-picker */ "./src/components/input-color-picker/index.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px 0px 0px #000' : props.val; var h = valZ != undefined ? valZ.split(" ")[0].match(/-?\d+/g)[0] : 0; var v = valZ != undefined ? valZ.split(" ")[1].match(/-?\d+/g)[0] : 0; var blur = valZ != undefined ? valZ.split(" ")[2].match(/-?\d+/g)[0] : 0; var color = valZ != undefined ? valZ.split(" ")[3] : '#dddddd'; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "H-Offset")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { min: "-100", max: "100", step: "1", value: parseInt(h), onChange: newVal => { props.onChange(newVal + 'px ' + v + 'px ' + blur + 'px ' + color, 'textShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "V-Offset")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { min: "-100", max: "100", step: "1", value: parseInt(v), onChange: newVal => { props.onChange(h + 'px ' + newVal + 'px ' + blur + 'px ' + color, 'textShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Blur")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.RangeControl, { min: "0", max: "100", step: "1", value: parseInt(blur), onChange: newVal => { props.onChange(h + 'px ' + v + 'px ' + newVal + 'px ' + color, 'textShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("label", { for: "" }, "Color")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_input_color_picker__WEBPACK_IMPORTED_MODULE_5__["default"], { value: color, enableAlpha: true, onChange: newVal => { props.onChange(h + 'px ' + h + 'px ' + blur + 'px ' + newVal, 'textShadow'); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(h + 'px' + ' ' + v + 'px' + ' ' + blur + 'px' + ' ' + color, 'textShadow'); } else { props.onChange(h + 'px' + ' ' + v + 'px' + ' ' + blur + 'px' + ' ' + color + ' !important', 'textShadow'); } } })); } class PGcssTextShadow extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextShadow); /***/ }), /***/ "./src/components/css-text-transform/index.js": /*!****************************************************!*\ !*** ./src/components/css-text-transform/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { none: { "label": "None", "value": "none" }, capitalize: { "label": "Capitalize", "value": "capitalize" }, uppercase: { "label": "Uppercase", "value": "uppercase" }, lowercase: { "label": "Lowercase", "value": "lowercase" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'textTransform'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'textTransform'); } else { props.onChange(x.value, 'textTransform'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'textTransform'); } else { props.onChange(align + ' !important', 'textTransform'); } } })); } class PGcssTextTransform extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTextTransform); /***/ }), /***/ "./src/components/css-top/index.js": /*!*****************************************!*\ !*** ./src/components/css-top/index.js ***! \*****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; if (typeof props.val == 'object') { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; } // var valZ = (props.val == null || props.val == undefined || props.val.length == 0) ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between" }, widthUnit != 'auto' && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", disabled: widthUnit == 'auto' ? true : false, onChange: newVal => { setwidthVal(newVal); // if (widthUnit == 'auto') { // props.onChange(widthUnit, 'top'); // } else { // props.onChange(newVal + widthUnit, 'top'); // } if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'top'); } else { props.onChange(widthUnit, 'top'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'top'); } else { props.onChange(newVal + widthUnit, 'top'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, valZ ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { // props.onChange(x.value, 'top'); if (isImportant) { props.onChange(x.value + ' !important', 'top'); } else { props.onChange(x.value, 'top'); } } else { // props.onChange(widthVal + x.value, 'top'); if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'top'); } else { props.onChange(widthVal + x.value, 'top'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'top'); } else { props.onChange(widthVal + widthUnit, 'top'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'top'); } else { props.onChange(widthVal + widthUnit + ' !important', 'top'); } } } })); } class PGcssTop extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTop); /***/ }), /***/ "./src/components/css-transform-origin/index.js": /*!******************************************************!*\ !*** ./src/components/css-transform-origin/index.js ***! \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = [{ label: "left top", value: "left top" }, { label: "left center", value: "left center" }, { label: "left bottom", value: "left bottom" }, { label: "right top", value: "right top" }, { label: "right center", value: "right center" }, { label: "right bottom", value: "right bottom" }, { label: "center top", value: "center top" }, { label: "center center", value: "center center" }, { label: "center bottom", value: "center bottom" }, { label: "inherit", value: "inherit" }, { label: "initial", value: "initial" }, { label: "revert", value: "revert" }, { label: "unset", value: "unset" }]; const [isCustom, setisCustom] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.match(/-?\d+/g) == null ? false : true); const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [position, setposition] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.includes("!important") ? true : false); const [ValX, setValX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]); const [valUnitX, setvalUnitX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? "px" : valArgs[0].match(/[a-zA-Z%]+/g)[0]); const [ValY, setValY] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined || valArgs[1].match(/-?\d+/g) == null ? 0 : valArgs[1].match(/-?\d+/g)[0]); const [valUnitY, setvalUnitY] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined || valArgs[1].match(/[a-zA-Z%]+/g) == null ? "px" : valArgs[1].match(/[a-zA-Z%]+/g)[0]); // var ValX = (valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null) ? 0 : valArgs[0].match(/-?\d+/g)[0]; // var valUnitX = (valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null) ? 'px' : valArgs[0].match(/[a-zA-Z%]+/g)[0]; // var ValY = (valArgs[1] == undefined || valArgs[1].match(/-?\d+/g) == null) ? 0 : valArgs[1].match(/-?\d+/g)[0]; // var valUnitY = (valArgs[1] == undefined || valArgs[1].match(/[a-zA-Z%]+/g) == null) ? 'px' : valArgs[1].match(/[a-zA-Z%]+/g)[0]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isCustom ? "Custom Value enabled?" : "Custom Value?", checked: isCustom, onChange: arg => { //console.log(arg); setisCustom(isCustom => !isCustom); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center my-3" }, !isCustom && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, position.length == 0 ? "Select..." : position)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, args.map(x => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { setisCustom(false); setposition(x.value); if (isImportant) { props.onChange(x.value + " !important", "transformOrigin"); } else { props.onChange(x.value, "transformOrigin"); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), isCustom && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: ValX, type: "number", onChange: newVal => { console.log(valArgs); setValX(newVal); if (isImportant) { props.onChange(newVal + valUnitX + " " + ValY + valUnitY + " " + "!important", "transformOrigin"); } else { props.onChange(newVal + valUnitX + " " + ValY + valUnitY, "transformOrigin"); } } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, " / "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: ValY, type: "number", onChange: newVal => { console.log(valArgs); setValY(newVal); if (isImportant) { props.onChange(ValX + valUnitX + " " + newVal + valUnitY + " " + "!important", "transformOrigin"); } else { props.onChange(ValX + valUnitX + " " + newVal + valUnitY, "transformOrigin"); } } }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { label: isImportant ? "Important (Enabled)" : "Important?", checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { if (isCustom) { props.onChange(ValX + valUnitX + " " + ValY + valUnitY, "transformOrigin"); } else { props.onChange(position, "transformOrigin"); } } else { if (isCustom) { props.onChange(ValX + valUnitX + " " + ValY + valUnitY + " " + "!important", "transformOrigin"); } else { props.onChange(position + " !important", "transformOrigin"); } } } })); } class PGcssTransformOrigin extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTransformOrigin); /***/ }), /***/ "./src/components/css-transform/index.js": /*!***********************************************!*\ !*** ./src/components/css-transform/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(") ") : []; const [valArgs, setvalArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); var propertyArgs = { translateX: { label: "TranslateX", id: "translateX", val: "0px" }, translateY: { label: "TranslateY", id: "translateY", val: "0px" }, translateZ: { label: "TranslateZ", id: "translateZ", val: "0px" }, translate: { label: "Translate", id: "translate", val: "5px,6px" }, translate3d: { label: "Translate3d", id: "translate3d", val: "0px,0px,0px" }, scale: { label: "Scale", id: "scale", val: "2,3" }, scale3d: { label: "Scale3d", id: "scale3d", val: "1,1,1" }, scaleX: { label: "ScaleX", id: "scaleX", val: "1" }, scaleY: { label: "ScaleY", id: "scaleY", val: "1" }, scaleZ: { label: "ScaleZ", id: "scaleZ", val: "1" }, rotate: { label: "Rotate", id: "rotate", val: "0deg" }, rotate3d: { label: "Rotate3d", id: "rotate3d", val: "1,1,1,0deg" }, rotateX: { label: "RotateX", id: "rotateX", val: "0deg" }, rotateY: { label: "RotateY", id: "rotateY", val: "0deg" }, rotateZ: { label: "RotateZ", id: "rotateZ", val: "0deg" }, skew: { label: "Skew", id: "skew", val: "2deg,3deg" }, skewX: { label: "SkewX", id: "skewX", val: "0deg" }, skewY: { label: "SkewY", id: "skewY", val: "0deg" }, perspective: { label: "Perspective", id: "perspective", val: "0px" }, matrix: { label: "Matrix", id: "matrix", val: "1,1,1,1,1,1" }, matrix3d: { label: "Matrix3d", id: "matrix3d", val: "1,1" } }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var filtered = valParts.filter(Boolean); var res = filtered.map(x => { if (x.length != 0) { var proptyParts = x != undefined ? x.split("(") : []; var proptyId = proptyParts[0]; var proptyVal = proptyParts[1]; var obj = { id: proptyId, val: proptyVal }; return obj; } }); setvalArgs(res); }, [props.val]); function RemoveProty({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "hover:bg-red-500 hover:text-white mr-1 inline-block p-1 cursor-pointer", onClick: ev => { var hellox = valArgs.splice(index, 1); setvalArgs(valArgs); var str = ""; valArgs.map(x => { str += x.id + "(" + x.val + ") "; }); props.onChange(str, "transform"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, title)); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mb-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_2__["default"], { position: "bottom right", variant: "secondary", options: propertyArgs, buttonTitle: "Choose", onChange: (option, index) => { valArgs.push(option); var str = ""; valArgs.map((x, i) => { str += x.id + "(" + x.val + ") "; }); props.onChange(str, "transform"); } })), valArgs != undefined && valArgs.map((arg, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveProty, { title: arg.id != null && propertyArgs[arg.id] != undefined ? propertyArgs[arg.id].label : "property", index: i }), initialOpen: false }, (arg.id == "translateX" || arg.id == "translateY" || arg.id == "translateZ" || arg.id == "scaleX" || arg.id == "scaleY" || arg.id == "scaleZ" || arg.id == "rotate" || arg.id == "rotateX" || arg.id == "rotateY" || arg.id == "rotateZ" || arg.id == "skewX" || arg.id == "skewY" || arg.id == "perspective") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.match(/-?\d+/g) == null ? 0 : arg.val.match(/-?\d+/g)[0], type: "number", onChange: newVal => { //var argVal = arg.val != undefined ? arg.val.match(/-?\d+/g)[0] : 1; if (parseInt(newVal) == NaN) { return; } var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scaleX" || arg.id == "scaleY" || arg.id == "scaleZ") { str += x.id + "(" + newVal + ") "; } if (arg.id == "translateX" || arg.id == "translateY" || arg.id == "translateZ" || arg.id == "perspective") { var argUnit = arg.val != undefined ? arg.val.match(/[%a-zA-Z]+/g)[0] : ""; str += x.id + "(" + newVal + argUnit + ") "; } if (arg.id == "rotate" || arg.id == "rotateX" || arg.id == "rotateY" || arg.id == "rotateZ" || arg.id == "skewX" || arg.id == "skewY") { str += x.id + "(" + newVal + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-2/6" }, (arg.id == "translateX" || arg.id == "translateY" || arg.id == "translateZ" || arg.id == "perspective") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: arg.val.match(/[%a-zA-Z]+/g)[0], options: [{ label: "PX", value: "px" }, { label: "EM", value: "em" }, { label: "REM", value: "rem" }, { label: "%", value: "%" }], onChange: newVal => { var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "translateX" || arg.id == "translateY" || arg.id == "translateZ" || arg.id == "perspective") { var argVal = arg.val != undefined ? arg.val.match(/-?\d+/g)[0] : 1; str += x.id + "(" + argVal + newVal + ") "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (arg.id == "rotateX" || arg.id == "rotate" || arg.id == "rotateY" || arg.id == "rotateZ" || arg.id == "skewX" || arg.id == "skewY") && "deg"))), (arg.id == "translate" || arg.id == "scale" || arg.id == "skew") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "X Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.split(",")[0].match(/-?\d+/g) == undefined ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0], type: "number", onChange: newVal => { //var argVal = arg.val != undefined ? arg.val.match(/-?\d+/g)[0] : 1; if (parseInt(newVal) == NaN) { return; } var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[%a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[%a-zA-Z]+/g)[0]; var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scale") { str += x.id + "(" + newVal + "," + valPartsY + ") "; } if (arg.id == "translate") { str += x.id + "(" + newVal + valPartsXUnit + "," + valPartsY + valPartsYUnit + ") "; } if (arg.id == "skew") { str += x.id + "(" + newVal + "deg," + valPartsY + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-2/6" }, arg.id == "translate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: arg.val.split(",")[0].match(/[%a-zA-Z]+/g)[0], options: [{ label: "PX", value: "px" }, { label: "EM", value: "em" }, { label: "REM", value: "rem" }, { label: "%", value: "%" }], onChange: newVal => { var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "translate") { var argValX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 1 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var argValXUnit = arg.val.split(",")[0].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[%a-zA-Z]+/g)[0]; var argValY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 1 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var argValYUnit = arg.val.split(",")[1].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[%a-zA-Z]+/g)[0]; str += x.id + "(" + argValX + newVal + "," + argValY + argValYUnit + ") "; //str += x.id + '(' + argVal + newVal + ') '; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } })), arg.id == "skew" && "deg"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Y Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0], type: "number", onChange: newVal => { if (parseInt(newVal) == NaN) { return; } var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[%a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var argValYUnit = arg.val.split(",")[1].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[%a-zA-Z]+/g)[0]; var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scale") { str += x.id + "(" + valPartsX + "," + newVal + ") "; } if (arg.id == "translate") { str += x.id + "(" + valPartsX + valPartsXUnit + "," + newVal + argValYUnit + ") "; } if (arg.id == "skew") { str += x.id + "(" + valPartsX + "deg," + newVal + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-2/6" }, arg.id == "translate" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: arg.val.split(",")[1].match(/[%a-zA-Z]+/g) == null ? 0 : arg.val.split(",")[1].match(/[%a-zA-Z]+/g)[0], options: [{ label: "PX", value: "px" }, { label: "EM", value: "em" }, { label: "REM", value: "rem" }, { label: "%", value: "%" }], onChange: newVal => { var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "translate") { var argValX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 1 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var argValXUnit = arg.val.split(",")[0].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[%a-zA-Z]+/g)[0]; var argValY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 1 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var argValYUnit = arg.val.split(",")[1].match(/[%a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[%a-zA-Z]+/g)[0]; str += x.id + "(" + argValX + argValXUnit + "," + argValY + newVal + ") "; //str += x.id + '(' + argVal + newVal + ') '; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } })), arg.id == "skew" && "deg")))), (arg.id == "translate3d" || arg.id == "scale3d" || arg.id == "rotate3d") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "X Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0], type: "number", onChange: newVal => { //var argVal = arg.val != undefined ? arg.val.match(/-?\d+/g)[0] : 1; //var argUnit = arg.val != undefined ? arg.val.match(/[a-zA-Z]+/g)[0] : ''; if (parseInt(newVal) == NaN) { return; } // var valPartsX = arg.val.split(",")[0].match(/-?\d+/g)[0]; // var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; // var valPartsY = arg.val.split(",")[1].match(/-?\d+/g)[0]; // var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; // var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g)[0]; // var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scale3d") { str += x.id + "(" + newVal + "," + valPartsY + "," + valPartsZ + ") "; } if (arg.id == "translate3d") { str += x.id + "(" + newVal + valPartsXUnit + "," + valPartsY + valPartsYUnit + "," + valPartsZ + valPartsZUnit + ") "; } if (arg.id == "rotate3d") { var valPartsA = arg.val.split(",")[2].match(/-?\d+/g)[0]; str += x.id + "(" + newVal + "," + valPartsY + "," + valPartsZ + "," + valPartsA + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, arg.id == "translate3d" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: arg.val.split(",")[0].match(/[%a-zA-Z]+/g)[0], options: [{ label: "PX", value: "px" }, { label: "EM", value: "em" }, { label: "REM", value: "rem" }, { label: "%", value: "%" }], onChange: newVal => { var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "translate3d") { // var valPartsX = arg.val.split(",")[0].match(/-?\d+/g)[0]; // var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; // var valPartsY = arg.val.split(",")[1].match(/-?\d+/g)[0]; // var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; // var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g)[0]; // var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; str += x.id + "(" + valPartsX + newVal + "," + valPartsY + valPartsYUnit + "," + valPartsZ + valPartsZUnit + ") "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Y Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0], type: "number", onChange: newVal => { if (parseInt(newVal) == NaN) { return; } var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scale3d") { str += x.id + "(" + valPartsX + "," + newVal + "," + valPartsZ + ") "; } if (arg.id == "translate3d") { str += x.id + "(" + valPartsX + valPartsXUnit + "," + newVal + valPartsYUnit + "," + valPartsZ + valPartsZUnit + ") "; } if (arg.id == "rotate3d") { var valPartsA = arg.val.split(",")[3].match(/-?\d+/g)[0]; str += x.id + "(" + valPartsX + "," + newVal + "," + valPartsZ + "," + valPartsA + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, arg.id == "translate3d" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: arg.val.split(",")[1].match(/[%a-zA-Z]+/g)[0], options: [{ label: "PX", value: "px" }, { label: "EM", value: "em" }, { label: "REM", value: "rem" }, { label: "%", value: "%" }], onChange: newVal => { var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "translate3d") { var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; str += x.id + "(" + valPartsX + valPartsXUnit + "," + valPartsY + newVal + "," + valPartsZ + valPartsZUnit + ") "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } })), arg.id == "skew" && "deg")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Z Value"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0], type: "number", onChange: newVal => { if (parseInt(newVal) == NaN) { return; } // var valPartsX = arg.val.split(",")[0].match(/-?\d+/g)[0]; // var valPartsY = arg.val.split(",")[1].match(/-?\d+/g)[0]; // var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; // var valPartsX = arg.val.split(",")[0].match(/-?\d+/g)[0]; // var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; // var valPartsY = arg.val.split(",")[1].match(/-?\d+/g)[0]; // var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; // var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g)[0]; // var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scale3d") { str += x.id + "(" + valPartsX + "," + valPartsY + "," + newVal + ") "; } if (arg.id == "translate3d") { str += x.id + "(" + valPartsX + valPartsXUnit + "," + valPartsY + valPartsYUnit + "," + newVal + valPartsZUnit + ") "; } if (arg.id == "rotate3d") { var valPartsA = arg.val.split(",")[3].match(/-?\d+/g)[0]; str += x.id + "(" + valPartsX + "," + valPartsY + "," + newVal + "," + valPartsA + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, arg.id == "translate3d" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: arg.val.split(",")[2].match(/[%a-zA-Z]+/g)[0], options: [{ label: "PX", value: "px" }, { label: "EM", value: "em" }, { label: "REM", value: "rem" }, { label: "%", value: "%" }], onChange: newVal => { var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "translate3d") { var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g) == null ? "px" : arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; // var valPartsX = arg.val.split(",")[0].match(/-?\d+/g)[0]; // var valPartsXUnit = arg.val.split(",")[0].match(/[a-zA-Z]+/g)[0]; // var valPartsY = arg.val.split(",")[1].match(/-?\d+/g)[0]; // var valPartsYUnit = arg.val.split(",")[1].match(/[a-zA-Z]+/g)[0]; // var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g)[0]; // var valPartsZUnit = arg.val.split(",")[2].match(/[a-zA-Z]+/g)[0]; str += x.id + "(" + valPartsX + valPartsXUnit + "," + valPartsY + valPartsYUnit + "," + valPartsZ + newVal + ") "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } })), arg.id == "skew" && "deg")), arg.id == "rotate3d" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Angle"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.val.split(",")[3].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[3].match(/-?\d+/g)[0], type: "number", onChange: newVal => { if (parseInt(newVal) == NaN) { return; } var valPartsX = arg.val.split(",")[0].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[0].match(/-?\d+/g)[0]; var valPartsY = arg.val.split(",")[1].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[1].match(/-?\d+/g)[0]; var valPartsZ = arg.val.split(",")[2].match(/-?\d+/g) == null ? 0 : arg.val.split(",")[2].match(/-?\d+/g)[0]; var str = ""; valArgs.map((x, j) => { if (arg.id == x.id) { if (arg.id == "scale3d") { str += x.id + "(" + valPartsX + "," + valPartsY + "," + valPartsZ + ") "; } if (arg.id == "translate3d") { str += x.id + "(" + valPartsX + "px," + valPartsY + "px," + valPartsZ + "px) "; } if (arg.id == "rotate3d") { str += x.id + "(" + valPartsX + "," + valPartsY + "," + valPartsZ + "," + newVal + "deg) "; } } else { str += x.id + "(" + x.val + ") "; } }); props.onChange(str, "transform"); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, arg.id == "rotate3d" && "deg")))); })); } class PGcssTransition extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTransition); /***/ }), /***/ "./src/components/css-transition/index.js": /*!************************************************!*\ !*** ./src/components/css-transition/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valParts = props.val != undefined ? props.val.split(",") : []; const [valArgs, setvalArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); var timingFunctionargs = [{ label: "ease", value: "ease" }, { label: "linear", value: "linear" }, { label: "ease-in", value: "ease-in" }, { label: "ease-out", value: "ease-out" }, { label: "ease-in-out", value: "ease-in-out" }, { label: "step-start", value: "step-start" }, { label: "step-end", value: "step-end" }]; var transitionPropertiesBasic = { all: { value: "all ", label: "All " }, "background-color": { value: "background-color", label: "Background Color" }, color: { value: "color", label: "Color" }, "box-shadow": { value: "box-shadow", label: "Box Shadow" }, "font-size": { value: "font-size", label: "Font Size" }, right: { value: "right", label: "Right" }, top: { value: "top", label: "Top" }, width: { value: "width", label: "Width" }, height: { value: "height", label: "Height" }, "font-weight": { value: "font-weight", label: "Font Weight" }, left: { value: "left", label: "Left" }, "z-index": { value: "z-index", label: "Z-Index" }, margin: { value: "margin", label: "Margin" }, padding: { value: "padding", label: "Padding" }, "max-height": { value: "max-height", label: "Max Height" }, "max-width": { value: "max-width", label: "Max Width" }, "min-height": { value: "min-height", label: "Min Height" }, "min-width": { value: "min-width", label: "Min Width" }, opacity: { value: "opacity", label: "Opacity" }, "align-content": { value: "align-content", label: "Align Content" }, "align-items": { value: "align-items", label: "Align Items" }, "align-self": { value: "align-self", label: "Align Self" }, "backface-visibility": { value: "backface-visibility", label: "Backface Visibility" }, //background: { value: 'background', label: 'Background' }, "background-attachment": { value: "background-attachment", label: "Background Attachment", isPro: true }, "background-blendMode": { value: "background-blendMode", label: "Background Blend Mode", isPro: true }, "background-clip": { value: "background-clip", label: "Background Clip", isPro: true }, "background-image": { value: "background-image", label: "Background Image" }, "background-origin": { value: "background-origin", label: "Background Origin" }, "background-repeat": { value: "background-repeat", label: "Background Repeat" }, "background-position": { value: "background-position", label: "Background Position" }, "background-size": { value: "background-size", label: "Background Size" }, border: { value: "border", label: "Border" }, "border-collapse": { value: "border-collapse", label: "Border Collapse", isPro: true }, "border-image": { value: "border-image", label: "Border Image", isPro: true }, "border-radius": { value: "border-radius", label: "Border Radius" }, "border-spacing": { value: "border-spacing", label: "Border Spacing", isPro: true }, "backdrop-filter": { value: "backdrop-filter", label: "Backdrop Filter" }, bottom: { value: "bottom", label: "Bottom" }, "box-sizing": { value: "box-sizing", label: "Box Sizing", isPro: true }, clear: { value: "clear", label: "Clear" }, clip: { value: "clip", label: "Clip", isPro: true }, "clip-path": { value: "clip-path", label: "Clip Path", isPro: true }, "column-count": { value: "column-count", label: "Column Count", isPro: true }, content: { value: "content", label: "Content", isPro: true }, cursor: { value: "cursor", label: "Cursor", isPro: true }, display: { value: "display", label: "Display" }, direction: { value: "direction", label: "Direction" }, float: { value: "float", label: "Float" }, filter: { value: "filter", label: "Filter", isPro: true }, "font-family": { value: "font-family", label: "Font Family" }, "font-stretch": { value: "font-stretch", label: "Font Stretch", isPro: true }, "font-style": { value: "font-style", label: "Font Style" }, "font-variant-caps": { value: "font-variant-caps", label: "Font VariantCaps", isPro: true }, "letter-spacing": { value: "letter-spacing", label: "Letter Spacing", isPro: true }, "line-height": { value: "line-height", label: "Line Height" }, "list-style": { value: "list-style", label: "ListStyle" }, outline: { value: "outline", label: "Outline", isPro: true }, overflow: { value: "overflow", label: "Overflow" }, "overflow-x": { value: "overflow-x", label: "OverflowX", isPro: true }, "overflow-y": { value: "overflow-y", label: "OverflowY", isPro: true }, perspective: { value: "perspective", label: "Perspective", isPro: true }, position: { value: "position", label: "Position" }, "text-align": { value: "text-align", label: "Text Align" }, transform: { value: "transform", label: "Transform", isPro: true }, transition: { value: "transition", label: "Transition", isPro: true }, "vertical-align": { value: "vertical-align", label: "Vertical Align" }, visibility: { value: "visibility", label: "Visibility" }, "text-decoration": { value: "text-decoration", label: "Text Decoration", isPro: true }, "text-indent": { value: "text-indent", label: "Text Indent", isPro: true }, "text-justify": { value: "text-justify", label: "Text Justify", isPro: true }, "text-overflow": { value: "text-overflow", label: "Text Overflow" }, "text-shadow": { value: "text-shadow", label: "Text Shadow", isPro: true }, "text-transform": { value: "text-transform", label: "Text Transform", isPro: true }, "word-break": { value: "word-break", label: "Word Break", isPro: true }, "word-spacing": { value: "word-spacing", label: "Word Spacing", isPro: true }, "word-wrap": { value: "word-wrap", label: "Word Wrap", isPro: true }, "writing-mode": { value: "writing-mode", label: "Writing Mode", isPro: true } }; let transitionProperties = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_3__.applyFilters)("transitionProperties", transitionPropertiesBasic); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var filtered = valParts.filter(Boolean); var res = filtered.map(x => { if (x.length != 0) { var items = x.split(" "); var property = items[0]; var duration = items[1]; var timingFunction = items[2]; var delay = items[3]; return { property: property, duration: duration, timingFunction: timingFunction, delay: delay }; } }); setvalArgs(res); }, [props.val]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mb-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_2__["default"], { position: "bottom right", variant: "secondary", options: transitionProperties, buttonTitle: "Choose", onChange: (option, index) => { valArgs.push({ property: option.value, duration: "1s", timingFunction: "ease", delay: "0s" }); var str = ""; valArgs.map((x, i) => { str += x.property + " " + x.duration + " " + x.timingFunction + " " + x.delay; str += ","; }); var strX = str.slice(0, -1); props.onChange(strX, "transition"); } })), valArgs != undefined && valArgs.map((arg, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { title: arg.property != null && transitionProperties[arg.property] != undefined ? transitionProperties[arg.property].label : "property", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Duration"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.duration.slice(0, -1), type: "number", autocomplete: "off", onChange: newVal => { valArgs[i].duration = newVal; var str = ""; valArgs.map((x, j) => { if (i == j) { str += x.property + " " + newVal + "s " + x.timingFunction + " " + x.delay; str += ","; } else { str += x.property + " " + x.duration + " " + x.timingFunction + " " + x.delay; str += ","; } }); var strX = str.slice(0, -1); props.onChange(strX, "transition"); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Timing Function"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_2__["default"], { position: "bottom right", variant: "secondary", options: timingFunctionargs, buttonTitle: arg.timingFunction != null ? arg.timingFunction : "Choose", onChange: (option, index) => { valArgs[i].timingFunction = option.value; var str = ""; valArgs.map((x, j) => { if (i == j) { str += x.property + " " + x.duration + " " + option.value + " " + x.delay; str += ","; } else { str += x.property + " " + x.duration + " " + x.timingFunction + " " + x.delay; str += ","; } }); var strX = str.slice(0, -1); props.onChange(strX, "transition"); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Delay"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: arg.delay.slice(0, -1), type: "number", autocomplete: "off", onChange: newVal => { valArgs[i].delay = newVal; var str = ""; valArgs.map((x, j) => { if (i == j) { str += x.property + " " + x.duration + " " + x.timingFunction + " " + newVal + "s"; str += ","; } else { str += x.property + " " + x.duration + " " + x.timingFunction + " " + x.delay; str += ","; } }); var strX = str.slice(0, -1); props.onChange(strX, "transition"); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "hover:bg-red-500 bg-red-400 text-white ml-1 inline-block p-1 cursor-pointer", onClick: ev => { var hellox = valArgs.splice(i, 1); setvalArgs(valArgs); var str = ""; valArgs.map((x, j) => { str += x.property + " " + x.duration + " " + x.timingFunction + " " + x.delay; str += ","; }); var strX = str.slice(0, -1); props.onChange(strX, "transition"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-no-alt" })))); })); } class PGcssTransition extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssTransition); /***/ }), /***/ "./src/components/css-user-select/index.js": /*!*************************************************!*\ !*** ./src/components/css-user-select/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { auto: { "label": "auto", "value": "auto" }, none: { "label": "none", "value": "none" }, text: { "label": "text", "value": "text" }, all: { "label": "all", "value": "all" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'userSelect'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'userSelect'); } else { props.onChange(x.value, 'userSelect'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'userSelect'); } else { props.onChange(align + ' !important', 'userSelect'); } } })); } class PGcssUserSelect extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssUserSelect); /***/ }), /***/ "./src/components/css-vertical-align/index.js": /*!****************************************************!*\ !*** ./src/components/css-vertical-align/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { baseline: { "label": "Baseline", "value": "baseline" }, 'text-top': { "label": "Text Top", "value": "text-top" }, 'text-bottom': { "label": "Text Bottom", "value": "text-bottom" }, sub: { "label": "Sub", "value": "sub" }, super: { "label": "Super", "value": "super" }, top: { "label": "Top", "value": "top" }, middle: { "label": "Middle", "value": "middle" }, bottom: { "label": "Bottom", "value": "bottom" }, initial: { "label": "Initial", "value": "initial" }, inherit: { "label": "Inherit", "value": "inherit" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-font" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'verticalAlign'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'verticalAlign'); } else { props.onChange(x.value, 'verticalAlign'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'verticalAlign'); } else { props.onChange(align + ' !important', 'verticalAlign'); } } })); } class PGcssVerticalAlign extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssVerticalAlign); /***/ }), /***/ "./src/components/css-visibility/index.js": /*!************************************************!*\ !*** ./src/components/css-visibility/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { visible: { "label": "visible", "value": "visible" }, hidden: { "label": "hidden", "value": "hidden" }, collapse: { "label": "collapse", "value": "collapse" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-font" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'visibility'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'visibility'); } else { props.onChange(x.value, 'visibility'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'visibility'); } else { props.onChange(align + ' !important', 'visibility'); } } })); } class PGcssVisibility extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssVisibility); /***/ }), /***/ "./src/components/css-white-space/index.js": /*!*************************************************!*\ !*** ./src/components/css-white-space/index.js ***! \*************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { normal: { "label": "normal", "value": "normal" }, nowrap: { "label": "nowrap", "value": "nowrap" }, pre: { "label": "pre", "value": "pre" }, 'pre-line': { "label": "pre-line", "value": "pre-line" }, 'pre-wrap': { "label": "pre-wrap", "value": "pre-wrap" }, 'initial': { "label": "initial", "value": "initial" }, 'inherit': { "label": "inherit", "value": "inherit" } }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? args[props.val].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { onChange(x.value, 'whiteSpace'); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })); } class PGcssWhiteSpace extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssWhiteSpace); /***/ }), /***/ "./src/components/css-width/index.js": /*!*******************************************!*\ !*** ./src/components/css-width/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { label: "PX", value: "px" }, em: { label: "EM", value: "em" }, rem: { label: "REM", value: "rem" }, auto: { label: "AUTO", value: "auto" }, "%": { label: "%", value: "%" }, cm: { label: "CM", value: "cm" }, mm: { label: "MM", value: "mm" }, in: { label: "IN", value: "in" }, pt: { label: "PT", value: "pt" }, pc: { label: "PC", value: "pc" }, ex: { label: "EX", value: "ex" }, ch: { label: "CH", value: "ch" }, vw: { label: "VW", value: "vw" }, vh: { label: "VH", value: "vh" }, vmin: { label: "VMIN", value: "vmin" }, vmax: { label: "VMAX", value: "vmax" } }; if (typeof props.val == "object") { var valZ = props.val.val + props.val.unit; } else { var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? "0px" : props.val; } const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.split(" ")); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); var widthValX = valArgs[0] == undefined || valArgs[0].match(/-?\d+/g) == null ? 0 : valArgs[0].match(/-?\d+/g)[0]; var widthUnitX = valArgs[0] == undefined || valArgs[0].match(/[a-zA-Z%]+/g) == null ? "px" : valArgs[0].match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (widthUnit != "max-content" || widthUnit != "min-content" || widthUnit != "inherit" || widthUnit != "initial" || widthUnit != "revert" || widthUnit != "revert-layer" || widthUnit != "unset") && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-font" }, widthUnit != "auto" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: widthVal.length == 0 || isNaN(widthVal) || props.val.includes("calc") ? "text" : "number", disabled: widthUnit == "auto" || widthUnit == "max-content" || widthUnit == "min-content" || widthUnit == "inherit" || widthUnit == "initial" || widthUnit == "revert" || widthUnit == "revert-layer" || widthUnit == "unset" ? true : false, onChange: newVal => { if (newVal.includes("calc")) { // props.onChange(newVal, "width"); if (isImportant) { props.onChange(newVal + " !important", "width"); } else { props.onChange(newVal, "width"); } return; } setwidthVal(newVal); if (widthUnit == "auto") { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + " !important", "width"); } else { props.onChange(widthUnit, "width"); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + " !important", "width"); } else { props.onChange(newVal + widthUnit, "width"); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `${props.val.includes("calc") ? "hidden" : ""}` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom left", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, unitArgs[widthUnit] == undefined ? "Select..." : unitArgs[widthUnit].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { setwidthUnit(x.value); if (x.value == "auto") { if (isImportant) { props.onChange(x.value + " !important", "width"); } else { props.onChange(x.value, "width"); } } else { if (isImportant) { props.onChange(widthVal + x.value + " !important", "width"); } else { props.onChange(widthVal + x.value, "width"); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important Enabled" : "Important?", checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (props.val.includes("calc")) { // var valX = props.val.replaceAll(" !important", "") // console.log(valX) // props.onChange(newVal, "width"); if (isImportant) { var valX = props.val.replaceAll(" !important", ""); props.onChange(valX, "width"); // props.onChange(props.val + " !important", "width"); } else { // var valX = props.val.replaceAll(" !important", ""); // props.onChange(valX, "width"); props.onChange(props.val + " !important", "width"); } return; } if (isImportant) { if (widthUnit == "auto") { props.onChange(widthUnit, "width"); } else { props.onChange(widthVal + widthUnit, "width"); } } else { if (widthUnit == "auto") { props.onChange(widthUnit + " !important", "width"); } else { props.onChange(widthVal + widthUnit + " !important", "width"); } } } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `${props.val.includes("calc") ? "hidden" : ""}` }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Global Value "), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { label: "", value: widthUnit, options: [{ label: "Choose", value: "px" }, { label: "auto", value: "auto" }, { label: "max-content", value: "max-content" }, { label: "min-content", value: "min-content" }, { label: "Inherit", value: "inherit" }, { label: "Initial", value: "initial" }, { label: "Revert", value: "revert" }, { label: "Revert-layer", value: "revert-layer" }, { label: "Unset", value: "unset" }], onChange: newVal => { setwidthUnit(newVal); if (newVal == "auto" || newVal == "max-content" || newVal == "min-content" || newVal == "inherit" || newVal == "initial" || newVal == "revert" || newVal == "revert-layer" || newVal == "unset") { if (isImportant) { props.onChange(newVal + " !important", "width"); console.log(props.onChange(newVal + " !important", "width")); } else { props.onChange(newVal, "width"); console.log(props.onChange(newVal, "width")); } } else { if (isImportant) { props.onChange(widthVal + newVal + " !important", "width"); console.log(props.onChange(widthVal + newVal + " !important", "width")); } else { props.onChange(widthVal + newVal, "width"); console.log(props.onChange(widthVal + newVal, "width")); } } } })))); } class PGcssWidth extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssWidth); /***/ }), /***/ "./src/components/css-word-break/index.js": /*!************************************************!*\ !*** ./src/components/css-word-break/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { normal: { "label": "normal", "value": "normal" }, 'break-all': { "label": "break-all", "value": "break-all" }, 'keep-all': { "label": "keep-all", "value": "keep-all" }, 'break-word': { "label": "break-word", "value": "break-word" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'wordBreak'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'wordBreak'); } else { props.onChange(x.value, 'wordBreak'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'wordBreak'); } else { props.onChange(align + ' !important', 'wordBreak'); } } })); } class PGcssWordBreak extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssWordBreak); /***/ }), /***/ "./src/components/css-word-spacing/index.js": /*!**************************************************!*\ !*** ./src/components/css-word-spacing/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g) == null ? 0 : valZ.match(/[+-]?([0-9]*[.])?[0-9]+/g)[0]; var widthUnitX = valZ == undefined || valZ.match(/[a-zA-Z%]+/g) == null ? 'px' : valZ.match(/[a-zA-Z%]+/g)[0]; const [widthVal, setwidthVal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthValX); const [widthUnit, setwidthUnit] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(widthUnitX); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex gap-[4px] mt-4 items-center pg-setting-css-components pg-setting-input-text " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthVal, type: "number", onChange: newVal => { setwidthVal(newVal); if (widthUnit == 'auto') { // props.onChange(widthUnit, 'width'); if (isImportant) { props.onChange(widthUnit + ' !important', 'wordSpacing'); } else { props.onChange(widthUnit, 'wordSpacing'); } } else { //props.onChange(newVal + widthUnit, 'width'); if (isImportant) { props.onChange(newVal + widthUnit + ' !important', 'wordSpacing'); } else { props.onChange(newVal + widthUnit, 'wordSpacing'); } } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, props.val ? unitArgs[widthUnit].label : 'Select...')), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(unitArgs).map(y => { var index = y[0]; var x = y[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { setwidthUnit(x.value); if (x.value == 'auto') { if (isImportant) { props.onChange(x.value + ' !important', 'wordSpacing'); } else { props.onChange(x.value, 'wordSpacing'); } } else { if (isImportant) { props.onChange(widthVal + x.value + ' !important', 'wordSpacing'); } else { props.onChange(widthVal + x.value, 'wordSpacing'); } } } }, x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { if (widthUnit == 'auto') { props.onChange(widthUnit, 'wordSpacing'); } else { props.onChange(widthVal + widthUnit, 'wordSpacing'); } } else { if (widthUnit == 'auto') { props.onChange(widthUnit + ' !important', 'wordSpacing'); } else { props.onChange(widthVal + widthUnit + ' !important', 'wordSpacing'); } } } })); } class PGcssWordSpacing extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssWordSpacing); /***/ }), /***/ "./src/components/css-word-wrap/index.js": /*!***********************************************!*\ !*** ./src/components/css-word-wrap/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { 'normal': { "label": "Normal", "value": "normal" }, 'break-word': { "label": "Break word", "value": "break-word" }, 'initial': { "label": "Initial", "value": "initial" }, 'inherit': { "label": "Inherit", "value": "inherit" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? 'Select...' : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: 'px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer', onClick: ev => { // onChange(x.value, 'wordWrap'); setalign(x.value); if (isImportant) { props.onChange(x.value + ' !important', 'wordWrap'); } else { props.onChange(x.value, 'wordWrap'); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important (Enabled)' : 'Important?', checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, 'wordWrap'); } else { props.onChange(align + ' !important', 'wordWrap'); } } })); } class PGcssWordWrap extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssWordWrap); /***/ }), /***/ "./src/components/css-writing-mode/index.js": /*!**************************************************!*\ !*** ./src/components/css-writing-mode/index.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var args = { "horizontal-tb": { label: "horizontal-tb", value: "horizontal-tb" }, "vertical-rl": { label: "vertical-rl", value: "vertical-rl" }, "vertical-lr": { label: "vertical-lr", value: "vertical-lr" } }; const [valArgs, setValArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(props.val.split(" ")); const [align, setalign] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[0]); const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valArgs[1] == undefined ? false : true); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center pg-setting-css-components" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: "bottom", renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Button, { title: "Clear", onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " " }, args[align] == undefined ? "Select..." : args[align].label)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-32 pg-font" }, Object.entries(args).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 border-b block hover:bg-gray-400 cursor-pointer", onClick: ev => { // onChange(x.value, 'writingMode'); setalign(x.value); if (isImportant) { props.onChange(x.value + " !important", "writingMode"); } else { props.onChange(x.value, "writingMode"); } } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Reset"), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, x.label)); })) }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? "Important (Enabled)" : "Important?", checked: isImportant, onChange: arg => { setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(align, "writingMode"); } else { props.onChange(align + " !important", "writingMode"); } } })); } class PGcssWritingMode extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssWritingMode); /***/ }), /***/ "./src/components/css-z-index/index.js": /*!*********************************************!*\ !*** ./src/components/css-z-index/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } var valZ = props.val == null || props.val == undefined || props.val.length == 0 ? '0px' : props.val; var widthValX = valZ == undefined || valZ.match(/-?\d+/g) == null ? 0 : valZ.match(/-?\d+/g)[0]; const [isImportant, setImportant] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(valZ.includes(" !important") ? true : false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: widthValX, type: "number", onChange: newVal => { if (isImportant) { props.onChange(newVal + ' !important', 'zIndex'); } else { props.onChange(newVal, 'zIndex'); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ToggleControl, { help: isImportant ? 'Important Enabled' : 'Important?', checked: isImportant, onChange: arg => { //console.log(arg); setImportant(isImportant => !isImportant); if (isImportant) { props.onChange(widthValX, 'zIndex'); } else { props.onChange(widthValX + ' !important', 'zIndex'); } } })); } class PGcssZIndex extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { val, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: val, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssZIndex); /***/ }), /***/ "./src/components/dropdown-sudo-selector/index.js": /*!********************************************************!*\ !*** ./src/components/dropdown-sudo-selector/index.js ***! \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); function Html(props) { const position = props.position; const obj = props.obj; const variant = props.variant; const options = props.options; const buttonTitle = props.buttonTitle; const onChange = props.onChange; const values = props.values; const value = props.value; const sudoScourceUpdate = props.sudoScourceUpdate; //var sudoScourceArgsLocal = localStorage.getItem('sudoScourceArgs'); //sudoScourceArgsLocal = (sudoScourceArgsLocal != null) ? JSON.parse(sudoScourceArgsLocal) : {}; const [pickerOpen, setPickerOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [keyword, setKeyword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const [filteredOptions, setfilteredOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); const [optionsX, setoptionsX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(options); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { sudoScourceUpdate(optionsX); }, [optionsX]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "", onClick: ev => { setPickerOpen(prev => !prev); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { className: " flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // variant={variant} }, optionsX[value] != undefined ? optionsX[value].label : buttonTitle)), pickerOpen && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Popover, { position: position }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2 w-[260px] pg-font pg-setting-input-text custom-scrollbar " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalInputControl, { autoComplete: "off", className: "p-3 w-full", placeholder: "Search Options", value: keyword, onChange: newVal => { if (newVal.length > 0) { setKeyword(newVal); } if (typeof optionsX == "object") { setfilteredOptions({}); var newOptions = {}; Object.entries(optionsX).map(args => { var index = args[0]; var x = args[1]; let position = x.label.toLowerCase().search(newVal.toLowerCase()); if (position < 0) { x.exclude = true; } else { x.exclude = false; } newOptions[index] = x; }); setfilteredOptions(newOptions); } else { setfilteredOptions([]); var newOptions = []; optionsX.map((x, index) => { let position = x.label.toLowerCase().search(newVal.toLowerCase()); if (position < 0) { x.exclude = true; } else { x.exclude = false; } //newOptions.push(x); }); setfilteredOptions(newOptions); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, keyword.length == 0 && typeof optionsX == "object" && Object.entries(optionsX).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px]" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "flex justify-between items-center" : ""] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "text-gray-400" : ""] }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex items-center gap-2", onClick: ev => { if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { // var sudoScourceArgsLocal = localStorage.getItem('sudoScourceArgs'); //sudoScourceArgsLocal = (sudoScourceArgsLocal != null) ? JSON.parse(sudoScourceArgsLocal) : {}; var sudoId = x.value.replace("(n)", "(" + x.arg + ")"); //sudoScourceArgsLocal[sudoId] = { label: sudoId, value: sudoId, } //localStorage.setItem('sudoScourceArgs', JSON.stringify(sudoScourceArgsLocal)); // var sudoScourceArgsLocalX = localStorage.getItem('sudoScourceArgs'); //console.log(JSON.parse(sudoScourceArgsLocalX)); //localStorage.clear(); //options = JSON.parse(sudoScourceArgsLocalX); //setoptionsX(JSON.parse(sudoScourceArgsLocalX)); onChange(x, index); optionsX[sudoId] = { label: x.label, value: sudoId }; setoptionsX(optionsX); //sudoScourceUpdate(); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, x.label), obj[index] != null && Object.entries(obj[index]).length > 0 ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-text-color font-bold" }, "^") : " ")), x.arg != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-16" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalInputControl, { className: "mr-2", value: x.arg, onChange: newVal => { x.arg = newVal; } })), x.isPro && // <span className="bg-amber-400 rounded-sm px-3 text-white hover:text-white"> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://pickplugins.com/post-grid/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro") // </span> ), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); }), keyword.length == 0 && typeof optionsX == "array" && optionsX.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px]", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex items-center gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, x.label), obj[index] != null && Object.entries(obj[index]).length > 0 ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-text-color font-bold" }, "^") : " ", " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); }), keyword.length > 0 && typeof filteredOptions == "object" && Object.entries(filteredOptions).map(args => { var index = args[0]; var x = args[1]; if (x.exclude == false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px]", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex items-center gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, x.label), obj[index] != null && Object.entries(obj[index]).length > 0 ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-text-color font-bold" }, "^") : " ", " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); } }), keyword.length > 0 && typeof filteredOptions == "array" && filteredOptions.map((x, index) => { if (x.exclude == false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px]", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "flex items-center gap-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, x.label), obj[index] != null && Object.entries(obj[index]).length > 0 ? (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "pg-text-color font-bold" }, "^") : " ", " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); } }), keyword.length > 0 && typeof filteredOptions == "object" && Object.entries(filteredOptions).length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No options found."), keyword.length > 0 && filteredOptions.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No options found."))))); } class PGDropdownSudoSelector extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { position, obj, variant, options, buttonTitle, onChange, values, value, sudoScourceUpdate } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { position: position, obj: obj, variant: variant, options: options, buttonTitle: buttonTitle, onChange: onChange, values: values, value: value, sudoScourceUpdate: sudoScourceUpdate, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGDropdownSudoSelector); /***/ }), /***/ "./src/components/dropdown/index.js": /*!******************************************!*\ !*** ./src/components/dropdown/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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__); function Html(props) { if (!props.warn) { return null; } const [pickerOpen, setPickerOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [keyword, setKeyword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(""); const [filteredOptions, setfilteredOptions] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); var position = props.position; var variant = props.variant; var btnClass = props.btnClass; var options = props.options; var buttonTitle = props.buttonTitle; var value = props.value == undefined ? "" : props.value; var onChange = props.onChange; function isNumeric(n) { return !isNaN(parseFloat(n)) && isFinite(n); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "", onClick: ev => { setPickerOpen(prev => !prev); } }, typeof value == "string" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { className: `${btnClass} pg-font flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700` // variant={variant} }, options[value] != undefined ? options[value].label : buttonTitle), typeof value != "string" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { className: `${btnClass} pg-font flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700` // variant={variant} }, buttonTitle)), pickerOpen && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Popover, { position: position }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "p-2 w-[300px] pg-font pg-setting-input-text custom-scrollbar\t" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalInputControl, { autoComplete: "off", className: "p-3 w-full", placeholder: props.searchPlaceholder == undefined ? "Search..." : props.searchPlaceholder, value: keyword, onChange: newVal => { var newValX = newVal.replace(/[^a-zA-Z ]/g, ""); if (newValX.length > 0) { setKeyword(newValX); } if (typeof options == "object") { setfilteredOptions({}); var newOptions = {}; Object.entries(options).map(args => { var index = args[0]; var x = args[1]; let position = x.label.toLowerCase().search(newValX.toLowerCase()); if (position < 0) { x.exclude = true; } else { x.exclude = false; } newOptions[index] = x; }); setfilteredOptions(newOptions); } else { setfilteredOptions([]); var newOptions = []; options.map((x, index) => { let position = x.label.toLowerCase().search(newValX.toLowerCase()); if (position < 0) { x.exclude = true; } else { x.exclude = false; } //newOptions.push(x); }); setfilteredOptions(newOptions); } } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, keyword.length == 0 && typeof options == "object" && Object.entries(options).map(args => { var index = args[0]; var x = args[1]; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [typeof value == "object" && value.includes(isNumeric(index) ? parseInt(index) : index) ? "border-b cursor-pointer bg-slate-200 p-2 block" : "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] "], onClick: ev => { if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "text-gray-400" : ""] }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label)), x.isPro && // <span className="pg-bg-color rounded-sm px-3 py-1 no-underline text-white hover:text-white"> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro") // </span> ), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); }), keyword.length == 0 && typeof options == "array" && options.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [typeof value == "object" && value.includes(IsNumeric(index) ? parseInt(index) : index) ? "border-b cursor-pointer bg-slate-200 p-2 block" : "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] "], onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "text-gray-400" : ""] }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label, " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); }), keyword.length > 0 && typeof filteredOptions == "object" && Object.entries(filteredOptions).map(args => { var index = args[0]; var x = args[1]; if (x.exclude == false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] ", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "text-gray-400" : ""] }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label, " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); } }), keyword.length > 0 && typeof filteredOptions == "array" && filteredOptions.map((x, index) => { if (x.exclude == false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "border-b border-b-gray-800/20 hover:border-b-gray-800 transition-all duration-200 ease-in-out border-transparent border-solid cursor-pointer hover:bg-slate-200 p-2 block last-of-type:border-b-0 min-h-[40px] ", onClick: ev => { //onChange(x, index) if (x.isPro == true) { alert("Sorry this feature only available in pro"); } else { onChange(x, index); } } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "flex justify-between items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: [x.isPro ? "text-gray-400" : ""] }, x.icon != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.RawHTML, null, x.icon)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: "" }, x.label, " ")), x.isPro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("a", { target: "_blank", href: "https://getpostgrid.com/pricing/?utm_source=dropdownComponent&utm_term=proFeature&utm_campaign=pluginPostGrid&utm_medium=" + x.label, className: "pg-bg-color rounded-sm px-3 inline-block cursor-pointer py-1 no-underline text-white hover:text-white" }, "Pro")), x.description != undefined && x.description.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-xs text-slate-400" }, x.description)); } }), keyword.length > 0 && typeof filteredOptions == "object" && Object.entries(filteredOptions).length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No options found."), keyword.length > 0 && filteredOptions.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No options found."))))); } class PGDropdown extends _wordpress_element__WEBPACK_IMPORTED_MODULE_1__.Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { position, variant, btnClass, searchPlaceholder, options, //[{"label":"Select..","icon":"","value":""}] buttonTitle, onChange, values, value } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { value: value, position: position, searchPlaceholder: searchPlaceholder, btnClass: btnClass, variant: variant, options: options, buttonTitle: buttonTitle, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGDropdown); /***/ }), /***/ "./src/components/global-styles/index.js": /*!***********************************************!*\ !*** ./src/components/global-styles/index.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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 _components_styles__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); const { Component } = wp.element; var myStore = wp.data.select('postgrid-shop'); function Html(props) { if (!props.warn) { return null; } const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [globalCssObj, setglobalCssObj] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({}); var [breakPointX, setBreakPointX] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(myStore.getBreakPoint()); //var [debounce, setDebounce] = useState(null); // Using the hook. //var [keyframesX, setkeyframesX] = useState(props.keyframes); // Using the hook. (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { var cssObj = {}; props.args.map(item => { Object.entries(item).map(arg => { var sudoSrc = arg[0]; var sudoArgs = arg[1]; if (sudoSrc != 'options' && sudoArgs != null) { var selector = myStore.getElementSelector(sudoSrc, item.options.selector); var elemetnCssObj = myStore.generateElementCss(item, selector); Object.entries(arg[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (cssObj[selector] == undefined) { cssObj[selector] = {}; } if (cssObj[selector][cssPropty] == undefined) { cssObj[selector][cssPropty] = {}; } cssObj[selector][cssPropty] = x[1]; }); } }); // if (globalCssObj[elementSelector] == undefined) { // globalCssObj[elementSelector] = {}; // } // var cssPath = [elementSelector, cssPropty, breakPointX] // const cssObject = myStore.updatePropertyDeep(globalCssObj, cssPath, newVal) //setglobalCssObj(cssObject) }); myStore.generateBlockCss(cssObj, 'global-css', ''); }, [globalCssObj]); function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var path = [sudoScource, attr, breakPointX]; let objX = Object.assign({}, obj); const itemX = myStore.updatePropertyDeep(objX, path, newVal); props.args[extra.index] = itemX; props.onChange(props.args); var elementSelector = myStore.getElementSelector(sudoScource, obj.options.selector); var cssPropty = myStore.cssAttrParse(attr); if (globalCssObj[elementSelector] == undefined) { globalCssObj[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, breakPointX]; const cssObject = myStore.updatePropertyDeep(globalCssObj, cssPath, newVal); setglobalCssObj(cssObject); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var itemX = myStore.deletePropertyDeep(obj, [sudoScource, key, breakPointX]); props.args[extra.index] = itemX; props.onChange(props.args); var elementSelector = myStore.getElementSelector(sudoScource, obj.options.selector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(globalCssObj, [elementSelector, cssPropty, breakPointX]); setglobalCssObj(cssObject); } function onAddStyleItem(sudoScource, key, obj, extra) { const itemX = myStore.onAddStyleItem(sudoScource, key, obj); props.args[extra.index] = itemX; props.onChange(props.args); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "" }, props.args != undefined && props.args.map((item, index) => { //var itemIndex = item[0]; //var itemArgs = item[1]; var options = item.options; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelBody, { title: options.selector, initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalInputControl, { className: "my-3", label: "", help: "", placeholder: ".element-class or #element-id", value: options.selector, onChange: value => { // setopenAi({ ...openAi, promt: value }) //item.options.selector = value // props.args[index].options.selector = value props.args[index].options.selector = value; props.onChange(props.args); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_2__["default"], { extra: { index: index }, obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem })); })); } class PGGlobalStyles extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { args, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { args: args, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGGlobalStyles); /***/ }), /***/ "./src/components/icon-picker/bootstrap-icons.js": /*!*******************************************************!*\ !*** ./src/components/icon-picker/bootstrap-icons.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const bootstrapIcons = ['bi-123', 'bi-alarm-fill', 'bi-alarm', 'bi-align-bottom', 'bi-align-center', 'bi-align-end', 'bi-align-middle', 'bi-align-start', 'bi-align-top', 'bi-alt', 'bi-app-indicator', 'bi-app', 'bi-archive-fill', 'bi-archive', 'bi-arrow-90deg-down', 'bi-arrow-90deg-left', 'bi-arrow-90deg-right', 'bi-arrow-90deg-up', 'bi-arrow-bar-down', 'bi-arrow-bar-left', 'bi-arrow-bar-right', 'bi-arrow-bar-up', 'bi-arrow-clockwise', 'bi-arrow-counterclockwise', 'bi-arrow-down-circle-fill', 'bi-arrow-down-circle', 'bi-arrow-down-left-circle-fill', 'bi-arrow-down-left-circle', 'bi-arrow-down-left-square-fill', 'bi-arrow-down-left-square', 'bi-arrow-down-left', 'bi-arrow-down-right-circle-fill', 'bi-arrow-down-right-circle', 'bi-arrow-down-right-square-fill', 'bi-arrow-down-right-square', 'bi-arrow-down-right', 'bi-arrow-down-short', 'bi-arrow-down-square-fill', 'bi-arrow-down-square', 'bi-arrow-down-up', 'bi-arrow-down', 'bi-arrow-left-circle-fill', 'bi-arrow-left-circle', 'bi-arrow-left-right', 'bi-arrow-left-short', 'bi-arrow-left-square-fill', 'bi-arrow-left-square', 'bi-arrow-left', 'bi-arrow-repeat', 'bi-arrow-return-left', 'bi-arrow-return-right', 'bi-arrow-right-circle-fill', 'bi-arrow-right-circle', 'bi-arrow-right-short', 'bi-arrow-right-square-fill', 'bi-arrow-right-square', 'bi-arrow-right', 'bi-arrow-up-circle-fill', 'bi-arrow-up-circle', 'bi-arrow-up-left-circle-fill', 'bi-arrow-up-left-circle', 'bi-arrow-up-left-square-fill', 'bi-arrow-up-left-square', 'bi-arrow-up-left', 'bi-arrow-up-right-circle-fill', 'bi-arrow-up-right-circle', 'bi-arrow-up-right-square-fill', 'bi-arrow-up-right-square', 'bi-arrow-up-right', 'bi-arrow-up-short', 'bi-arrow-up-square-fill', 'bi-arrow-up-square', 'bi-arrow-up', 'bi-arrows-angle-contract', 'bi-arrows-angle-expand', 'bi-arrows-collapse', 'bi-arrows-expand', 'bi-arrows-fullscreen', 'bi-arrows-move', 'bi-aspect-ratio-fill', 'bi-aspect-ratio', 'bi-asterisk', 'bi-at', 'bi-award-fill', 'bi-award', 'bi-back', 'bi-backspace-fill', 'bi-backspace-reverse-fill', 'bi-backspace-reverse', 'bi-backspace', 'bi-badge-3d-fill', 'bi-badge-3d', 'bi-badge-4k-fill', 'bi-badge-4k', 'bi-badge-8k-fill', 'bi-badge-8k', 'bi-badge-ad-fill', 'bi-badge-ad', 'bi-badge-ar-fill', 'bi-badge-ar', 'bi-badge-cc-fill', 'bi-badge-cc', 'bi-badge-hd-fill', 'bi-badge-hd', 'bi-badge-tm-fill', 'bi-badge-tm', 'bi-badge-vo-fill', 'bi-badge-vo', 'bi-badge-vr-fill', 'bi-badge-vr', 'bi-badge-wc-fill', 'bi-badge-wc', 'bi-bag-check-fill', 'bi-bag-check', 'bi-bag-dash-fill', 'bi-bag-dash', 'bi-bag-fill', 'bi-bag-plus-fill', 'bi-bag-plus', 'bi-bag-x-fill', 'bi-bag-x', 'bi-bag', 'bi-bar-chart-fill', 'bi-bar-chart-line-fill', 'bi-bar-chart-line', 'bi-bar-chart-steps', 'bi-bar-chart', 'bi-basket-fill', 'bi-basket', 'bi-basket2-fill', 'bi-basket2', 'bi-basket3-fill', 'bi-basket3', 'bi-battery-charging', 'bi-battery-full', 'bi-battery-half', 'bi-battery', 'bi-bell-fill', 'bi-bell', 'bi-bezier', 'bi-bezier2', 'bi-bicycle', 'bi-binoculars-fill', 'bi-binoculars', 'bi-blockquote-left', 'bi-blockquote-right', 'bi-book-fill', 'bi-book-half', 'bi-book', 'bi-bookmark-check-fill', 'bi-bookmark-check', 'bi-bookmark-dash-fill', 'bi-bookmark-dash', 'bi-bookmark-fill', 'bi-bookmark-heart-fill', 'bi-bookmark-heart', 'bi-bookmark-plus-fill', 'bi-bookmark-plus', 'bi-bookmark-star-fill', 'bi-bookmark-star', 'bi-bookmark-x-fill', 'bi-bookmark-x', 'bi-bookmark', 'bi-bookmarks-fill', 'bi-bookmarks', 'bi-bookshelf', 'bi-bootstrap-fill', 'bi-bootstrap-reboot', 'bi-bootstrap', 'bi-border-all', 'bi-border-bottom', 'bi-border-center', 'bi-border-inner', 'bi-border-left', 'bi-border-middle', 'bi-border-outer', 'bi-border-right', 'bi-border-style', 'bi-border-top', 'bi-border-width', 'bi-border', 'bi-bounding-box-circles', 'bi-bounding-box', 'bi-box-arrow-down-left', 'bi-box-arrow-down-right', 'bi-box-arrow-down', 'bi-box-arrow-in-down-left', 'bi-box-arrow-in-down-right', 'bi-box-arrow-in-down', 'bi-box-arrow-in-left', 'bi-box-arrow-in-right', 'bi-box-arrow-in-up-left', 'bi-box-arrow-in-up-right', 'bi-box-arrow-in-up', 'bi-box-arrow-left', 'bi-box-arrow-right', 'bi-box-arrow-up-left', 'bi-box-arrow-up-right', 'bi-box-arrow-up', 'bi-box-seam', 'bi-box', 'bi-braces', 'bi-bricks', 'bi-briefcase-fill', 'bi-briefcase', 'bi-brightness-alt-high-fill', 'bi-brightness-alt-high', 'bi-brightness-alt-low-fill', 'bi-brightness-alt-low', 'bi-brightness-high-fill', 'bi-brightness-high', 'bi-brightness-low-fill', 'bi-brightness-low', 'bi-broadcast-pin', 'bi-broadcast', 'bi-brush-fill', 'bi-brush', 'bi-bucket-fill', 'bi-bucket', 'bi-bug-fill', 'bi-bug', 'bi-building', 'bi-bullseye', 'bi-calculator-fill', 'bi-calculator', 'bi-calendar-check-fill', 'bi-calendar-check', 'bi-calendar-date-fill', 'bi-calendar-date', 'bi-calendar-day-fill', 'bi-calendar-day', 'bi-calendar-event-fill', 'bi-calendar-event', 'bi-calendar-fill', 'bi-calendar-minus-fill', 'bi-calendar-minus', 'bi-calendar-month-fill', 'bi-calendar-month', 'bi-calendar-plus-fill', 'bi-calendar-plus', 'bi-calendar-range-fill', 'bi-calendar-range', 'bi-calendar-week-fill', 'bi-calendar-week', 'bi-calendar-x-fill', 'bi-calendar-x', 'bi-calendar', 'bi-calendar2-check-fill', 'bi-calendar2-check', 'bi-calendar2-date-fill', 'bi-calendar2-date', 'bi-calendar2-day-fill', 'bi-calendar2-day', 'bi-calendar2-event-fill', 'bi-calendar2-event', 'bi-calendar2-fill', 'bi-calendar2-minus-fill', 'bi-calendar2-minus', 'bi-calendar2-month-fill', 'bi-calendar2-month', 'bi-calendar2-plus-fill', 'bi-calendar2-plus', 'bi-calendar2-range-fill', 'bi-calendar2-range', 'bi-calendar2-week-fill', 'bi-calendar2-week', 'bi-calendar2-x-fill', 'bi-calendar2-x', 'bi-calendar2', 'bi-calendar3-event-fill', 'bi-calendar3-event', 'bi-calendar3-fill', 'bi-calendar3-range-fill', 'bi-calendar3-range', 'bi-calendar3-week-fill', 'bi-calendar3-week', 'bi-calendar3', 'bi-calendar4-event', 'bi-calendar4-range', 'bi-calendar4-week', 'bi-calendar4', 'bi-camera-fill', 'bi-camera-reels-fill', 'bi-camera-reels', 'bi-camera-video-fill', 'bi-camera-video-off-fill', 'bi-camera-video-off', 'bi-camera-video', 'bi-camera', 'bi-camera2', 'bi-capslock-fill', 'bi-capslock', 'bi-card-checklist', 'bi-card-heading', 'bi-card-image', 'bi-card-list', 'bi-card-text', 'bi-caret-down-fill', 'bi-caret-down-square-fill', 'bi-caret-down-square', 'bi-caret-down', 'bi-caret-left-fill', 'bi-caret-left-square-fill', 'bi-caret-left-square', 'bi-caret-left', 'bi-caret-right-fill', 'bi-caret-right-square-fill', 'bi-caret-right-square', 'bi-caret-right', 'bi-caret-up-fill', 'bi-caret-up-square-fill', 'bi-caret-up-square', 'bi-caret-up', 'bi-cart-check-fill', 'bi-cart-check', 'bi-cart-dash-fill', 'bi-cart-dash', 'bi-cart-fill', 'bi-cart-plus-fill', 'bi-cart-plus', 'bi-cart-x-fill', 'bi-cart-x', 'bi-cart', 'bi-cart2', 'bi-cart3', 'bi-cart4', 'bi-cash-stack', 'bi-cash', 'bi-cast', 'bi-chat-dots-fill', 'bi-chat-dots', 'bi-chat-fill', 'bi-chat-left-dots-fill', 'bi-chat-left-dots', 'bi-chat-left-fill', 'bi-chat-left-quote-fill', 'bi-chat-left-quote', 'bi-chat-left-text-fill', 'bi-chat-left-text', 'bi-chat-left', 'bi-chat-quote-fill', 'bi-chat-quote', 'bi-chat-right-dots-fill', 'bi-chat-right-dots', 'bi-chat-right-fill', 'bi-chat-right-quote-fill', 'bi-chat-right-quote', 'bi-chat-right-text-fill', 'bi-chat-right-text', 'bi-chat-right', 'bi-chat-square-dots-fill', 'bi-chat-square-dots', 'bi-chat-square-fill', 'bi-chat-square-quote-fill', 'bi-chat-square-quote', 'bi-chat-square-text-fill', 'bi-chat-square-text', 'bi-chat-square', 'bi-chat-text-fill', 'bi-chat-text', 'bi-chat', 'bi-check-all', 'bi-check-circle-fill', 'bi-check-circle', 'bi-check-square-fill', 'bi-check-square', 'bi-check', 'bi-check2-all', 'bi-check2-circle', 'bi-check2-square', 'bi-check2', 'bi-chevron-bar-contract', 'bi-chevron-bar-down', 'bi-chevron-bar-expand', 'bi-chevron-bar-left', 'bi-chevron-bar-right', 'bi-chevron-bar-up', 'bi-chevron-compact-down', 'bi-chevron-compact-left', 'bi-chevron-compact-right', 'bi-chevron-compact-up', 'bi-chevron-contract', 'bi-chevron-double-down', 'bi-chevron-double-left', 'bi-chevron-double-right', 'bi-chevron-double-up', 'bi-chevron-down', 'bi-chevron-expand', 'bi-chevron-left', 'bi-chevron-right', 'bi-chevron-up', 'bi-circle-fill', 'bi-circle-half', 'bi-circle-square', 'bi-circle', 'bi-clipboard-check', 'bi-clipboard-data', 'bi-clipboard-minus', 'bi-clipboard-plus', 'bi-clipboard-x', 'bi-clipboard', 'bi-clock-fill', 'bi-clock-history', 'bi-clock', 'bi-cloud-arrow-down-fill', 'bi-cloud-arrow-down', 'bi-cloud-arrow-up-fill', 'bi-cloud-arrow-up', 'bi-cloud-check-fill', 'bi-cloud-check', 'bi-cloud-download-fill', 'bi-cloud-download', 'bi-cloud-drizzle-fill', 'bi-cloud-drizzle', 'bi-cloud-fill', 'bi-cloud-fog-fill', 'bi-cloud-fog', 'bi-cloud-fog2-fill', 'bi-cloud-fog2', 'bi-cloud-hail-fill', 'bi-cloud-hail', 'bi-cloud-haze-1', 'bi-cloud-haze-fill', 'bi-cloud-haze', 'bi-cloud-haze2-fill', 'bi-cloud-lightning-fill', 'bi-cloud-lightning-rain-fill', 'bi-cloud-lightning-rain', 'bi-cloud-lightning', 'bi-cloud-minus-fill', 'bi-cloud-minus', 'bi-cloud-moon-fill', 'bi-cloud-moon', 'bi-cloud-plus-fill', 'bi-cloud-plus', 'bi-cloud-rain-fill', 'bi-cloud-rain-heavy-fill', 'bi-cloud-rain-heavy', 'bi-cloud-rain', 'bi-cloud-slash-fill', 'bi-cloud-slash', 'bi-cloud-sleet-fill', 'bi-cloud-sleet', 'bi-cloud-snow-fill', 'bi-cloud-snow', 'bi-cloud-sun-fill', 'bi-cloud-sun', 'bi-cloud-upload-fill', 'bi-cloud-upload', 'bi-cloud', 'bi-clouds-fill', 'bi-clouds', 'bi-cloudy-fill', 'bi-cloudy', 'bi-code-slash', 'bi-code-square', 'bi-code', 'bi-collection-fill', 'bi-collection-play-fill', 'bi-collection-play', 'bi-collection', 'bi-columns-gap', 'bi-columns', 'bi-command', 'bi-compass-fill', 'bi-compass', 'bi-cone-striped', 'bi-cone', 'bi-controller', 'bi-cpu-fill', 'bi-cpu', 'bi-credit-card-2-back-fill', 'bi-credit-card-2-back', 'bi-credit-card-2-front-fill', 'bi-credit-card-2-front', 'bi-credit-card-fill', 'bi-credit-card', 'bi-crop', 'bi-cup-fill', 'bi-cup-straw', 'bi-cup', 'bi-cursor-fill', 'bi-cursor-text', 'bi-cursor', 'bi-dash-circle-dotted', 'bi-dash-circle-fill', 'bi-dash-circle', 'bi-dash-square-dotted', 'bi-dash-square-fill', 'bi-dash-square', 'bi-dash', 'bi-diagram-2-fill', 'bi-diagram-2', 'bi-diagram-3-fill', 'bi-diagram-3', 'bi-diamond-fill', 'bi-diamond-half', 'bi-diamond', 'bi-dice-1-fill', 'bi-dice-1', 'bi-dice-2-fill', 'bi-dice-2', 'bi-dice-3-fill', 'bi-dice-3', 'bi-dice-4-fill', 'bi-dice-4', 'bi-dice-5-fill', 'bi-dice-5', 'bi-dice-6-fill', 'bi-dice-6', 'bi-disc-fill', 'bi-disc', 'bi-discord', 'bi-display-fill', 'bi-display', 'bi-distribute-horizontal', 'bi-distribute-vertical', 'bi-door-closed-fill', 'bi-door-closed', 'bi-door-open-fill', 'bi-door-open', 'bi-dot', 'bi-download', 'bi-droplet-fill', 'bi-droplet-half', 'bi-droplet', 'bi-earbuds', 'bi-easel-fill', 'bi-easel', 'bi-egg-fill', 'bi-egg-fried', 'bi-egg', 'bi-eject-fill', 'bi-eject', 'bi-emoji-angry-fill', 'bi-emoji-angry', 'bi-emoji-dizzy-fill', 'bi-emoji-dizzy', 'bi-emoji-expressionless-fill', 'bi-emoji-expressionless', 'bi-emoji-frown-fill', 'bi-emoji-frown', 'bi-emoji-heart-eyes-fill', 'bi-emoji-heart-eyes', 'bi-emoji-laughing-fill', 'bi-emoji-laughing', 'bi-emoji-neutral-fill', 'bi-emoji-neutral', 'bi-emoji-smile-fill', 'bi-emoji-smile-upside-down-fill', 'bi-emoji-smile-upside-down', 'bi-emoji-smile', 'bi-emoji-sunglasses-fill', 'bi-emoji-sunglasses', 'bi-emoji-wink-fill', 'bi-emoji-wink', 'bi-envelope-fill', 'bi-envelope-open-fill', 'bi-envelope-open', 'bi-envelope', 'bi-eraser-fill', 'bi-eraser', 'bi-exclamation-circle-fill', 'bi-exclamation-circle', 'bi-exclamation-diamond-fill', 'bi-exclamation-diamond', 'bi-exclamation-octagon-fill', 'bi-exclamation-octagon', 'bi-exclamation-square-fill', 'bi-exclamation-square', 'bi-exclamation-triangle-fill', 'bi-exclamation-triangle', 'bi-exclamation', 'bi-exclude', 'bi-eye-fill', 'bi-eye-slash-fill', 'bi-eye-slash', 'bi-eye', 'bi-eyedropper', 'bi-eyeglasses', 'bi-facebook', 'bi-file-arrow-down-fill', 'bi-file-arrow-down', 'bi-file-arrow-up-fill', 'bi-file-arrow-up', 'bi-file-bar-graph-fill', 'bi-file-bar-graph', 'bi-file-binary-fill', 'bi-file-binary', 'bi-file-break-fill', 'bi-file-break', 'bi-file-check-fill', 'bi-file-check', 'bi-file-code-fill', 'bi-file-code', 'bi-file-diff-fill', 'bi-file-diff', 'bi-file-earmark-arrow-down-fill', 'bi-file-earmark-arrow-down', 'bi-file-earmark-arrow-up-fill', 'bi-file-earmark-arrow-up', 'bi-file-earmark-bar-graph-fill', 'bi-file-earmark-bar-graph', 'bi-file-earmark-binary-fill', 'bi-file-earmark-binary', 'bi-file-earmark-break-fill', 'bi-file-earmark-break', 'bi-file-earmark-check-fill', 'bi-file-earmark-check', 'bi-file-earmark-code-fill', 'bi-file-earmark-code', 'bi-file-earmark-diff-fill', 'bi-file-earmark-diff', 'bi-file-earmark-easel-fill', 'bi-file-earmark-easel', 'bi-file-earmark-excel-fill', 'bi-file-earmark-excel', 'bi-file-earmark-fill', 'bi-file-earmark-font-fill', 'bi-file-earmark-font', 'bi-file-earmark-image-fill', 'bi-file-earmark-image', 'bi-file-earmark-lock-fill', 'bi-file-earmark-lock', 'bi-file-earmark-lock2-fill', 'bi-file-earmark-lock2', 'bi-file-earmark-medical-fill', 'bi-file-earmark-medical', 'bi-file-earmark-minus-fill', 'bi-file-earmark-minus', 'bi-file-earmark-music-fill', 'bi-file-earmark-music', 'bi-file-earmark-person-fill', 'bi-file-earmark-person', 'bi-file-earmark-play-fill', 'bi-file-earmark-play', 'bi-file-earmark-plus-fill', 'bi-file-earmark-plus', 'bi-file-earmark-post-fill', 'bi-file-earmark-post', 'bi-file-earmark-ppt-fill', 'bi-file-earmark-ppt', 'bi-file-earmark-richtext-fill', 'bi-file-earmark-richtext', 'bi-file-earmark-ruled-fill', 'bi-file-earmark-ruled', 'bi-file-earmark-slides-fill', 'bi-file-earmark-slides', 'bi-file-earmark-spreadsheet-fill', 'bi-file-earmark-spreadsheet', 'bi-file-earmark-text-fill', 'bi-file-earmark-text', 'bi-file-earmark-word-fill', 'bi-file-earmark-word', 'bi-file-earmark-x-fill', 'bi-file-earmark-x', 'bi-file-earmark-zip-fill', 'bi-file-earmark-zip', 'bi-file-earmark', 'bi-file-easel-fill', 'bi-file-easel', 'bi-file-excel-fill', 'bi-file-excel', 'bi-file-fill', 'bi-file-font-fill', 'bi-file-font', 'bi-file-image-fill', 'bi-file-image', 'bi-file-lock-fill', 'bi-file-lock', 'bi-file-lock2-fill', 'bi-file-lock2', 'bi-file-medical-fill', 'bi-file-medical', 'bi-file-minus-fill', 'bi-file-minus', 'bi-file-music-fill', 'bi-file-music', 'bi-file-person-fill', 'bi-file-person', 'bi-file-play-fill', 'bi-file-play', 'bi-file-plus-fill', 'bi-file-plus', 'bi-file-post-fill', 'bi-file-post', 'bi-file-ppt-fill', 'bi-file-ppt', 'bi-file-richtext-fill', 'bi-file-richtext', 'bi-file-ruled-fill', 'bi-file-ruled', 'bi-file-slides-fill', 'bi-file-slides', 'bi-file-spreadsheet-fill', 'bi-file-spreadsheet', 'bi-file-text-fill', 'bi-file-text', 'bi-file-word-fill', 'bi-file-word', 'bi-file-x-fill', 'bi-file-x', 'bi-file-zip-fill', 'bi-file-zip', 'bi-file', 'bi-files-alt', 'bi-files', 'bi-film', 'bi-filter-circle-fill', 'bi-filter-circle', 'bi-filter-left', 'bi-filter-right', 'bi-filter-square-fill', 'bi-filter-square', 'bi-filter', 'bi-flag-fill', 'bi-flag', 'bi-flower1', 'bi-flower2', 'bi-flower3', 'bi-folder-check', 'bi-folder-fill', 'bi-folder-minus', 'bi-folder-plus', 'bi-folder-symlink-fill', 'bi-folder-symlink', 'bi-folder-x', 'bi-folder', 'bi-folder2-open', 'bi-folder2', 'bi-fonts', 'bi-forward-fill', 'bi-forward', 'bi-front', 'bi-fullscreen-exit', 'bi-fullscreen', 'bi-funnel-fill', 'bi-funnel', 'bi-gear-fill', 'bi-gear-wide-connected', 'bi-gear-wide', 'bi-gear', 'bi-gem', 'bi-geo-alt-fill', 'bi-geo-alt', 'bi-geo-fill', 'bi-geo', 'bi-gift-fill', 'bi-gift', 'bi-github', 'bi-globe', 'bi-globe2', 'bi-google', 'bi-graph-down', 'bi-graph-up', 'bi-grid-1x2-fill', 'bi-grid-1x2', 'bi-grid-3x2-gap-fill', 'bi-grid-3x2-gap', 'bi-grid-3x2', 'bi-grid-3x3-gap-fill', 'bi-grid-3x3-gap', 'bi-grid-3x3', 'bi-grid-fill', 'bi-grid', 'bi-grip-horizontal', 'bi-grip-vertical', 'bi-hammer', 'bi-hand-index-fill', 'bi-hand-index-thumb-fill', 'bi-hand-index-thumb', 'bi-hand-index', 'bi-hand-thumbs-down-fill', 'bi-hand-thumbs-down', 'bi-hand-thumbs-up-fill', 'bi-hand-thumbs-up', 'bi-handbag-fill', 'bi-handbag', 'bi-hash', 'bi-hdd-fill', 'bi-hdd-network-fill', 'bi-hdd-network', 'bi-hdd-rack-fill', 'bi-hdd-rack', 'bi-hdd-stack-fill', 'bi-hdd-stack', 'bi-hdd', 'bi-headphones', 'bi-headset', 'bi-heart-fill', 'bi-heart-half', 'bi-heart', 'bi-heptagon-fill', 'bi-heptagon-half', 'bi-heptagon', 'bi-hexagon-fill', 'bi-hexagon-half', 'bi-hexagon', 'bi-hourglass-bottom', 'bi-hourglass-split', 'bi-hourglass-top', 'bi-hourglass', 'bi-house-door-fill', 'bi-house-door', 'bi-house-fill', 'bi-house', 'bi-hr', 'bi-hurricane', 'bi-image-alt', 'bi-image-fill', 'bi-image', 'bi-images', 'bi-inbox-fill', 'bi-inbox', 'bi-inboxes-fill', 'bi-inboxes', 'bi-info-circle-fill', 'bi-info-circle', 'bi-info-square-fill', 'bi-info-square', 'bi-info', 'bi-input-cursor-text', 'bi-input-cursor', 'bi-instagram', 'bi-intersect', 'bi-journal-album', 'bi-journal-arrow-down', 'bi-journal-arrow-up', 'bi-journal-bookmark-fill', 'bi-journal-bookmark', 'bi-journal-check', 'bi-journal-code', 'bi-journal-medical', 'bi-journal-minus', 'bi-journal-plus', 'bi-journal-richtext', 'bi-journal-text', 'bi-journal-x', 'bi-journal', 'bi-journals', 'bi-joystick', 'bi-justify-left', 'bi-justify-right', 'bi-justify', 'bi-kanban-fill', 'bi-kanban', 'bi-key-fill', 'bi-key', 'bi-keyboard-fill', 'bi-keyboard', 'bi-ladder', 'bi-lamp-fill', 'bi-lamp', 'bi-laptop-fill', 'bi-laptop', 'bi-layer-backward', 'bi-layer-forward', 'bi-layers-fill', 'bi-layers-half', 'bi-layers', 'bi-layout-sidebar-inset-reverse', 'bi-layout-sidebar-inset', 'bi-layout-sidebar-reverse', 'bi-layout-sidebar', 'bi-layout-split', 'bi-layout-text-sidebar-reverse', 'bi-layout-text-sidebar', 'bi-layout-text-window-reverse', 'bi-layout-text-window', 'bi-layout-three-columns', 'bi-layout-wtf', 'bi-life-preserver', 'bi-lightbulb-fill', 'bi-lightbulb-off-fill', 'bi-lightbulb-off', 'bi-lightbulb', 'bi-lightning-charge-fill', 'bi-lightning-charge', 'bi-lightning-fill', 'bi-lightning', 'bi-link-45deg', 'bi-link', 'bi-linkedin', 'bi-list-check', 'bi-list-nested', 'bi-list-ol', 'bi-list-stars', 'bi-list-task', 'bi-list-ul', 'bi-list', 'bi-lock-fill', 'bi-lock', 'bi-mailbox', 'bi-mailbox2', 'bi-map-fill', 'bi-map', 'bi-markdown-fill', 'bi-markdown', 'bi-mask', 'bi-megaphone-fill', 'bi-megaphone', 'bi-menu-app-fill', 'bi-menu-app', 'bi-menu-button-fill', 'bi-menu-button-wide-fill', 'bi-menu-button-wide', 'bi-menu-button', 'bi-menu-down', 'bi-menu-up', 'bi-mic-fill', 'bi-mic-mute-fill', 'bi-mic-mute', 'bi-mic', 'bi-minecart-loaded', 'bi-minecart', 'bi-moisture', 'bi-moon-fill', 'bi-moon-stars-fill', 'bi-moon-stars', 'bi-moon', 'bi-mouse-fill', 'bi-mouse', 'bi-mouse2-fill', 'bi-mouse2', 'bi-mouse3-fill', 'bi-mouse3', 'bi-music-note-beamed', 'bi-music-note-list', 'bi-music-note', 'bi-music-player-fill', 'bi-music-player', 'bi-newspaper', 'bi-node-minus-fill', 'bi-node-minus', 'bi-node-plus-fill', 'bi-node-plus', 'bi-nut-fill', 'bi-nut', 'bi-octagon-fill', 'bi-octagon-half', 'bi-octagon', 'bi-option', 'bi-outlet', 'bi-paint-bucket', 'bi-palette-fill', 'bi-palette', 'bi-palette2', 'bi-paperclip', 'bi-paragraph', 'bi-patch-check-fill', 'bi-patch-check', 'bi-patch-exclamation-fill', 'bi-patch-exclamation', 'bi-patch-minus-fill', 'bi-patch-minus', 'bi-patch-plus-fill', 'bi-patch-plus', 'bi-patch-question-fill', 'bi-patch-question', 'bi-pause-btn-fill', 'bi-pause-btn', 'bi-pause-circle-fill', 'bi-pause-circle', 'bi-pause-fill', 'bi-pause', 'bi-peace-fill', 'bi-peace', 'bi-pen-fill', 'bi-pen', 'bi-pencil-fill', 'bi-pencil-square', 'bi-pencil', 'bi-pentagon-fill', 'bi-pentagon-half', 'bi-pentagon', 'bi-people-fill', 'bi-people', 'bi-percent', 'bi-person-badge-fill', 'bi-person-badge', 'bi-person-bounding-box', 'bi-person-check-fill', 'bi-person-check', 'bi-person-circle', 'bi-person-dash-fill', 'bi-person-dash', 'bi-person-fill', 'bi-person-lines-fill', 'bi-person-plus-fill', 'bi-person-plus', 'bi-person-square', 'bi-person-x-fill', 'bi-person-x', 'bi-person', 'bi-phone-fill', 'bi-phone-landscape-fill', 'bi-phone-landscape', 'bi-phone-vibrate-fill', 'bi-phone-vibrate', 'bi-phone', 'bi-pie-chart-fill', 'bi-pie-chart', 'bi-pin-angle-fill', 'bi-pin-angle', 'bi-pin-fill', 'bi-pin', 'bi-pip-fill', 'bi-pip', 'bi-play-btn-fill', 'bi-play-btn', 'bi-play-circle-fill', 'bi-play-circle', 'bi-play-fill', 'bi-play', 'bi-plug-fill', 'bi-plug', 'bi-plus-circle-dotted', 'bi-plus-circle-fill', 'bi-plus-circle', 'bi-plus-square-dotted', 'bi-plus-square-fill', 'bi-plus-square', 'bi-plus', 'bi-power', 'bi-printer-fill', 'bi-printer', 'bi-puzzle-fill', 'bi-puzzle', 'bi-question-circle-fill', 'bi-question-circle', 'bi-question-diamond-fill', 'bi-question-diamond', 'bi-question-octagon-fill', 'bi-question-octagon', 'bi-question-square-fill', 'bi-question-square', 'bi-question', 'bi-rainbow', 'bi-receipt-cutoff', 'bi-receipt', 'bi-reception-0', 'bi-reception-1', 'bi-reception-2', 'bi-reception-3', 'bi-reception-4', 'bi-record-btn-fill', 'bi-record-btn', 'bi-record-circle-fill', 'bi-record-circle', 'bi-record-fill', 'bi-record', 'bi-record2-fill', 'bi-record2', 'bi-reply-all-fill', 'bi-reply-all', 'bi-reply-fill', 'bi-reply', 'bi-rss-fill', 'bi-rss', 'bi-rulers', 'bi-save-fill', 'bi-save', 'bi-save2-fill', 'bi-save2', 'bi-scissors', 'bi-screwdriver', 'bi-search', 'bi-segmented-nav', 'bi-server', 'bi-share-fill', 'bi-share', 'bi-shield-check', 'bi-shield-exclamation', 'bi-shield-fill-check', 'bi-shield-fill-exclamation', 'bi-shield-fill-minus', 'bi-shield-fill-plus', 'bi-shield-fill-x', 'bi-shield-fill', 'bi-shield-lock-fill', 'bi-shield-lock', 'bi-shield-minus', 'bi-shield-plus', 'bi-shield-shaded', 'bi-shield-slash-fill', 'bi-shield-slash', 'bi-shield-x', 'bi-shield', 'bi-shift-fill', 'bi-shift', 'bi-shop-window', 'bi-shop', 'bi-shuffle', 'bi-signpost-2-fill', 'bi-signpost-2', 'bi-signpost-fill', 'bi-signpost-split-fill', 'bi-signpost-split', 'bi-signpost', 'bi-sim-fill', 'bi-sim', 'bi-skip-backward-btn-fill', 'bi-skip-backward-btn', 'bi-skip-backward-circle-fill', 'bi-skip-backward-circle', 'bi-skip-backward-fill', 'bi-skip-backward', 'bi-skip-end-btn-fill', 'bi-skip-end-btn', 'bi-skip-end-circle-fill', 'bi-skip-end-circle', 'bi-skip-end-fill', 'bi-skip-end', 'bi-skip-forward-btn-fill', 'bi-skip-forward-btn', 'bi-skip-forward-circle-fill', 'bi-skip-forward-circle', 'bi-skip-forward-fill', 'bi-skip-forward', 'bi-skip-start-btn-fill', 'bi-skip-start-btn', 'bi-skip-start-circle-fill', 'bi-skip-start-circle', 'bi-skip-start-fill', 'bi-skip-start', 'bi-slack', 'bi-slash-circle-fill', 'bi-slash-circle', 'bi-slash-square-fill', 'bi-slash-square', 'bi-slash', 'bi-sliders', 'bi-smartwatch', 'bi-snow', 'bi-snow2', 'bi-snow3', 'bi-sort-alpha-down-alt', 'bi-sort-alpha-down', 'bi-sort-alpha-up-alt', 'bi-sort-alpha-up', 'bi-sort-down-alt', 'bi-sort-down', 'bi-sort-numeric-down-alt', 'bi-sort-numeric-down', 'bi-sort-numeric-up-alt', 'bi-sort-numeric-up', 'bi-sort-up-alt', 'bi-sort-up', 'bi-soundwave', 'bi-speaker-fill', 'bi-speaker', 'bi-speedometer', 'bi-speedometer2', 'bi-spellcheck', 'bi-square-fill', 'bi-square-half', 'bi-square', 'bi-stack', 'bi-star-fill', 'bi-star-half', 'bi-star', 'bi-stars', 'bi-stickies-fill', 'bi-stickies', 'bi-sticky-fill', 'bi-sticky', 'bi-stop-btn-fill', 'bi-stop-btn', 'bi-stop-circle-fill', 'bi-stop-circle', 'bi-stop-fill', 'bi-stop', 'bi-stoplights-fill', 'bi-stoplights', 'bi-stopwatch-fill', 'bi-stopwatch', 'bi-subtract', 'bi-suit-club-fill', 'bi-suit-club', 'bi-suit-diamond-fill', 'bi-suit-diamond', 'bi-suit-heart-fill', 'bi-suit-heart', 'bi-suit-spade-fill', 'bi-suit-spade', 'bi-sun-fill', 'bi-sun', 'bi-sunglasses', 'bi-sunrise-fill', 'bi-sunrise', 'bi-sunset-fill', 'bi-sunset', 'bi-symmetry-horizontal', 'bi-symmetry-vertical', 'bi-table', 'bi-tablet-fill', 'bi-tablet-landscape-fill', 'bi-tablet-landscape', 'bi-tablet', 'bi-tag-fill', 'bi-tag', 'bi-tags-fill', 'bi-tags', 'bi-telegram', 'bi-telephone-fill', 'bi-telephone-forward-fill', 'bi-telephone-forward', 'bi-telephone-inbound-fill', 'bi-telephone-inbound', 'bi-telephone-minus-fill', 'bi-telephone-minus', 'bi-telephone-outbound-fill', 'bi-telephone-outbound', 'bi-telephone-plus-fill', 'bi-telephone-plus', 'bi-telephone-x-fill', 'bi-telephone-x', 'bi-telephone', 'bi-terminal-fill', 'bi-terminal', 'bi-text-center', 'bi-text-indent-left', 'bi-text-indent-right', 'bi-text-left', 'bi-text-paragraph', 'bi-text-right', 'bi-textarea-resize', 'bi-textarea-t', 'bi-textarea', 'bi-thermometer-half', 'bi-thermometer-high', 'bi-thermometer-low', 'bi-thermometer-snow', 'bi-thermometer-sun', 'bi-thermometer', 'bi-three-dots-vertical', 'bi-three-dots', 'bi-toggle-off', 'bi-toggle-on', 'bi-toggle2-off', 'bi-toggle2-on', 'bi-toggles', 'bi-toggles2', 'bi-tools', 'bi-tornado', 'bi-trash-fill', 'bi-trash', 'bi-trash2-fill', 'bi-trash2', 'bi-tree-fill', 'bi-tree', 'bi-triangle-fill', 'bi-triangle-half', 'bi-triangle', 'bi-trophy-fill', 'bi-trophy', 'bi-tropical-storm', 'bi-truck-flatbed', 'bi-truck', 'bi-tsunami', 'bi-tv-fill', 'bi-tv', 'bi-twitch', 'bi-twitter', 'bi-type-bold', 'bi-type-h1', 'bi-type-h2', 'bi-type-h3', 'bi-type-italic', 'bi-type-strikethrough', 'bi-type-underline', 'bi-type', 'bi-ui-checks-grid', 'bi-ui-checks', 'bi-ui-radios-grid', 'bi-ui-radios', 'bi-umbrella-fill', 'bi-umbrella', 'bi-union', 'bi-unlock-fill', 'bi-unlock', 'bi-upc-scan', 'bi-upc', 'bi-upload', 'bi-vector-pen', 'bi-view-list', 'bi-view-stacked', 'bi-vinyl-fill', 'bi-vinyl', 'bi-voicemail', 'bi-volume-down-fill', 'bi-volume-down', 'bi-volume-mute-fill', 'bi-volume-mute', 'bi-volume-off-fill', 'bi-volume-off', 'bi-volume-up-fill', 'bi-volume-up', 'bi-vr', 'bi-wallet-fill', 'bi-wallet', 'bi-wallet2', 'bi-watch', 'bi-water', 'bi-whatsapp', 'bi-wifi-1', 'bi-wifi-2', 'bi-wifi-off', 'bi-wifi', 'bi-wind', 'bi-window-dock', 'bi-window-sidebar', 'bi-window', 'bi-wrench', 'bi-x-circle-fill', 'bi-x-circle', 'bi-x-diamond-fill', 'bi-x-diamond', 'bi-x-octagon-fill', 'bi-x-octagon', 'bi-x-square-fill', 'bi-x-square', 'bi-x', 'bi-youtube', 'bi-zoom-in', 'bi-zoom-out', 'bi-bank', 'bi-bank2', 'bi-bell-slash-fill', 'bi-bell-slash', 'bi-cash-coin', 'bi-check-lg', 'bi-coin', 'bi-currency-bitcoin', 'bi-currency-dollar', 'bi-currency-euro', 'bi-currency-exchange', 'bi-currency-pound', 'bi-currency-yen', 'bi-dash-lg', 'bi-exclamation-lg', 'bi-file-earmark-pdf-fill', 'bi-file-earmark-pdf', 'bi-file-pdf-fill', 'bi-file-pdf', 'bi-gender-ambiguous', 'bi-gender-female', 'bi-gender-male', 'bi-gender-trans', 'bi-headset-vr', 'bi-info-lg', 'bi-mastodon', 'bi-messenger', 'bi-piggy-bank-fill', 'bi-piggy-bank', 'bi-pin-map-fill', 'bi-pin-map', 'bi-plus-lg', 'bi-question-lg', 'bi-recycle', 'bi-reddit', 'bi-safe-fill', 'bi-safe2-fill', 'bi-safe2', 'bi-sd-card-fill', 'bi-sd-card', 'bi-skype', 'bi-slash-lg', 'bi-translate', 'bi-x-lg', 'bi-safe', 'bi-apple', 'bi-microsoft', 'bi-windows', 'bi-behance', 'bi-dribbble', 'bi-line', 'bi-medium', 'bi-paypal', 'bi-pinterest', 'bi-signal', 'bi-snapchat', 'bi-spotify', 'bi-stack-overflow', 'bi-strava', 'bi-wordpress', 'bi-vimeo', 'bi-activity', 'bi-easel2-fill', 'bi-easel2', 'bi-easel3-fill', 'bi-easel3', 'bi-fan', 'bi-fingerprint', 'bi-graph-down-arrow', 'bi-graph-up-arrow', 'bi-hypnotize', 'bi-magic', 'bi-person-rolodex', 'bi-person-video', 'bi-person-video2', 'bi-person-video3', 'bi-person-workspace', 'bi-radioactive', 'bi-webcam-fill', 'bi-webcam', 'bi-yin-yang', 'bi-bandaid-fill', 'bi-bandaid', 'bi-bluetooth', 'bi-body-text', 'bi-boombox', 'bi-boxes', 'bi-dpad-fill', 'bi-dpad', 'bi-ear-fill', 'bi-ear', 'bi-envelope-check-1', 'bi-envelope-check-fill', 'bi-envelope-check', 'bi-envelope-dash-1', 'bi-envelope-dash-fill', 'bi-envelope-dash', 'bi-envelope-exclamation-1', 'bi-envelope-exclamation-fill', 'bi-envelope-exclamation', 'bi-envelope-plus-fill', 'bi-envelope-plus', 'bi-envelope-slash-1', 'bi-envelope-slash-fill', 'bi-envelope-slash', 'bi-envelope-x-1', 'bi-envelope-x-fill', 'bi-envelope-x', 'bi-explicit-fill', 'bi-explicit', 'bi-git', 'bi-infinity', 'bi-list-columns-reverse', 'bi-list-columns', 'bi-meta', 'bi-mortorboard-fill', 'bi-mortorboard', 'bi-nintendo-switch', 'bi-pc-display-horizontal', 'bi-pc-display', 'bi-pc-horizontal', 'bi-pc', 'bi-playstation', 'bi-plus-slash-minus', 'bi-projector-fill', 'bi-projector', 'bi-qr-code-scan', 'bi-qr-code', 'bi-quora', 'bi-quote', 'bi-robot', 'bi-send-check-fill', 'bi-send-check', 'bi-send-dash-fill', 'bi-send-dash', 'bi-send-exclamation-1', 'bi-send-exclamation-fill', 'bi-send-exclamation', 'bi-send-fill', 'bi-send-plus-fill', 'bi-send-plus', 'bi-send-slash-fill', 'bi-send-slash', 'bi-send-x-fill', 'bi-send-x', 'bi-send', 'bi-steam', 'bi-terminal-dash-1', 'bi-terminal-dash', 'bi-terminal-plus', 'bi-terminal-split', 'bi-ticket-detailed-fill', 'bi-ticket-detailed', 'bi-ticket-fill', 'bi-ticket-perforated-fill', 'bi-ticket-perforated', 'bi-ticket', 'bi-tiktok', 'bi-window-dash', 'bi-window-desktop', 'bi-window-fullscreen', 'bi-window-plus', 'bi-window-split', 'bi-window-stack', 'bi-window-x', 'bi-xbox', 'bi-ethernet', 'bi-hdmi-fill', 'bi-hdmi', 'bi-usb-c-fill', 'bi-usb-c', 'bi-usb-fill', 'bi-usb-plug-fill', 'bi-usb-plug', 'bi-usb-symbol', 'bi-usb', 'bi-boombox-fill', 'bi-displayport-1', 'bi-displayport', 'bi-gpu-card', 'bi-memory', 'bi-modem-fill', 'bi-modem', 'bi-motherboard-fill', 'bi-motherboard', 'bi-optical-audio-fill', 'bi-optical-audio', 'bi-pci-card', 'bi-router-fill', 'bi-router', 'bi-ssd-fill', 'bi-ssd', 'bi-thunderbolt-fill', 'bi-thunderbolt', 'bi-usb-drive-fill', 'bi-usb-drive', 'bi-usb-micro-fill', 'bi-usb-micro', 'bi-usb-mini-fill', 'bi-usb-mini', 'bi-cloud-haze2', 'bi-device-hdd-fill', 'bi-device-hdd', 'bi-device-ssd-fill', 'bi-device-ssd', 'bi-displayport-fill', 'bi-mortarboard-fill', 'bi-mortarboard', 'bi-terminal-x', 'bi-arrow-through-heart-fill', 'bi-arrow-through-heart', 'bi-badge-sd-fill', 'bi-badge-sd', 'bi-bag-heart-fill', 'bi-bag-heart', 'bi-balloon-fill', 'bi-balloon-heart-fill', 'bi-balloon-heart', 'bi-balloon', 'bi-box2-fill', 'bi-box2-heart-fill', 'bi-box2-heart', 'bi-box2', 'bi-braces-asterisk', 'bi-calendar-heart-fill', 'bi-calendar-heart', 'bi-calendar2-heart-fill', 'bi-calendar2-heart', 'bi-chat-heart-fill', 'bi-chat-heart', 'bi-chat-left-heart-fill', 'bi-chat-left-heart', 'bi-chat-right-heart-fill', 'bi-chat-right-heart', 'bi-chat-square-heart-fill', 'bi-chat-square-heart', 'bi-clipboard-check-fill', 'bi-clipboard-data-fill', 'bi-clipboard-fill', 'bi-clipboard-heart-fill', 'bi-clipboard-heart', 'bi-clipboard-minus-fill', 'bi-clipboard-plus-fill', 'bi-clipboard-pulse', 'bi-clipboard-x-fill', 'bi-clipboard2-check-fill', 'bi-clipboard2-check', 'bi-clipboard2-data-fill', 'bi-clipboard2-data', 'bi-clipboard2-fill', 'bi-clipboard2-heart-fill', 'bi-clipboard2-heart', 'bi-clipboard2-minus-fill', 'bi-clipboard2-minus', 'bi-clipboard2-plus-fill', 'bi-clipboard2-plus', 'bi-clipboard2-pulse-fill', 'bi-clipboard2-pulse', 'bi-clipboard2-x-fill', 'bi-clipboard2-x', 'bi-clipboard2', 'bi-emoji-kiss-fill', 'bi-emoji-kiss', 'bi-envelope-heart-fill', 'bi-envelope-heart', 'bi-envelope-open-heart-fill', 'bi-envelope-open-heart', 'bi-envelope-paper-fill', 'bi-envelope-paper-heart-fill', 'bi-envelope-paper-heart', 'bi-envelope-paper', 'bi-filetype-aac', 'bi-filetype-ai', 'bi-filetype-bmp', 'bi-filetype-cs', 'bi-filetype-css', 'bi-filetype-csv', 'bi-filetype-doc', 'bi-filetype-docx', 'bi-filetype-exe', 'bi-filetype-gif', 'bi-filetype-heic', 'bi-filetype-html', 'bi-filetype-java', 'bi-filetype-jpg', 'bi-filetype-js', 'bi-filetype-jsx', 'bi-filetype-key', 'bi-filetype-m4p', 'bi-filetype-md', 'bi-filetype-mdx', 'bi-filetype-mov', 'bi-filetype-mp3', 'bi-filetype-mp4', 'bi-filetype-otf', 'bi-filetype-pdf', 'bi-filetype-php', 'bi-filetype-png', 'bi-filetype-ppt-1', 'bi-filetype-ppt', 'bi-filetype-psd', 'bi-filetype-py', 'bi-filetype-raw', 'bi-filetype-rb', 'bi-filetype-sass', 'bi-filetype-scss', 'bi-filetype-sh', 'bi-filetype-svg', 'bi-filetype-tiff', 'bi-filetype-tsx', 'bi-filetype-ttf', 'bi-filetype-txt', 'bi-filetype-wav', 'bi-filetype-woff', 'bi-filetype-xls-1', 'bi-filetype-xls', 'bi-filetype-xml', 'bi-filetype-yml', 'bi-heart-arrow', 'bi-heart-pulse-fill', 'bi-heart-pulse', 'bi-heartbreak-fill', 'bi-heartbreak', 'bi-hearts', 'bi-hospital-fill', 'bi-hospital', 'bi-house-heart-fill', 'bi-house-heart', 'bi-incognito', 'bi-magnet-fill', 'bi-magnet', 'bi-person-heart', 'bi-person-hearts', 'bi-phone-flip', 'bi-plugin', 'bi-postage-fill', 'bi-postage-heart-fill', 'bi-postage-heart', 'bi-postage', 'bi-postcard-fill', 'bi-postcard-heart-fill', 'bi-postcard-heart', 'bi-postcard', 'bi-search-heart-fill', 'bi-search-heart', 'bi-sliders2-vertical', 'bi-sliders2', 'bi-trash3-fill', 'bi-trash3', 'bi-valentine', 'bi-valentine2', 'bi-wrench-adjustable-circle-fill', 'bi-wrench-adjustable-circle', 'bi-wrench-adjustable', 'bi-filetype-json', 'bi-filetype-pptx', 'bi-filetype-xlsx', 'bi-1-circle-1', 'bi-1-circle-fill-1', 'bi-1-circle-fill', 'bi-1-circle', 'bi-1-square-fill', 'bi-1-square', 'bi-2-circle-1', 'bi-2-circle-fill-1', 'bi-2-circle-fill', 'bi-2-circle', 'bi-2-square-fill', 'bi-2-square', 'bi-3-circle-1', 'bi-3-circle-fill-1', 'bi-3-circle-fill', 'bi-3-circle', 'bi-3-square-fill', 'bi-3-square', 'bi-4-circle-1', 'bi-4-circle-fill-1', 'bi-4-circle-fill', 'bi-4-circle', 'bi-4-square-fill', 'bi-4-square', 'bi-5-circle-1', 'bi-5-circle-fill-1', 'bi-5-circle-fill', 'bi-5-circle', 'bi-5-square-fill', 'bi-5-square', 'bi-6-circle-1', 'bi-6-circle-fill-1', 'bi-6-circle-fill', 'bi-6-circle', 'bi-6-square-fill', 'bi-6-square', 'bi-7-circle-1', 'bi-7-circle-fill-1', 'bi-7-circle-fill', 'bi-7-circle', 'bi-7-square-fill', 'bi-7-square', 'bi-8-circle-1', 'bi-8-circle-fill-1', 'bi-8-circle-fill', 'bi-8-circle', 'bi-8-square-fill', 'bi-8-square', 'bi-9-circle-1', 'bi-9-circle-fill-1', 'bi-9-circle-fill', 'bi-9-circle', 'bi-9-square-fill', 'bi-9-square', 'bi-airplane-engines-fill', 'bi-airplane-engines', 'bi-airplane-fill', 'bi-airplane', 'bi-alexa', 'bi-alipay', 'bi-android', 'bi-android2', 'bi-box-fill', 'bi-box-seam-fill', 'bi-browser-chrome', 'bi-browser-edge', 'bi-browser-firefox', 'bi-browser-safari', 'bi-c-circle-1', 'bi-c-circle-fill-1', 'bi-c-circle-fill', 'bi-c-circle', 'bi-c-square-fill', 'bi-c-square', 'bi-capsule-pill', 'bi-capsule', 'bi-car-front-fill', 'bi-car-front', 'bi-cassette-fill', 'bi-cassette', 'bi-cc-circle-1', 'bi-cc-circle-fill-1', 'bi-cc-circle-fill', 'bi-cc-circle', 'bi-cc-square-fill', 'bi-cc-square', 'bi-cup-hot-fill', 'bi-cup-hot', 'bi-currency-rupee', 'bi-dropbox', 'bi-escape', 'bi-fast-forward-btn-fill', 'bi-fast-forward-btn', 'bi-fast-forward-circle-fill', 'bi-fast-forward-circle', 'bi-fast-forward-fill', 'bi-fast-forward', 'bi-filetype-sql', 'bi-fire', 'bi-google-play', 'bi-h-circle-1', 'bi-h-circle-fill-1', 'bi-h-circle-fill', 'bi-h-circle', 'bi-h-square-fill', 'bi-h-square', 'bi-indent', 'bi-lungs-fill', 'bi-lungs', 'bi-microsoft-teams', 'bi-p-circle-1', 'bi-p-circle-fill-1', 'bi-p-circle-fill', 'bi-p-circle', 'bi-p-square-fill', 'bi-p-square', 'bi-pass-fill', 'bi-pass', 'bi-prescription', 'bi-prescription2', 'bi-r-circle-1', 'bi-r-circle-fill-1', 'bi-r-circle-fill', 'bi-r-circle', 'bi-r-square-fill', 'bi-r-square', 'bi-repeat-1', 'bi-repeat', 'bi-rewind-btn-fill', 'bi-rewind-btn', 'bi-rewind-circle-fill', 'bi-rewind-circle', 'bi-rewind-fill', 'bi-rewind', 'bi-train-freight-front-fill', 'bi-train-freight-front', 'bi-train-front-fill', 'bi-train-front', 'bi-train-lightrail-front-fill', 'bi-train-lightrail-front', 'bi-truck-front-fill', 'bi-truck-front', 'bi-ubuntu', 'bi-unindent', 'bi-unity', 'bi-universal-access-circle', 'bi-universal-access', 'bi-virus', 'bi-virus2', 'bi-wechat', 'bi-yelp', 'bi-sign-stop-fill', 'bi-sign-stop-lights-fill', 'bi-sign-stop-lights', 'bi-sign-stop', 'bi-sign-turn-left-fill', 'bi-sign-turn-left', 'bi-sign-turn-right-fill', 'bi-sign-turn-right', 'bi-sign-turn-slight-left-fill', 'bi-sign-turn-slight-left', 'bi-sign-turn-slight-right-fill', 'bi-sign-turn-slight-right', 'bi-sign-yield-fill', 'bi-sign-yield', 'bi-ev-station-fill', 'bi-ev-station', 'bi-fuel-pump-diesel-fill', 'bi-fuel-pump-diesel', 'bi-fuel-pump-fill', 'bi-fuel-pump']; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (bootstrapIcons); /***/ }), /***/ "./src/components/icon-picker/fontawesome-classes.js": /*!***********************************************************!*\ !*** ./src/components/icon-picker/fontawesome-classes.js ***! \***********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const fontawesomeClasses = ["fas fa-address-book", "fas fa-address-card", "fas fa-adjust", "fas fa-align-center", "fas fa-align-justify", "fas fa-align-left", "fas fa-align-right", "fas fa-allergies", "fas fa-ambulance", "fas fa-american-sign-language-interpreting", "fas fa-anchor", "fas fa-angle-double-down", "fas fa-angle-double-left", "fas fa-angle-double-right", "fas fa-angle-double-up", "fas fa-angle-down", "fas fa-angle-left", "fas fa-angle-right", "fas fa-angle-up", "fas fa-archive", "fas fa-arrow-alt-circle-down", "fas fa-arrow-alt-circle-left", "fas fa-arrow-alt-circle-right", "fas fa-arrow-alt-circle-up", "fas fa-arrow-circle-down", "fas fa-arrow-circle-left", "fas fa-arrow-circle-right", "fas fa-arrow-circle-up", "fas fa-arrow-down", "fas fa-arrow-left", "fas fa-arrow-right", "fas fa-arrow-up", "fas fa-arrows-alt", "fas fa-arrows-alt-h", "fas fa-arrows-alt-v", "fas fa-assistive-listening-systems", "fas fa-asterisk", "fas fa-at", "fas fa-audio-description", "fas fa-backward", "fas fa-balance-scale", "fas fa-ban", "fas fa-band-aid", "fas fa-barcode", "fas fa-bars", "fas fa-baseball-ball", "fas fa-basketball-ball", "fas fa-bath", "fas fa-battery-empty", "fas fa-battery-full", "fas fa-battery-half", "fas fa-battery-quarter", "fas fa-battery-three-quarters", "fas fa-bed", "fas fa-beer", "fas fa-bell", "fas fa-bell-slash", "fas fa-bicycle", "fas fa-binoculars", "fas fa-birthday-cake", "fas fa-blind", "fas fa-bold", "fas fa-bolt", "fas fa-bomb", "fas fa-book", "fas fa-bookmark", "fas fa-bowling-ball", "fas fa-box", "fas fa-box-open", "fas fa-boxes", "fas fa-braille", "fas fa-briefcase", "fas fa-briefcase-medical", "fas fa-bug", "fas fa-building", "fas fa-bullhorn", "fas fa-bullseye", "fas fa-burn", "fas fa-bus", "fas fa-calculator", "fas fa-calendar", "fas fa-calendar-alt", "fas fa-calendar-check", "fas fa-calendar-minus", "fas fa-calendar-plus", "fas fa-calendar-times", "fas fa-camera", "fas fa-camera-retro", "fas fa-capsules", "fas fa-car", "fas fa-caret-down", "fas fa-caret-left", "fas fa-caret-right", "fas fa-caret-square-down", "fas fa-caret-square-left", "fas fa-caret-square-right", "fas fa-caret-square-up", "fas fa-caret-up", "fas fa-cart-arrow-down", "fas fa-cart-plus", "fas fa-certificate", "fas fa-chart-area", "fas fa-chart-bar", "fas fa-chart-line", "fas fa-chart-pie", "fas fa-check", "fas fa-check-circle", "fas fa-check-square", "fas fa-chess", "fas fa-chess-bishop", "fas fa-chess-board", "fas fa-chess-king", "fas fa-chess-knight", "fas fa-chess-pawn", "fas fa-chess-queen", "fas fa-chess-rook", "fas fa-chevron-circle-down", "fas fa-chevron-circle-left", "fas fa-chevron-circle-right", "fas fa-chevron-circle-up", "fas fa-chevron-down", "fas fa-chevron-left", "fas fa-chevron-right", "fas fa-chevron-up", "fas fa-child", "fas fa-circle", "fas fa-circle-notch", "fas fa-clipboard", "fas fa-clipboard-check", "fas fa-clipboard-list", "fas fa-clock", "fas fa-clone", "fas fa-closed-captioning", "fas fa-cloud", "fas fa-cloud-download-alt", "fas fa-cloud-upload-alt", "fas fa-code", "fas fa-code-branch", "fas fa-coffee", "fas fa-cog", "fas fa-cogs", "fas fa-columns", "fas fa-comment", "fas fa-comment-alt", "fas fa-comment-dots", "fas fa-comment-slash", "fas fa-comments", "fas fa-compass", "fas fa-compress", "fas fa-copy", "fas fa-copyright", "fas fa-couch", "fas fa-credit-card", "fas fa-crop", "fas fa-crosshairs", "fas fa-cube", "fas fa-cubes", "fas fa-cut", "fas fa-database", "fas fa-deaf", "fas fa-desktop", "fas fa-diagnoses", "fas fa-dna", "fas fa-dollar-sign", "fas fa-dolly", "fas fa-dolly-flatbed", "fas fa-donate", "fas fa-dot-circle", "fas fa-dove", "fas fa-download", "fas fa-edit", "fas fa-eject", "fas fa-ellipsis-h", "fas fa-ellipsis-v", "fas fa-envelope", "fas fa-envelope-open", "fas fa-envelope-square", "fas fa-eraser", "fas fa-euro-sign", "fas fa-exchange-alt", "fas fa-exclamation", "fas fa-exclamation-circle", "fas fa-exclamation-triangle", "fas fa-expand", "fas fa-expand-arrows-alt", "fas fa-external-link-alt", "fas fa-external-link-square-alt", "fas fa-eye", "fas fa-eye-dropper", "fas fa-eye-slash", "fas fa-fast-backward", "fas fa-fast-forward", "fas fa-fax", "fas fa-female", "fas fa-fighter-jet", "fas fa-file", "fas fa-file-alt", "fas fa-file-archive", "fas fa-file-audio", "fas fa-file-code", "fas fa-file-excel", "fas fa-file-image", "fas fa-file-medical", "fas fa-file-medical-alt", "fas fa-file-pdf", "fas fa-file-powerpoint", "fas fa-file-video", "fas fa-file-word", "fas fa-film", "fas fa-filter", "fas fa-fire", "fas fa-fire-extinguisher", "fas fa-first-aid", "fas fa-flag", "fas fa-flag-checkered", "fas fa-flask", "fas fa-folder", "fas fa-folder-open", "fas fa-font", "fas fa-football-ball", "fas fa-forward", "fas fa-frown", "fas fa-futbol", "fas fa-gamepad", "fas fa-gavel", "fas fa-gem", "fas fa-genderless", "fas fa-gift", "fas fa-glass-martini", "fas fa-globe", "fas fa-golf-ball", "fas fa-graduation-cap", "fas fa-h-square", "fas fa-hand-holding", "fas fa-hand-holding-heart", "fas fa-hand-holding-usd", "fas fa-hand-lizard", "fas fa-hand-paper", "fas fa-hand-peace", "fas fa-hand-point-down", "fas fa-hand-point-left", "fas fa-hand-point-right", "fas fa-hand-point-up", "fas fa-hand-pointer", "fas fa-hand-rock", "fas fa-hand-scissors", "fas fa-hand-spock", "fas fa-hands", "fas fa-hands-helping", "fas fa-handshake", "fas fa-hashtag", "fas fa-hdd", "fas fa-heading", "fas fa-headphones", "fas fa-heart", "fas fa-heartbeat", "fas fa-history", "fas fa-hockey-puck", "fas fa-home", "fas fa-hospital", "fas fa-hospital-alt", "fas fa-hospital-symbol", "fas fa-hourglass", "fas fa-hourglass-end", "fas fa-hourglass-half", "fas fa-hourglass-start", "fas fa-i-cursor", "fas fa-id-badge", "fas fa-id-card", "fas fa-id-card-alt", "fas fa-image", "fas fa-images", "fas fa-inbox", "fas fa-indent", "fas fa-industry", "fas fa-info", "fas fa-info-circle", "fas fa-italic", "fas fa-key", "fas fa-keyboard", "fas fa-language", "fas fa-laptop", "fas fa-leaf", "fas fa-lemon", "fas fa-level-down-alt", "fas fa-level-up-alt", "fas fa-life-ring", "fas fa-lightbulb", "fas fa-link", "fas fa-lira-sign", "fas fa-list", "fas fa-list-alt", "fas fa-list-ol", "fas fa-list-ul", "fas fa-location-arrow", "fas fa-lock", "fas fa-lock-open", "fas fa-long-arrow-alt-down", "fas fa-long-arrow-alt-left", "fas fa-long-arrow-alt-right", "fas fa-long-arrow-alt-up", "fas fa-low-vision", "fas fa-magic", "fas fa-magnet", "fas fa-male", "fas fa-map", "fas fa-map-marker", "fas fa-map-marker-alt", "fas fa-map-pin", "fas fa-map-signs", "fas fa-mars", "fas fa-mars-double", "fas fa-mars-stroke", "fas fa-mars-stroke-h", "fas fa-mars-stroke-v", "fas fa-medkit", "fas fa-meh", "fas fa-mercury", "fas fa-microchip", "fas fa-microphone", "fas fa-microphone-slash", "fas fa-minus", "fas fa-minus-circle", "fas fa-minus-square", "fas fa-mobile", "fas fa-mobile-alt", "fas fa-money-bill-alt", "fas fa-moon", "fas fa-motorcycle", "fas fa-mouse-pointer", "fas fa-music", "fas fa-neuter", "fas fa-newspaper", "fas fa-notes-medical", "fas fa-object-group", "fas fa-object-ungroup", "fas fa-outdent", "fas fa-paint-brush", "fas fa-pallet", "fas fa-paper-plane", "fas fa-paperclip", "fas fa-parachute-box", "fas fa-paragraph", "fas fa-paste", "fas fa-pause", "fas fa-pause-circle", "fas fa-paw", "fas fa-pen-square", "fas fa-pencil-alt", "fas fa-people-carry", "fas fa-percent", "fas fa-phone", "fas fa-phone-slash", "fas fa-phone-square", "fas fa-phone-volume", "fas fa-piggy-bank", "fas fa-pills", "fas fa-plane", "fas fa-play", "fas fa-play-circle", "fas fa-plug", "fas fa-plus", "fas fa-plus-circle", "fas fa-plus-square", "fas fa-podcast", "fas fa-poo", "fas fa-pound-sign", "fas fa-power-off", "fas fa-prescription-bottle", "fas fa-prescription-bottle-alt", "fas fa-print", "fas fa-procedures", "fas fa-puzzle-piece", "fas fa-qrcode", "fas fa-question", "fas fa-question-circle", "fas fa-quidditch", "fas fa-quote-left", "fas fa-quote-right", "fas fa-random", "fas fa-recycle", "fas fa-redo", "fas fa-redo-alt", "fas fa-registered", "fas fa-reply", "fas fa-reply-all", "fas fa-retweet", "fas fa-ribbon", "fas fa-road", "fas fa-rocket", "fas fa-rss", "fas fa-rss-square", "fas fa-ruble-sign", "fas fa-rupee-sign", "fas fa-save", "fas fa-search", "fas fa-search-minus", "fas fa-search-plus", "fas fa-seedling", "fas fa-server", "fas fa-share", "fas fa-share-alt", "fas fa-share-alt-square", "fas fa-share-square", "fas fa-shekel-sign", "fas fa-shield-alt", "fas fa-ship", "fas fa-shipping-fast", "fas fa-shopping-bag", "fas fa-shopping-basket", "fas fa-shopping-cart", "fas fa-shower", "fas fa-sign", "fas fa-sign-in-alt", "fas fa-sign-language", "fas fa-sign-out-alt", "fas fa-signal", "fas fa-sitemap", "fas fa-sliders-h", "fas fa-smile", "fas fa-smoking", "fas fa-snowflake", "fas fa-sort", "fas fa-sort-alpha-down", "fas fa-sort-alpha-up", "fas fa-sort-amount-down", "fas fa-sort-amount-up", "fas fa-sort-down", "fas fa-sort-numeric-down", "fas fa-sort-numeric-up", "fas fa-sort-up", "fas fa-space-shuttle", "fas fa-spinner", "fas fa-square", "fas fa-square-full", "fas fa-star", "fas fa-star-half", "fas fa-step-backward", "fas fa-step-forward", "fas fa-stethoscope", "fas fa-sticky-note", "fas fa-stop", "fas fa-stop-circle", "fas fa-stopwatch", "fas fa-street-view", "fas fa-strikethrough", "fas fa-subscript", "fas fa-subway", "fas fa-suitcase", "fas fa-sun", "fas fa-superscript", "fas fa-sync", "fas fa-sync-alt", "fas fa-syringe", "fas fa-table", "fas fa-table-tennis", "fas fa-tablet", "fas fa-tablet-alt", "fas fa-tablets", "fas fa-tachometer-alt", "fas fa-tag", "fas fa-tags", "fas fa-tape", "fas fa-tasks", "fas fa-taxi", "fas fa-terminal", "fas fa-text-height", "fas fa-text-width", "fas fa-th", "fas fa-th-large", "fas fa-th-list", "fas fa-thermometer", "fas fa-thermometer-empty", "fas fa-thermometer-full", "fas fa-thermometer-half", "fas fa-thermometer-quarter", "fas fa-thermometer-three-quarters", "fas fa-thumbs-down", "fas fa-thumbs-up", "fas fa-thumbtack", "fas fa-ticket-alt", "fas fa-times", "fas fa-times-circle", "fas fa-tint", "fas fa-toggle-off", "fas fa-toggle-on", "fas fa-trademark", "fas fa-train", "fas fa-transgender", "fas fa-transgender-alt", "fas fa-trash", "fas fa-trash-alt", "fas fa-tree", "fas fa-trophy", "fas fa-truck", "fas fa-truck-loading", "fas fa-truck-moving", "fas fa-tty", "fas fa-tv", "fas fa-umbrella", "fas fa-underline", "fas fa-undo", "fas fa-undo-alt", "fas fa-universal-access", "fas fa-university", "fas fa-unlink", "fas fa-unlock", "fas fa-unlock-alt", "fas fa-upload", "fas fa-user", "fas fa-user-circle", "fas fa-user-md", "fas fa-user-plus", "fas fa-user-secret", "fas fa-user-times", "fas fa-users", "fas fa-utensil-spoon", "fas fa-utensils", "fas fa-venus", "fas fa-venus-double", "fas fa-venus-mars", "fas fa-vial", "fas fa-vials", "fas fa-video", "fas fa-video-slash", "fas fa-volleyball-ball", "fas fa-volume-down", "fas fa-volume-off", "fas fa-volume-up", "fas fa-warehouse", "fas fa-weight", "fas fa-wheelchair", "fas fa-wifi", "fas fa-window-close", "fas fa-window-maximize", "fas fa-window-minimize", "fas fa-window-restore", "fas fa-wine-glass", "fas fa-won-sign", "fas fa-wrench", "fas fa-x-ray", "fas fa-yen-sign", "far fa-address-book", "far fa-address-card", "far fa-arrow-alt-circle-down", "far fa-arrow-alt-circle-left", "far fa-arrow-alt-circle-right", "far fa-arrow-alt-circle-up", "far fa-bell", "far fa-bell-slash", "far fa-bookmark", "far fa-building", "far fa-calendar", "far fa-calendar-alt", "far fa-calendar-check", "far fa-calendar-minus", "far fa-calendar-plus", "far fa-calendar-times", "far fa-caret-square-down", "far fa-caret-square-left", "far fa-caret-square-right", "far fa-caret-square-up", "far fa-chart-bar", "far fa-check-circle", "far fa-check-square", "far fa-circle", "far fa-clipboard", "far fa-clock", "far fa-clone", "far fa-closed-captioning", "far fa-comment", "far fa-comment-alt", "far fa-comments", "far fa-compass", "far fa-copy", "far fa-copyright", "far fa-credit-card", "far fa-dot-circle", "far fa-edit", "far fa-envelope", "far fa-envelope-open", "far fa-eye-slash", "far fa-file", "far fa-file-alt", "far fa-file-archive", "far fa-file-audio", "far fa-file-code", "far fa-file-excel", "far fa-file-image", "far fa-file-pdf", "far fa-file-powerpoint", "far fa-file-video", "far fa-file-word", "far fa-flag", "far fa-folder", "far fa-folder-open", "far fa-frown", "far fa-futbol", "far fa-gem", "far fa-hand-lizard", "far fa-hand-paper", "far fa-hand-peace", "far fa-hand-point-down", "far fa-hand-point-left", "far fa-hand-point-right", "far fa-hand-point-up", "far fa-hand-pointer", "far fa-hand-rock", "far fa-hand-scissors", "far fa-hand-spock", "far fa-handshake", "far fa-hdd", "far fa-heart", "far fa-hospital", "far fa-hourglass", "far fa-id-badge", "far fa-id-card", "far fa-image", "far fa-images", "far fa-keyboard", "far fa-lemon", "far fa-life-ring", "far fa-lightbulb", "far fa-list-alt", "far fa-map", "far fa-meh", "far fa-minus-square", "far fa-money-bill-alt", "far fa-moon", "far fa-newspaper", "far fa-object-group", "far fa-object-ungroup", "far fa-paper-plane", "far fa-pause-circle", "far fa-play-circle", "far fa-plus-square", "far fa-question-circle", "far fa-registered", "far fa-save", "far fa-share-square", "far fa-smile", "far fa-snowflake", "far fa-square", "far fa-star", "far fa-star-half", "far fa-sticky-note", "far fa-stop-circle", "far fa-sun", "far fa-thumbs-down", "far fa-thumbs-up", "far fa-times-circle", "far fa-trash-alt", "far fa-user", "far fa-user-circle", "far fa-window-close", "far fa-window-maximize", "far fa-window-minimize", "far fa-window-restore", "fab fa-500px", "fab fa-accessible-icon", "fab fa-accusoft", "fab fa-adn", "fab fa-adversal", "fab fa-affiliatetheme", "fab fa-algolia", "fab fa-amazon", "fab fa-amazon-pay", "fab fa-amilia", "fab fa-android", "fab fa-angellist", "fab fa-angrycreative", "fab fa-angular", "fab fa-app-store", "fab fa-app-store-ios", "fab fa-apper", "fab fa-apple", "fab fa-apple-pay", "fab fa-asymmetrik", "fab fa-audible", "fab fa-autoprefixer", "fab fa-avianex", "fab fa-aviato", "fab fa-aws", "fab fa-bandcamp", "fab fa-behance", "fab fa-behance-square", "fab fa-bimobject", "fab fa-bitbucket", "fab fa-bitcoin", "fab fa-bity", "fab fa-black-tie", "fab fa-blackberry", "fab fa-blogger", "fab fa-blogger-b", "fab fa-bluetooth", "fab fa-bluetooth-b", "fab fa-btc", "fab fa-buromobelexperte", "fab fa-buysellads", "fab fa-cc-amazon-pay", "fab fa-cc-amex", "fab fa-cc-apple-pay", "fab fa-cc-diners-club", "fab fa-cc-discover", "fab fa-cc-jcb", "fab fa-cc-mastercard", "fab fa-cc-paypal", "fab fa-cc-stripe", "fab fa-cc-visa", "fab fa-centercode", "fab fa-chrome", "fab fa-cloudscale", "fab fa-cloudsmith", "fab fa-cloudversify", "fab fa-codepen", "fab fa-codiepie", "fab fa-connectdevelop", "fab fa-contao", "fab fa-cpanel", "fab fa-creative-commons", "fab fa-css3", "fab fa-css3-alt", "fab fa-cuttlefish", "fab fa-d-and-d", "fab fa-dashcube", "fab fa-delicious", "fab fa-deploydog", "fab fa-deskpro", "fab fa-deviantart", "fab fa-digg", "fab fa-digital-ocean", "fab fa-discord", "fab fa-discourse", "fab fa-dochub", "fab fa-docker", "fab fa-draft2digital", "fab fa-dribbble", "fab fa-dribbble-square", "fab fa-dropbox", "fab fa-drupal", "fab fa-dyalog", "fab fa-earlybirds", "fab fa-edge", "fab fa-elementor", "fab fa-ember", "fab fa-empire", "fab fa-envira", "fab fa-erlang", "fab fa-ethereum", "fab fa-etsy", "fab fa-expeditedssl", "fab fa-facebook", "fab fa-facebook-f", "fab fa-facebook-messenger", "fab fa-facebook-square", "fab fa-firefox", "fab fa-first-order", "fab fa-firstdraft", "fab fa-flickr", "fab fa-flipboard", "fab fa-fly", "fab fa-font-awesome", "fab fa-font-awesome-alt", "fab fa-font-awesome-flag", "fab fa-fonticons", "fab fa-fonticons-fi", "fab fa-fort-awesome", "fab fa-fort-awesome-alt", "fab fa-forumbee", "fab fa-foursquare", "fab fa-free-code-camp", "fab fa-freebsd", "fab fa-get-pocket", "fab fa-gg", "fab fa-gg-circle", "fab fa-git", "fab fa-git-square", "fab fa-github", "fab fa-github-alt", "fab fa-github-square", "fab fa-gitkraken", "fab fa-gitlab", "fab fa-gitter", "fab fa-glide", "fab fa-glide-g", "fab fa-gofore", "fab fa-goodreads", "fab fa-goodreads-g", "fab fa-google", "fab fa-google-drive", "fab fa-google-play", "fab fa-google-plus", "fab fa-google-plus-g", "fab fa-google-plus-square", "fab fa-google-wallet", "fab fa-gratipay", "fab fa-grav", "fab fa-gripfire", "fab fa-grunt", "fab fa-gulp", "fab fa-hacker-news", "fab fa-hacker-news-square", "fab fa-hips", "fab fa-hire-a-helper", "fab fa-hooli", "fab fa-hotjar", "fab fa-houzz", "fab fa-html5", "fab fa-hubspot", "fab fa-imdb", "fab fa-instagram", "fab fa-internet-explorer", "fab fa-ioxhost", "fab fa-itunes", "fab fa-itunes-note", "fab fa-jenkins", "fab fa-joget", "fab fa-joomla", "fab fa-js", "fab fa-js-square", "fab fa-jsfiddle", "fab fa-keycdn", "fab fa-kickstarter", "fab fa-kickstarter-k", "fab fa-korvue", "fab fa-laravel", "fab fa-lastfm", "fab fa-lastfm-square", "fab fa-leanpub", "fab fa-less", "fab fa-line", "fab fa-linkedin", "fab fa-linkedin-in", "fab fa-linode", "fab fa-linux", "fab fa-lyft", "fab fa-magento", "fab fa-maxcdn", "fab fa-medapps", "fab fa-medium", "fab fa-medium-m", "fab fa-medrt", "fab fa-meetup", "fab fa-microsoft", "fab fa-mix", "fab fa-mixcloud", "fab fa-mizuni", "fab fa-modx", "fab fa-monero", "fab fa-napster", "fab fa-nintendo-switch", "fab fa-node", "fab fa-node-js", "fab fa-npm", "fab fa-ns8", "fab fa-nutritionix", "fab fa-odnoklassniki", "fab fa-odnoklassniki-square", "fab fa-opencart", "fab fa-openid", "fab fa-opera", "fab fa-optin-monster", "fab fa-osi", "fab fa-page4", "fab fa-pagelines", "fab fa-palfed", "fab fa-patreon", "fab fa-paypal", "fab fa-periscope", "fab fa-phabricator", "fab fa-phoenix-framework", "fab fa-php", "fab fa-pied-piper", "fab fa-pied-piper-alt", "fab fa-pied-piper-pp", "fab fa-pinterest", "fab fa-pinterest-p", "fab fa-pinterest-square", "fab fa-playstation", "fab fa-product-hunt", "fab fa-pushed", "fab fa-python", "fab fa-qq", "fab fa-quinscape", "fab fa-quora", "fab fa-ravelry", "fab fa-react", "fab fa-readme", "fab fa-rebel", "fab fa-red-river", "fab fa-reddit", "fab fa-reddit-alien", "fab fa-reddit-square", "fab fa-rendact", "fab fa-renren", "fab fa-replyd", "fab fa-resolving", "fab fa-rocketchat", "fab fa-rockrms", "fab fa-safari", "fab fa-sass", "fab fa-schlix", "fab fa-scribd", "fab fa-searchengin", "fab fa-sellcast", "fab fa-sellsy", "fab fa-servicestack", "fab fa-shirtsinbulk", "fab fa-simplybuilt", "fab fa-sistrix", "fab fa-skyatlas", "fab fa-skype", "fab fa-slack", "fab fa-slack-hash", "fab fa-slideshare", "fab fa-snapchat", "fab fa-snapchat-ghost", "fab fa-snapchat-square", "fab fa-soundcloud", "fab fa-speakap", "fab fa-spotify", "fab fa-stack-exchange", "fab fa-stack-overflow", "fab fa-staylinked", "fab fa-steam", "fab fa-steam-square", "fab fa-steam-symbol", "fab fa-sticker-mule", "fab fa-strava", "fab fa-stripe", "fab fa-stripe-s", "fab fa-studiovinari", "fab fa-stumbleupon", "fab fa-stumbleupon-circle", "fab fa-superpowers", "fab fa-supple", "fab fa-telegram", "fab fa-telegram-plane", "fab fa-tencent-weibo", "fab fa-themeisle", "fab fa-trello", "fab fa-tripadvisor", "fab fa-tumblr", "fab fa-tumblr-square", "fab fa-twitch", "fab fa-twitter", "fab fa-twitter-square", "fab fa-typo3", "fab fa-uber", "fab fa-uikit", "fab fa-uniregistry", "fab fa-untappd", "fab fa-usb", "fab fa-ussunnah", "fab fa-vaadin", "fab fa-viacoin", "fab fa-viadeo", "fab fa-viadeo-square", "fab fa-viber", "fab fa-vimeo", "fab fa-vimeo-square", "fab fa-vimeo-v", "fab fa-vine", "fab fa-vk", "fab fa-vnv", "fab fa-vuejs", "fab fa-weibo", "fab fa-weixin", "fab fa-whatsapp", "fab fa-whatsapp-square", "fab fa-whmcs", "fab fa-wikipedia-w", "fab fa-windows", "fab fa-wordpress", "fab fa-wordpress-simple", "fab fa-wpbeginner", "fab fa-wpexplorer", "fab fa-wpforms", "fab fa-xbox", "fab fa-xing", "fab fa-xing-square", "fab fa-y-combinator", "fab fa-yahoo", "fab fa-yandex", "fab fa-yandex-international", "fab fa-yelp", "fab fa-yoast", "fab fa-youtube", "fab fa-youtube-square"]; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (fontawesomeClasses); /***/ }), /***/ "./src/components/icon-picker/iconfont-classes.js": /*!********************************************************!*\ !*** ./src/components/icon-picker/iconfont-classes.js ***! \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); const iconfontClasses = ['icofont-angry-monster', 'icofont-bathtub ', 'icofont-bird-wings ', 'icofont-bow ', 'icofont-castle ', 'icofont-circuit ', 'icofont-crown-king ', 'icofont-crown-queen ', 'icofont-dart ', 'icofont-disability-race ', 'icofont-diving-goggle ', 'icofont-eye-open ', 'icofont-flora-flower ', 'icofont-flora ', 'icofont-gift-box ', 'icofont-halloween-pumpkin ', 'icofont-hand-power ', 'icofont-hand-thunder ', 'icofont-king-monster ', 'icofont-love ', 'icofont-magician-hat ', 'icofont-native-american ', 'icofont-owl-look ', 'icofont-phoenix ', 'icofont-robot-face ', 'icofont-sand-clock ', 'icofont-shield-alt ', 'icofont-ship-wheel ', 'icofont-skull-danger ', 'icofont-skull-face ', 'icofont-snowmobile ', 'icofont-space-shuttle ', 'icofont-star-shape ', 'icofont-swirl ', 'icofont-tattoo-wing ', 'icofont-throne ', 'icofont-tree-alt ', 'icofont-triangle ', 'icofont-unity-hand ', 'icofont-weed ', 'icofont-woman-bird ', 'icofont-bat ', 'icofont-bear-face ', 'icofont-bear-tracks ', 'icofont-bear ', 'icofont-bird-alt ', 'icofont-bird-flying ', 'icofont-bird ', 'icofont-birds ', 'icofont-bone ', 'icofont-bull ', 'icofont-butterfly-alt ', 'icofont-butterfly ', 'icofont-camel-alt ', 'icofont-camel-head ', 'icofont-camel ', 'icofont-cat-alt-1 ', 'icofont-cat-alt-2 ', 'icofont-cat-alt-3 ', 'icofont-cat-dog ', 'icofont-cat-face ', 'icofont-cat ', 'icofont-cow-head ', 'icofont-cow ', 'icofont-crab ', 'icofont-crocodile ', 'icofont-deer-head ', 'icofont-dog-alt ', 'icofont-dog-barking ', 'icofont-dog ', 'icofont-dolphin ', 'icofont-duck-tracks ', 'icofont-eagle-head ', 'icofont-eaten-fish ', 'icofont-elephant-alt ', 'icofont-elephant-head-alt ', 'icofont-elephant-head ', 'icofont-elephant ', 'icofont-elk ', 'icofont-fish-1 ', 'icofont-fish-2 ', 'icofont-fish-3 ', 'icofont-fish-4 ', 'icofont-fish-5 ', 'icofont-fish ', 'icofont-fox-alt ', 'icofont-fox ', 'icofont-frog-tracks ', 'icofont-frog ', 'icofont-froggy ', 'icofont-giraffe-head-1 ', 'icofont-giraffe-head-2 ', 'icofont-giraffe-head ', 'icofont-giraffe ', 'icofont-goat-head ', 'icofont-gorilla ', 'icofont-hen-tracks ', 'icofont-horse-head-1 ', 'icofont-horse-head-2 ', 'icofont-horse-head ', 'icofont-horse-tracks ', 'icofont-jellyfish ', 'icofont-kangaroo ', 'icofont-lemur ', 'icofont-lion-head-1 ', 'icofont-lion-head-2 ', 'icofont-lion-head ', 'icofont-lion ', 'icofont-monkey-2 ', 'icofont-monkey-3 ', 'icofont-monkey-face ', 'icofont-monkey ', 'icofont-octopus-alt ', 'icofont-octopus ', 'icofont-owl ', 'icofont-panda-face ', 'icofont-panda ', 'icofont-panther ', 'icofont-parrot-lip ', 'icofont-parrot ', 'icofont-paw ', 'icofont-pelican ', 'icofont-penguin ', 'icofont-pig-face ', 'icofont-pig ', 'icofont-pigeon-1 ', 'icofont-pigeon-2 ', 'icofont-pigeon ', 'icofont-rabbit ', 'icofont-rat ', 'icofont-rhino-head ', 'icofont-rhino ', 'icofont-rooster ', 'icofont-seahorse ', 'icofont-seal ', 'icofont-shrimp-alt ', 'icofont-shrimp ', 'icofont-snail-1 ', 'icofont-snail-2 ', 'icofont-snail-3 ', 'icofont-snail ', 'icofont-snake ', 'icofont-squid ', 'icofont-squirrel ', 'icofont-tiger-face ', 'icofont-tiger ', 'icofont-turtle ', 'icofont-whale ', 'icofont-woodpecker ', 'icofont-zebra ', 'icofont-brand-acer ', 'icofont-brand-adidas ', 'icofont-brand-adobe ', 'icofont-brand-air-new-zealand ', 'icofont-brand-airbnb ', 'icofont-brand-aircell ', 'icofont-brand-airtel ', 'icofont-brand-alcatel ', 'icofont-brand-alibaba ', 'icofont-brand-aliexpress ', 'icofont-brand-alipay ', 'icofont-brand-amazon ', 'icofont-brand-amd ', 'icofont-brand-american-airlines ', 'icofont-brand-android-robot ', 'icofont-brand-android ', 'icofont-brand-aol ', 'icofont-brand-apple ', 'icofont-brand-appstore ', 'icofont-brand-asus ', 'icofont-brand-ati ', 'icofont-brand-att ', 'icofont-brand-audi ', 'icofont-brand-axiata ', 'icofont-brand-bada ', 'icofont-brand-bbc ', 'icofont-brand-bing ', 'icofont-brand-blackberry ', 'icofont-brand-bmw ', 'icofont-brand-box ', 'icofont-brand-burger-king ', 'icofont-brand-business-insider ', 'icofont-brand-buzzfeed ', 'icofont-brand-cannon ', 'icofont-brand-casio ', 'icofont-brand-china-mobile ', 'icofont-brand-china-telecom ', 'icofont-brand-china-unicom ', 'icofont-brand-cisco ', 'icofont-brand-citibank ', 'icofont-brand-cnet ', 'icofont-brand-cnn ', 'icofont-brand-cocal-cola ', 'icofont-brand-compaq ', 'icofont-brand-debian ', 'icofont-brand-delicious ', 'icofont-brand-dell ', 'icofont-brand-designbump ', 'icofont-brand-designfloat ', 'icofont-brand-disney ', 'icofont-brand-dodge ', 'icofont-brand-dove ', 'icofont-brand-drupal ', 'icofont-brand-ebay ', 'icofont-brand-eleven ', 'icofont-brand-emirates ', 'icofont-brand-espn ', 'icofont-brand-etihad-airways ', 'icofont-brand-etisalat ', 'icofont-brand-etsy ', 'icofont-brand-fastrack ', 'icofont-brand-fedex ', 'icofont-brand-ferrari ', 'icofont-brand-fitbit ', 'icofont-brand-flikr ', 'icofont-brand-forbes ', 'icofont-brand-foursquare ', 'icofont-brand-foxconn ', 'icofont-brand-fujitsu ', 'icofont-brand-general-electric ', 'icofont-brand-gillette ', 'icofont-brand-gizmodo ', 'icofont-brand-gnome ', 'icofont-brand-google ', 'icofont-brand-gopro ', 'icofont-brand-gucci ', 'icofont-brand-hallmark ', 'icofont-brand-hi5 ', 'icofont-brand-honda ', 'icofont-brand-hp ', 'icofont-brand-hsbc ', 'icofont-brand-htc ', 'icofont-brand-huawei ', 'icofont-brand-hulu ', 'icofont-brand-hyundai ', 'icofont-brand-ibm ', 'icofont-brand-icofont ', 'icofont-brand-icq ', 'icofont-brand-ikea ', 'icofont-brand-imdb ', 'icofont-brand-indiegogo ', 'icofont-brand-intel ', 'icofont-brand-ipair ', 'icofont-brand-jaguar ', 'icofont-brand-java ', 'icofont-brand-joomla ', 'icofont-brand-kickstarter ', 'icofont-brand-kik ', 'icofont-brand-lastfm ', 'icofont-brand-lego ', 'icofont-brand-lenovo ', 'icofont-brand-levis ', 'icofont-brand-lexus ', 'icofont-brand-lg ', 'icofont-brand-life-hacker ', 'icofont-brand-linux-mint ', 'icofont-brand-linux ', 'icofont-brand-lionix ', 'icofont-brand-loreal ', 'icofont-brand-louis-vuitton ', 'icofont-brand-mac-os ', 'icofont-brand-marvel-app ', 'icofont-brand-mashable ', 'icofont-brand-mazda ', 'icofont-brand-mcdonals ', 'icofont-brand-mercedes ', 'icofont-brand-micromax ', 'icofont-brand-microsoft ', 'icofont-brand-mobileme ', 'icofont-brand-mobily ', 'icofont-brand-motorola ', 'icofont-brand-msi ', 'icofont-brand-mts ', 'icofont-brand-myspace ', 'icofont-brand-mytv ', 'icofont-brand-nasa ', 'icofont-brand-natgeo ', 'icofont-brand-nbc ', 'icofont-brand-nescafe ', 'icofont-brand-nestle ', 'icofont-brand-netflix ', 'icofont-brand-nexus ', 'icofont-brand-nike ', 'icofont-brand-nokia ', 'icofont-brand-nvidia ', 'icofont-brand-omega ', 'icofont-brand-opensuse ', 'icofont-brand-oracle ', 'icofont-brand-panasonic ', 'icofont-brand-paypal ', 'icofont-brand-pepsi ', 'icofont-brand-philips ', 'icofont-brand-pizza-hut ', 'icofont-brand-playstation ', 'icofont-brand-puma ', 'icofont-brand-qatar-air ', 'icofont-brand-qvc ', 'icofont-brand-readernaut ', 'icofont-brand-redbull ', 'icofont-brand-reebok ', 'icofont-brand-reuters ', 'icofont-brand-samsung ', 'icofont-brand-sap ', 'icofont-brand-saudia-airlines ', 'icofont-brand-scribd ', 'icofont-brand-shell ', 'icofont-brand-siemens ', 'icofont-brand-sk-telecom ', 'icofont-brand-slideshare ', 'icofont-brand-smashing-magazine ', 'icofont-brand-snapchat ', 'icofont-brand-sony-ericsson ', 'icofont-brand-sony ', 'icofont-brand-soundcloud ', 'icofont-brand-sprint ', 'icofont-brand-squidoo ', 'icofont-brand-starbucks ', 'icofont-brand-stc ', 'icofont-brand-steam ', 'icofont-brand-suzuki ', 'icofont-brand-symbian ', 'icofont-brand-t-mobile ', 'icofont-brand-tango ', 'icofont-brand-target ', 'icofont-brand-tata-indicom ', 'icofont-brand-techcrunch ', 'icofont-brand-telenor ', 'icofont-brand-teliasonera ', 'icofont-brand-tesla ', 'icofont-brand-the-verge ', 'icofont-brand-thenextweb ', 'icofont-brand-toshiba ', 'icofont-brand-toyota ', 'icofont-brand-tribenet ', 'icofont-brand-ubuntu ', 'icofont-brand-unilever ', 'icofont-brand-vaio ', 'icofont-brand-verizon ', 'icofont-brand-viber ', 'icofont-brand-vodafone ', 'icofont-brand-volkswagen ', 'icofont-brand-walmart ', 'icofont-brand-warnerbros ', 'icofont-brand-whatsapp ', 'icofont-brand-wikipedia ', 'icofont-brand-windows ', 'icofont-brand-wire ', 'icofont-brand-wordpress ', 'icofont-brand-xiaomi ', 'icofont-brand-yahoobuzz ', 'icofont-brand-yamaha ', 'icofont-brand-youtube ', 'icofont-brand-zain ', 'icofont-bank-alt ', 'icofont-bank ', 'icofont-barcode ', 'icofont-bill-alt ', 'icofont-billboard ', 'icofont-briefcase-1 ', 'icofont-briefcase-2 ', 'icofont-businessman ', 'icofont-businesswoman ', 'icofont-chair ', 'icofont-coins ', 'icofont-company ', 'icofont-contact-add ', 'icofont-files-stack ', 'icofont-handshake-deal ', 'icofont-id-card ', 'icofont-meeting-add ', 'icofont-money-bag ', 'icofont-pie-chart ', 'icofont-presentation-alt ', 'icofont-presentation ', 'icofont-stamp ', 'icofont-stock-mobile ', 'icofont-chart-arrows-axis ', 'icofont-chart-bar-graph ', 'icofont-chart-flow-1 ', 'icofont-chart-flow-2 ', 'icofont-chart-flow ', 'icofont-chart-growth ', 'icofont-chart-histogram-alt ', 'icofont-chart-histogram ', 'icofont-chart-line-alt ', 'icofont-chart-line ', 'icofont-chart-pie-alt ', 'icofont-chart-pie ', 'icofont-chart-radar-graph ', 'icofont-architecture-alt ', 'icofont-architecture ', 'icofont-barricade ', 'icofont-bolt ', 'icofont-bricks ', 'icofont-building-alt ', 'icofont-bull-dozer ', 'icofont-calculations ', 'icofont-cement-mix ', 'icofont-cement-mixer ', 'icofont-concrete-mixer ', 'icofont-danger-zone ', 'icofont-drill ', 'icofont-eco-energy ', 'icofont-eco-environmen ', 'icofont-energy-air ', 'icofont-energy-oil ', 'icofont-energy-savings ', 'icofont-energy-solar ', 'icofont-energy-water ', 'icofont-engineer ', 'icofont-fire-extinguisher-alt ', 'icofont-fire-extinguisher ', 'icofont-fix-tools ', 'icofont-fork-lift ', 'icofont-glue-oil ', 'icofont-hammer-alt ', 'icofont-hammer ', 'icofont-help-robot ', 'icofont-industries-1 ', 'icofont-industries-2 ', 'icofont-industries-3 ', 'icofont-industries-4 ', 'icofont-industries-5 ', 'icofont-industries ', 'icofont-labour ', 'icofont-mining ', 'icofont-paint-brush ', 'icofont-pollution ', 'icofont-power-zone ', 'icofont-radio-active ', 'icofont-recycle-alt ', 'icofont-recycling-man ', 'icofont-safety-hat-light ', 'icofont-safety-hat ', 'icofont-saw ', 'icofont-screw-driver ', 'icofont-tools-1 ', 'icofont-tools-bag ', 'icofont-tow-truck ', 'icofont-trolley ', 'icofont-trowel ', 'icofont-under-construction-alt ', 'icofont-under-construction ', 'icofont-vehicle-cement ', 'icofont-vehicle-crane ', 'icofont-vehicle-delivery-van ', 'icofont-vehicle-dozer ', 'icofont-vehicle-excavator ', 'icofont-vehicle-trucktor ', 'icofont-vehicle-wrecking ', 'icofont-worker ', 'icofont-workers-group ', 'icofont-wrench ', 'icofont-afghani-false ', 'icofont-afghani-minus ', 'icofont-afghani-plus ', 'icofont-afghani-true ', 'icofont-afghani ', 'icofont-baht-false ', 'icofont-baht-minus ', 'icofont-baht-plus ', 'icofont-baht-true ', 'icofont-baht ', 'icofont-bitcoin-false ', 'icofont-bitcoin-minus ', 'icofont-bitcoin-plus ', 'icofont-bitcoin-true ', 'icofont-bitcoin ', 'icofont-dollar-flase ', 'icofont-dollar-minus ', 'icofont-dollar-plus ', 'icofont-dollar-true ', 'icofont-dollar ', 'icofont-dong-false ', 'icofont-dong-minus ', 'icofont-dong-plus ', 'icofont-dong-true ', 'icofont-dong ', 'icofont-euro-false ', 'icofont-euro-minus ', 'icofont-euro-plus ', 'icofont-euro-true ', 'icofont-euro ', 'icofont-frank-false ', 'icofont-frank-minus ', 'icofont-frank-plus ', 'icofont-frank-true ', 'icofont-frank ', 'icofont-hryvnia-false ', 'icofont-hryvnia-minus ', 'icofont-hryvnia-plus ', 'icofont-hryvnia-true ', 'icofont-hryvnia ', 'icofont-lira-false ', 'icofont-lira-minus ', 'icofont-lira-plus ', 'icofont-lira-true ', 'icofont-lira ', 'icofont-peseta-false ', 'icofont-peseta-minus ', 'icofont-peseta-plus ', 'icofont-peseta-true ', 'icofont-peseta ', 'icofont-peso-false ', 'icofont-peso-minus ', 'icofont-peso-plus ', 'icofont-peso-true ', 'icofont-peso ', 'icofont-pound-false ', 'icofont-pound-minus ', 'icofont-pound-plus ', 'icofont-pound-true ', 'icofont-pound ', 'icofont-renminbi-false ', 'icofont-renminbi-minus ', 'icofont-renminbi-plus ', 'icofont-renminbi-true ', 'icofont-renminbi ', 'icofont-riyal-false ', 'icofont-riyal-minus ', 'icofont-riyal-plus ', 'icofont-riyal-true ', 'icofont-riyal ', 'icofont-rouble-false ', 'icofont-rouble-minus ', 'icofont-rouble-plus ', 'icofont-rouble-true ', 'icofont-rouble ', 'icofont-rupee-false ', 'icofont-rupee-minus ', 'icofont-rupee-plus ', 'icofont-rupee-true ', 'icofont-rupee ', 'icofont-taka-false ', 'icofont-taka-minus ', 'icofont-taka-plus ', 'icofont-taka-true ', 'icofont-taka ', 'icofont-turkish-lira-false ', 'icofont-turkish-lira-minus ', 'icofont-turkish-lira-plus ', 'icofont-turkish-lira-true ', 'icofont-turkish-lira ', 'icofont-won-false ', 'icofont-won-minus ', 'icofont-won-plus ', 'icofont-won-true ', 'icofont-won ', 'icofont-yen-false ', 'icofont-yen-minus ', 'icofont-yen-plus ', 'icofont-yen-true ', 'icofont-yen ', 'icofont-android-nexus ', 'icofont-android-tablet ', 'icofont-apple-watch ', 'icofont-drawing-tablet ', 'icofont-earphone ', 'icofont-flash-drive ', 'icofont-game-console ', 'icofont-game-controller ', 'icofont-game-pad ', 'icofont-game ', 'icofont-headphone-alt-1 ', 'icofont-headphone-alt-2 ', 'icofont-headphone-alt-3 ', 'icofont-headphone-alt ', 'icofont-headphone ', 'icofont-htc-one ', 'icofont-imac ', 'icofont-ipad ', 'icofont-iphone ', 'icofont-ipod-nano ', 'icofont-ipod-touch ', 'icofont-keyboard-alt ', 'icofont-keyboard-wireless ', 'icofont-keyboard ', 'icofont-laptop-alt ', 'icofont-laptop ', 'icofont-macbook ', 'icofont-magic-mouse ', 'icofont-micro-chip ', 'icofont-microphone-alt ', 'icofont-microphone ', 'icofont-monitor ', 'icofont-mouse ', 'icofont-mp3-player ', 'icofont-nintendo ', 'icofont-playstation-alt ', 'icofont-psvita ', 'icofont-radio-mic ', 'icofont-radio ', 'icofont-refrigerator ', 'icofont-samsung-galaxy ', 'icofont-surface-tablet ', 'icofont-ui-head-phone ', 'icofont-ui-keyboard ', 'icofont-washing-machine ', 'icofont-wifi-router ', 'icofont-wii-u ', 'icofont-windows-lumia ', 'icofont-wireless-mouse ', 'icofont-xbox-360 ', 'icofont-arrow-down ', 'icofont-arrow-left ', 'icofont-arrow-right ', 'icofont-arrow-up ', 'icofont-block-down ', 'icofont-block-left ', 'icofont-block-right ', 'icofont-block-up ', 'icofont-bubble-down ', 'icofont-bubble-left ', 'icofont-bubble-right ', 'icofont-bubble-up ', 'icofont-caret-down ', 'icofont-caret-left ', 'icofont-caret-right ', 'icofont-caret-up ', 'icofont-circled-down ', 'icofont-circled-left ', 'icofont-circled-right ', 'icofont-circled-up ', 'icofont-collapse ', 'icofont-cursor-drag ', 'icofont-curved-double-left ', 'icofont-curved-double-right ', 'icofont-curved-down ', 'icofont-curved-left ', 'icofont-curved-right ', 'icofont-curved-up ', 'icofont-dotted-down ', 'icofont-dotted-left ', 'icofont-dotted-right ', 'icofont-dotted-up ', 'icofont-double-left ', 'icofont-double-right ', 'icofont-expand-alt ', 'icofont-hand-down ', 'icofont-hand-drag ', 'icofont-hand-drag1 ', 'icofont-hand-drag2 ', 'icofont-hand-drawn-alt-down ', 'icofont-hand-drawn-alt-left ', 'icofont-hand-drawn-alt-right ', 'icofont-hand-drawn-alt-up ', 'icofont-hand-drawn-down ', 'icofont-hand-drawn-left ', 'icofont-hand-drawn-right ', 'icofont-hand-drawn-up ', 'icofont-hand-grippers ', 'icofont-hand-left ', 'icofont-hand-right ', 'icofont-hand-up ', 'icofont-line-block-down ', 'icofont-line-block-left ', 'icofont-line-block-right ', 'icofont-line-block-up ', 'icofont-long-arrow-down ', 'icofont-long-arrow-left ', 'icofont-long-arrow-right ', 'icofont-long-arrow-up ', 'icofont-rounded-collapse ', 'icofont-rounded-double-left ', 'icofont-rounded-double-right ', 'icofont-rounded-down ', 'icofont-rounded-expand ', 'icofont-rounded-left-down ', 'icofont-rounded-left-up ', 'icofont-rounded-left ', 'icofont-rounded-right-down ', 'icofont-rounded-right-up ', 'icofont-rounded-right ', 'icofont-rounded-up ', 'icofont-scroll-bubble-down ', 'icofont-scroll-bubble-left ', 'icofont-scroll-bubble-right ', 'icofont-scroll-bubble-up ', 'icofont-scroll-double-down ', 'icofont-scroll-double-left ', 'icofont-scroll-double-right ', 'icofont-scroll-double-up ', 'icofont-scroll-down ', 'icofont-scroll-left ', 'icofont-scroll-long-down ', 'icofont-scroll-long-left ', 'icofont-scroll-long-right ', 'icofont-scroll-long-up ', 'icofont-scroll-right ', 'icofont-scroll-up ', 'icofont-simple-down ', 'icofont-simple-left-down ', 'icofont-simple-left-up ', 'icofont-simple-left ', 'icofont-simple-right-down ', 'icofont-simple-right-up ', 'icofont-simple-right ', 'icofont-simple-up ', 'icofont-square-down ', 'icofont-square-left ', 'icofont-square-right ', 'icofont-square-up ', 'icofont-stylish-down ', 'icofont-stylish-left ', 'icofont-stylish-right ', 'icofont-stylish-up ', 'icofont-swoosh-down ', 'icofont-swoosh-left ', 'icofont-swoosh-right ', 'icofont-swoosh-up ', 'icofont-thin-double-left ', 'icofont-thin-double-right ', 'icofont-thin-down ', 'icofont-thin-left ', 'icofont-thin-right ', 'icofont-thin-up ', 'icofont-abc ', 'icofont-atom ', 'icofont-award ', 'icofont-bell-alt ', 'icofont-black-board ', 'icofont-book-alt ', 'icofont-book ', 'icofont-brainstorming ', 'icofont-certificate-alt-1 ', 'icofont-certificate-alt-2 ', 'icofont-certificate ', 'icofont-education ', 'icofont-electron ', 'icofont-fountain-pen ', 'icofont-globe-alt ', 'icofont-graduate-alt ', 'icofont-graduate ', 'icofont-group-students ', 'icofont-hat-alt ', 'icofont-hat ', 'icofont-instrument ', 'icofont-lamp-light ', 'icofont-medal ', 'icofont-microscope-alt ', 'icofont-microscope ', 'icofont-paper ', 'icofont-pen-alt-4 ', 'icofont-pen-nib ', 'icofont-pencil-alt-5 ', 'icofont-quill-pen ', 'icofont-read-book-alt ', 'icofont-read-book ', 'icofont-school-bag ', 'icofont-school-bus ', 'icofont-student-alt ', 'icofont-student ', 'icofont-teacher ', 'icofont-test-bulb ', 'icofont-test-tube-alt ', 'icofont-university ', 'icofont-angry ', 'icofont-astonished ', 'icofont-confounded ', 'icofont-confused ', 'icofont-crying ', 'icofont-dizzy ', 'icofont-expressionless ', 'icofont-heart-eyes ', 'icofont-laughing ', 'icofont-nerd-smile ', 'icofont-open-mouth ', 'icofont-rage ', 'icofont-rolling-eyes ', 'icofont-sad ', 'icofont-simple-smile ', 'icofont-slightly-smile ', 'icofont-smirk ', 'icofont-stuck-out-tongue ', 'icofont-wink-smile ', 'icofont-worried ', 'icofont-file-alt ', 'icofont-file-audio ', 'icofont-file-avi-mp4 ', 'icofont-file-bmp ', 'icofont-file-code ', 'icofont-file-css ', 'icofont-file-document ', 'icofont-file-eps ', 'icofont-file-excel ', 'icofont-file-exe ', 'icofont-file-file ', 'icofont-file-flv ', 'icofont-file-gif ', 'icofont-file-html5 ', 'icofont-file-image ', 'icofont-file-iso ', 'icofont-file-java ', 'icofont-file-javascript ', 'icofont-file-jpg ', 'icofont-file-midi ', 'icofont-file-mov ', 'icofont-file-mp3 ', 'icofont-file-pdf ', 'icofont-file-php ', 'icofont-file-png ', 'icofont-file-powerpoint ', 'icofont-file-presentation ', 'icofont-file-psb ', 'icofont-file-psd ', 'icofont-file-python ', 'icofont-file-ruby ', 'icofont-file-spreadsheet ', 'icofont-file-sql ', 'icofont-file-svg ', 'icofont-file-text ', 'icofont-file-tiff ', 'icofont-file-video ', 'icofont-file-wave ', 'icofont-file-wmv ', 'icofont-file-word ', 'icofont-file-zip ', 'icofont-cycling-alt ', 'icofont-cycling ', 'icofont-dumbbell ', 'icofont-dumbbells ', 'icofont-gym-alt-1 ', 'icofont-gym-alt-2 ', 'icofont-gym-alt-3 ', 'icofont-gym ', 'icofont-muscle-weight ', 'icofont-muscle ', 'icofont-apple ', 'icofont-arabian-coffee ', 'icofont-artichoke ', 'icofont-asparagus ', 'icofont-avocado ', 'icofont-baby-food ', 'icofont-banana ', 'icofont-bbq ', 'icofont-beans ', 'icofont-beer ', 'icofont-bell-pepper-capsicum ', 'icofont-birthday-cake ', 'icofont-bread ', 'icofont-broccoli ', 'icofont-burger ', 'icofont-cabbage ', 'icofont-carrot ', 'icofont-cauli-flower ', 'icofont-cheese ', 'icofont-chef ', 'icofont-cherry ', 'icofont-chicken-fry ', 'icofont-chicken ', 'icofont-cocktail ', 'icofont-coconut-water ', 'icofont-coconut ', 'icofont-coffee-alt ', 'icofont-coffee-cup ', 'icofont-coffee-mug ', 'icofont-coffee-pot ', 'icofont-cola ', 'icofont-corn ', 'icofont-croissant ', 'icofont-crop-plant ', 'icofont-cucumber ', 'icofont-culinary ', 'icofont-cup-cake ', 'icofont-dining-table ', 'icofont-donut ', 'icofont-egg-plant ', 'icofont-egg-poached ', 'icofont-farmer-alt ', 'icofont-farmer ', 'icofont-fast-food ', 'icofont-food-basket ', 'icofont-food-cart ', 'icofont-fork-and-knife ', 'icofont-french-fries ', 'icofont-fruits ', 'icofont-grapes ', 'icofont-honey ', 'icofont-hot-dog ', 'icofont-ice-cream-alt ', 'icofont-ice-cream ', 'icofont-juice ', 'icofont-ketchup ', 'icofont-kiwi ', 'icofont-layered-cake ', 'icofont-lemon-alt ', 'icofont-lemon ', 'icofont-lobster ', 'icofont-mango ', 'icofont-milk ', 'icofont-mushroom ', 'icofont-noodles ', 'icofont-onion ', 'icofont-orange ', 'icofont-pear ', 'icofont-peas ', 'icofont-pepper ', 'icofont-pie-alt ', 'icofont-pie ', 'icofont-pineapple ', 'icofont-pizza-slice ', 'icofont-pizza ', 'icofont-plant ', 'icofont-popcorn ', 'icofont-potato ', 'icofont-pumpkin ', 'icofont-raddish ', 'icofont-restaurant-menu ', 'icofont-restaurant ', 'icofont-salt-and-pepper ', 'icofont-sandwich ', 'icofont-sausage ', 'icofont-soft-drinks ', 'icofont-soup-bowl ', 'icofont-spoon-and-fork ', 'icofont-steak ', 'icofont-strawberry ', 'icofont-sub-sandwich ', 'icofont-sushi ', 'icofont-taco ', 'icofont-tea-pot ', 'icofont-tea ', 'icofont-tomato ', 'icofont-watermelon ', 'icofont-wheat ', 'icofont-baby-backpack ', 'icofont-baby-cloth ', 'icofont-baby-milk-bottle ', 'icofont-baby-trolley ', 'icofont-baby ', 'icofont-candy ', 'icofont-holding-hands ', 'icofont-infant-nipple ', 'icofont-kids-scooter ', 'icofont-safety-pin ', 'icofont-teddy-bear ', 'icofont-toy-ball ', 'icofont-toy-cat ', 'icofont-toy-duck ', 'icofont-toy-elephant ', 'icofont-toy-hand ', 'icofont-toy-horse ', 'icofont-toy-lattu ', 'icofont-toy-train ', 'icofont-burglar ', 'icofont-cannon-firing ', 'icofont-cc-camera ', 'icofont-cop-badge ', 'icofont-cop ', 'icofont-court-hammer ', 'icofont-court ', 'icofont-finger-print ', 'icofont-gavel ', 'icofont-handcuff-alt ', 'icofont-handcuff ', 'icofont-investigation ', 'icofont-investigator ', 'icofont-jail ', 'icofont-judge ', 'icofont-law-alt-1 ', 'icofont-law-alt-2 ', 'icofont-law-alt-3 ', 'icofont-law-book ', 'icofont-law-document ', 'icofont-law-order ', 'icofont-law-protect ', 'icofont-law-scales ', 'icofont-law ', 'icofont-lawyer-alt-1 ', 'icofont-lawyer-alt-2 ', 'icofont-lawyer ', 'icofont-legal ', 'icofont-pistol ', 'icofont-police-badge ', 'icofont-police-cap ', 'icofont-police-car-alt-1 ', 'icofont-police-car-alt-2 ', 'icofont-police-car ', 'icofont-police-hat ', 'icofont-police-van ', 'icofont-police ', 'icofont-thief-alt ', 'icofont-thief ', 'icofont-abacus-alt ', 'icofont-abacus ', 'icofont-angle-180 ', 'icofont-angle-45 ', 'icofont-angle-90 ', 'icofont-angle ', 'icofont-calculator-alt-1 ', 'icofont-calculator-alt-2 ', 'icofont-calculator ', 'icofont-circle-ruler-alt ', 'icofont-circle-ruler ', 'icofont-compass-alt-1 ', 'icofont-compass-alt-2 ', 'icofont-compass-alt-3 ', 'icofont-compass-alt-4 ', 'icofont-golden-ratio ', 'icofont-marker-alt-1 ', 'icofont-marker-alt-2 ', 'icofont-marker-alt-3 ', 'icofont-marker ', 'icofont-math ', 'icofont-mathematical-alt-1 ', 'icofont-mathematical-alt-2 ', 'icofont-mathematical ', 'icofont-pen-alt-1 ', 'icofont-pen-alt-2 ', 'icofont-pen-alt-3 ', 'icofont-pen-holder-alt-1 ', 'icofont-pen-holder ', 'icofont-pen ', 'icofont-pencil-alt-1 ', 'icofont-pencil-alt-2 ', 'icofont-pencil-alt-3 ', 'icofont-pencil-alt-4 ', 'icofont-pencil ', 'icofont-ruler-alt-1 ', 'icofont-ruler-alt-2 ', 'icofont-ruler-compass-alt ', 'icofont-ruler-compass ', 'icofont-ruler-pencil-alt-1 ', 'icofont-ruler-pencil-alt-2 ', 'icofont-ruler-pencil ', 'icofont-ruler ', 'icofont-rulers-alt ', 'icofont-rulers ', 'icofont-square-root ', 'icofont-ui-calculator ', 'icofont-aids ', 'icofont-ambulance-crescent ', 'icofont-ambulance-cross ', 'icofont-ambulance ', 'icofont-autism ', 'icofont-bandage ', 'icofont-blind ', 'icofont-blood-drop ', 'icofont-blood-test ', 'icofont-blood ', 'icofont-brain-alt ', 'icofont-brain ', 'icofont-capsule ', 'icofont-crutch ', 'icofont-disabled ', 'icofont-dna-alt-1 ', 'icofont-dna-alt-2 ', 'icofont-dna ', 'icofont-doctor-alt ', 'icofont-doctor ', 'icofont-drug-pack ', 'icofont-drug ', 'icofont-first-aid-alt ', 'icofont-first-aid ', 'icofont-heart-beat-alt ', 'icofont-heart-beat ', 'icofont-heartbeat ', 'icofont-herbal ', 'icofont-hospital ', 'icofont-icu ', 'icofont-injection-syringe ', 'icofont-laboratory ', 'icofont-medical-sign-alt ', 'icofont-medical-sign ', 'icofont-nurse-alt ', 'icofont-nurse ', 'icofont-nursing-home ', 'icofont-operation-theater ', 'icofont-paralysis-disability ', 'icofont-patient-bed ', 'icofont-patient-file ', 'icofont-pills ', 'icofont-prescription ', 'icofont-pulse ', 'icofont-stethoscope-alt ', 'icofont-stethoscope ', 'icofont-stretcher ', 'icofont-surgeon-alt ', 'icofont-surgeon ', 'icofont-tablets ', 'icofont-test-bottle ', 'icofont-test-tube ', 'icofont-thermometer-alt ', 'icofont-thermometer ', 'icofont-tooth ', 'icofont-xray ', 'icofont-ui-add ', 'icofont-ui-alarm ', 'icofont-ui-battery ', 'icofont-ui-block ', 'icofont-ui-bluetooth ', 'icofont-ui-brightness ', 'icofont-ui-browser ', 'icofont-ui-calendar ', 'icofont-ui-call ', 'icofont-ui-camera ', 'icofont-ui-cart ', 'icofont-ui-cell-phone ', 'icofont-ui-chat ', 'icofont-ui-check ', 'icofont-ui-clip-board ', 'icofont-ui-clip ', 'icofont-ui-clock ', 'icofont-ui-close ', 'icofont-ui-contact-list ', 'icofont-ui-copy ', 'icofont-ui-cut ', 'icofont-ui-delete ', 'icofont-ui-dial-phone ', 'icofont-ui-edit ', 'icofont-ui-email ', 'icofont-ui-file ', 'icofont-ui-fire-wall ', 'icofont-ui-flash-light ', 'icofont-ui-flight ', 'icofont-ui-folder ', 'icofont-ui-game ', 'icofont-ui-handicapped ', 'icofont-ui-home ', 'icofont-ui-image ', 'icofont-ui-laoding ', 'icofont-ui-lock ', 'icofont-ui-love-add ', 'icofont-ui-love-broken ', 'icofont-ui-love-remove ', 'icofont-ui-love ', 'icofont-ui-map ', 'icofont-ui-message ', 'icofont-ui-messaging ', 'icofont-ui-movie ', 'icofont-ui-music-player ', 'icofont-ui-music ', 'icofont-ui-mute ', 'icofont-ui-network ', 'icofont-ui-next ', 'icofont-ui-note ', 'icofont-ui-office ', 'icofont-ui-password ', 'icofont-ui-pause ', 'icofont-ui-play-stop ', 'icofont-ui-play ', 'icofont-ui-pointer ', 'icofont-ui-power ', 'icofont-ui-press ', 'icofont-ui-previous ', 'icofont-ui-rate-add ', 'icofont-ui-rate-blank ', 'icofont-ui-rate-remove ', 'icofont-ui-rating ', 'icofont-ui-record ', 'icofont-ui-remove ', 'icofont-ui-reply ', 'icofont-ui-rotation ', 'icofont-ui-rss ', 'icofont-ui-search ', 'icofont-ui-settings ', 'icofont-ui-social-link ', 'icofont-ui-tag ', 'icofont-ui-text-chat ', 'icofont-ui-text-loading ', 'icofont-ui-theme ', 'icofont-ui-timer ', 'icofont-ui-touch-phone ', 'icofont-ui-travel ', 'icofont-ui-unlock ', 'icofont-ui-user-group ', 'icofont-ui-user ', 'icofont-ui-v-card ', 'icofont-ui-video-chat ', 'icofont-ui-video-message ', 'icofont-ui-video-play ', 'icofont-ui-video ', 'icofont-ui-volume ', 'icofont-ui-weather ', 'icofont-ui-wifi ', 'icofont-ui-zoom-in ', 'icofont-ui-zoom-out ', 'icofont-cassette-player ', 'icofont-cassette ', 'icofont-forward ', 'icofont-guiter ', 'icofont-movie ', 'icofont-multimedia ', 'icofont-music-alt ', 'icofont-music-disk ', 'icofont-music-note ', 'icofont-music-notes ', 'icofont-music ', 'icofont-mute-volume ', 'icofont-pause ', 'icofont-play-alt-1 ', 'icofont-play-alt-2 ', 'icofont-play-alt-3 ', 'icofont-play-pause ', 'icofont-play ', 'icofont-record ', 'icofont-retro-music-disk ', 'icofont-rewind ', 'icofont-song-notes ', 'icofont-sound-wave-alt ', 'icofont-sound-wave ', 'icofont-stop ', 'icofont-video-alt ', 'icofont-video-cam ', 'icofont-video-clapper ', 'icofont-video ', 'icofont-volume-bar ', 'icofont-volume-down ', 'icofont-volume-mute ', 'icofont-volume-off ', 'icofont-volume-up ', 'icofont-youtube-play ', 'icofont-2checkout-alt ', 'icofont-2checkout ', 'icofont-amazon-alt ', 'icofont-amazon ', 'icofont-american-express-alt ', 'icofont-american-express ', 'icofont-apple-pay-alt ', 'icofont-apple-pay ', 'icofont-bank-transfer-alt ', 'icofont-bank-transfer ', 'icofont-braintree-alt ', 'icofont-braintree ', 'icofont-cash-on-delivery-alt ', 'icofont-cash-on-delivery ', 'icofont-diners-club-alt-1 ', 'icofont-diners-club-alt-2 ', 'icofont-diners-club-alt-3 ', 'icofont-diners-club ', 'icofont-discover-alt ', 'icofont-discover ', 'icofont-eway-alt ', 'icofont-eway ', 'icofont-google-wallet-alt-1 ', 'icofont-google-wallet-alt-2 ', 'icofont-google-wallet-alt-3 ', 'icofont-google-wallet ', 'icofont-jcb-alt ', 'icofont-jcb ', 'icofont-maestro-alt ', 'icofont-maestro ', 'icofont-mastercard-alt ', 'icofont-mastercard ', 'icofont-payoneer-alt ', 'icofont-payoneer ', 'icofont-paypal-alt ', 'icofont-paypal ', 'icofont-sage-alt ', 'icofont-sage ', 'icofont-skrill-alt ', 'icofont-skrill ', 'icofont-stripe-alt ', 'icofont-stripe ', 'icofont-visa-alt ', 'icofont-visa-electron ', 'icofont-visa ', 'icofont-western-union-alt ', 'icofont-western-union ', 'icofont-boy ', 'icofont-business-man-alt-1 ', 'icofont-business-man-alt-2 ', 'icofont-business-man-alt-3 ', 'icofont-business-man ', 'icofont-female ', 'icofont-funky-man ', 'icofont-girl-alt ', 'icofont-girl ', 'icofont-group ', 'icofont-hotel-boy-alt ', 'icofont-hotel-boy ', 'icofont-kid ', 'icofont-man-in-glasses ', 'icofont-people ', 'icofont-support ', 'icofont-user-alt-1 ', 'icofont-user-alt-2 ', 'icofont-user-alt-3 ', 'icofont-user-alt-4 ', 'icofont-user-alt-5 ', 'icofont-user-alt-6 ', 'icofont-user-alt-7 ', 'icofont-user-female ', 'icofont-user-male ', 'icofont-user-suited ', 'icofont-user ', 'icofont-users-alt-1 ', 'icofont-users-alt-2 ', 'icofont-users-alt-3 ', 'icofont-users-alt-4 ', 'icofont-users-alt-5 ', 'icofont-users-alt-6 ', 'icofont-users-social ', 'icofont-users ', 'icofont-waiter-alt ', 'icofont-waiter ', 'icofont-woman-in-glasses ', 'icofont-search-1 ', 'icofont-search-2 ', 'icofont-search-document ', 'icofont-search-folder ', 'icofont-search-job ', 'icofont-search-map ', 'icofont-search-property ', 'icofont-search-restaurant ', 'icofont-search-stock ', 'icofont-search-user ', 'icofont-search ', 'icofont-500px ', 'icofont-aim ', 'icofont-badoo ', 'icofont-baidu-tieba ', 'icofont-bbm-messenger ', 'icofont-bebo ', 'icofont-behance ', 'icofont-blogger ', 'icofont-bootstrap ', 'icofont-brightkite ', 'icofont-cloudapp ', 'icofont-concrete5 ', 'icofont-delicious ', 'icofont-designbump ', 'icofont-designfloat ', 'icofont-deviantart ', 'icofont-digg ', 'icofont-dotcms ', 'icofont-dribbble ', 'icofont-dribble ', 'icofont-dropbox ', 'icofont-ebuddy ', 'icofont-ello ', 'icofont-ember ', 'icofont-envato ', 'icofont-evernote ', 'icofont-facebook-messenger ', 'icofont-facebook ', 'icofont-feedburner ', 'icofont-flikr ', 'icofont-folkd ', 'icofont-foursquare ', 'icofont-friendfeed ', 'icofont-ghost ', 'icofont-github ', 'icofont-gnome ', 'icofont-google-buzz ', 'icofont-google-hangouts ', 'icofont-google-map ', 'icofont-google-plus ', 'icofont-google-talk ', 'icofont-hype-machine ', 'icofont-instagram ', 'icofont-kakaotalk ', 'icofont-kickstarter ', 'icofont-kik ', 'icofont-kiwibox ', 'icofont-line-messenger ', 'icofont-line ', 'icofont-linkedin ', 'icofont-linux-mint ', 'icofont-live-messenger ', 'icofont-livejournal ', 'icofont-magento ', 'icofont-meetme ', 'icofont-meetup ', 'icofont-mixx ', 'icofont-newsvine ', 'icofont-nimbuss ', 'icofont-odnoklassniki ', 'icofont-opencart ', 'icofont-oscommerce ', 'icofont-pandora ', 'icofont-photobucket ', 'icofont-picasa ', 'icofont-pinterest ', 'icofont-prestashop ', 'icofont-qik ', 'icofont-qq ', 'icofont-readernaut ', 'icofont-reddit ', 'icofont-renren ', 'icofont-rss ', 'icofont-shopify ', 'icofont-silverstripe ', 'icofont-skype ', 'icofont-slack ', 'icofont-slashdot ', 'icofont-slidshare ', 'icofont-smugmug ', 'icofont-snapchat ', 'icofont-soundcloud ', 'icofont-spotify ', 'icofont-stack-exchange ', 'icofont-stack-overflow ', 'icofont-steam ', 'icofont-stumbleupon ', 'icofont-tagged ', 'icofont-technorati ', 'icofont-telegram ', 'icofont-tinder ', 'icofont-trello ', 'icofont-tumblr ', 'icofont-twitch ', 'icofont-twitter ', 'icofont-typo3 ', 'icofont-ubercart ', 'icofont-viber ', 'icofont-viddler ', 'icofont-vimeo ', 'icofont-vine ', 'icofont-virb ', 'icofont-virtuemart ', 'icofont-vk ', 'icofont-wechat ', 'icofont-weibo ', 'icofont-whatsapp ', 'icofont-xing ', 'icofont-yahoo ', 'icofont-yelp ', 'icofont-youku ', 'icofont-youtube ', 'icofont-zencart ', 'icofont-badminton-birdie ', 'icofont-baseball ', 'icofont-baseballer ', 'icofont-basketball-hoop ', 'icofont-basketball ', 'icofont-billiard-ball ', 'icofont-boot-alt-1 ', 'icofont-boot-alt-2 ', 'icofont-boot ', 'icofont-bowling-alt ', 'icofont-bowling ', 'icofont-canoe ', 'icofont-cheer-leader ', 'icofont-climbing ', 'icofont-corner ', 'icofont-field-alt ', 'icofont-field ', 'icofont-football-alt ', 'icofont-football-american ', 'icofont-football ', 'icofont-foul ', 'icofont-goal-keeper ', 'icofont-goal ', 'icofont-golf-alt ', 'icofont-golf-bag ', 'icofont-golf-cart ', 'icofont-golf-field ', 'icofont-golf ', 'icofont-golfer ', 'icofont-helmet ', 'icofont-hockey-alt ', 'icofont-hockey ', 'icofont-ice-skate ', 'icofont-jersey-alt ', 'icofont-jersey ', 'icofont-jumping ', 'icofont-kick ', 'icofont-leg ', 'icofont-match-review ', 'icofont-medal-sport ', 'icofont-offside ', 'icofont-olympic-logo ', 'icofont-olympic ', 'icofont-padding ', 'icofont-penalty-card ', 'icofont-racer ', 'icofont-racing-car ', 'icofont-racing-flag-alt ', 'icofont-racing-flag ', 'icofont-racings-wheel ', 'icofont-referee ', 'icofont-refree-jersey ', 'icofont-result-sport ', 'icofont-rugby-ball ', 'icofont-rugby-player ', 'icofont-rugby ', 'icofont-runner-alt-1 ', 'icofont-runner-alt-2 ', 'icofont-runner ', 'icofont-score-board ', 'icofont-skiing-man ', 'icofont-skydiving-goggles ', 'icofont-snow-mobile ', 'icofont-steering ', 'icofont-stopwatch ', 'icofont-substitute ', 'icofont-swimmer ', 'icofont-table-tennis ', 'icofont-team-alt ', 'icofont-team ', 'icofont-tennis-player ', 'icofont-tennis ', 'icofont-tracking ', 'icofont-trophy-alt ', 'icofont-trophy ', 'icofont-volleyball-alt ', 'icofont-volleyball-fire ', 'icofont-volleyball ', 'icofont-water-bottle ', 'icofont-whistle-alt ', 'icofont-whistle ', 'icofont-win-trophy ', 'icofont-align-center ', 'icofont-align-left ', 'icofont-align-right ', 'icofont-all-caps ', 'icofont-bold ', 'icofont-brush ', 'icofont-clip-board ', 'icofont-code-alt ', 'icofont-color-bucket ', 'icofont-color-picker ', 'icofont-copy-invert ', 'icofont-copy ', 'icofont-cut ', 'icofont-delete-alt ', 'icofont-edit-alt ', 'icofont-eraser-alt ', 'icofont-font ', 'icofont-heading ', 'icofont-indent ', 'icofont-italic-alt ', 'icofont-italic ', 'icofont-justify-all ', 'icofont-justify-center ', 'icofont-justify-left ', 'icofont-justify-right ', 'icofont-link-broken ', 'icofont-outdent ', 'icofont-paper-clip ', 'icofont-paragraph ', 'icofont-pin ', 'icofont-printer ', 'icofont-redo ', 'icofont-rotation ', 'icofont-save ', 'icofont-small-cap ', 'icofont-strike-through ', 'icofont-sub-listing ', 'icofont-subscript ', 'icofont-superscript ', 'icofont-table ', 'icofont-text-height ', 'icofont-text-width ', 'icofont-trash ', 'icofont-underline ', 'icofont-undo ', 'icofont-air-balloon ', 'icofont-airplane-alt ', 'icofont-airplane ', 'icofont-articulated-truck ', 'icofont-auto-mobile ', 'icofont-auto-rickshaw ', 'icofont-bicycle-alt-1 ', 'icofont-bicycle-alt-2 ', 'icofont-bicycle ', 'icofont-bus-alt-1 ', 'icofont-bus-alt-2 ', 'icofont-bus-alt-3 ', 'icofont-bus ', 'icofont-cab ', 'icofont-cable-car ', 'icofont-car-alt-1 ', 'icofont-car-alt-2 ', 'icofont-car-alt-3 ', 'icofont-car-alt-4 ', 'icofont-car ', 'icofont-delivery-time ', 'icofont-fast-delivery ', 'icofont-fire-truck-alt ', 'icofont-fire-truck ', 'icofont-free-delivery ', 'icofont-helicopter ', 'icofont-motor-bike-alt ', 'icofont-motor-bike ', 'icofont-motor-biker ', 'icofont-oil-truck ', 'icofont-rickshaw ', 'icofont-rocket-alt-1 ', 'icofont-rocket-alt-2 ', 'icofont-rocket ', 'icofont-sail-boat-alt-1 ', 'icofont-sail-boat-alt-2 ', 'icofont-sail-boat ', 'icofont-scooter ', 'icofont-sea-plane ', 'icofont-ship-alt ', 'icofont-ship ', 'icofont-speed-boat ', 'icofont-taxi ', 'icofont-tractor ', 'icofont-train-line ', 'icofont-train-steam ', 'icofont-tram ', 'icofont-truck-alt ', 'icofont-truck-loaded ', 'icofont-truck ', 'icofont-van-alt ', 'icofont-van ', 'icofont-yacht ', 'icofont-5-star-hotel ', 'icofont-air-ticket ', 'icofont-beach-bed ', 'icofont-beach ', 'icofont-camping-vest ', 'icofont-direction-sign ', 'icofont-hill-side ', 'icofont-hill ', 'icofont-hotel ', 'icofont-island-alt ', 'icofont-island ', 'icofont-sandals-female ', 'icofont-sandals-male ', 'icofont-travelling ', 'icofont-breakdown ', 'icofont-celsius ', 'icofont-clouds ', 'icofont-cloudy ', 'icofont-dust ', 'icofont-eclipse ', 'icofont-fahrenheit ', 'icofont-forest-fire ', 'icofont-full-night ', 'icofont-full-sunny ', 'icofont-hail-night ', 'icofont-hail-rainy-night ', 'icofont-hail-rainy-sunny ', 'icofont-hail-rainy ', 'icofont-hail-sunny ', 'icofont-hail-thunder-night ', 'icofont-hail-thunder-sunny ', 'icofont-hail-thunder ', 'icofont-hail ', 'icofont-hill-night ', 'icofont-hill-sunny ', 'icofont-hurricane ', 'icofont-meteor ', 'icofont-night ', 'icofont-rainy-night ', 'icofont-rainy-sunny ', 'icofont-rainy-thunder ', 'icofont-rainy ', 'icofont-snow-alt ', 'icofont-snow-flake ', 'icofont-snow-temp ', 'icofont-snow ', 'icofont-snowy-hail ', 'icofont-snowy-night-hail ', 'icofont-snowy-night-rainy ', 'icofont-snowy-night ', 'icofont-snowy-rainy ', 'icofont-snowy-sunny-hail ', 'icofont-snowy-sunny-rainy ', 'icofont-snowy-sunny ', 'icofont-snowy-thunder-night ', 'icofont-snowy-thunder-sunny ', 'icofont-snowy-thunder ', 'icofont-snowy-windy-night ', 'icofont-snowy-windy-sunny ', 'icofont-snowy-windy ', 'icofont-snowy ', 'icofont-sun-alt ', 'icofont-sun-rise ', 'icofont-sun-set ', 'icofont-sun ', 'icofont-sunny-day-temp ', 'icofont-sunny ', 'icofont-thunder-light ', 'icofont-tornado ', 'icofont-umbrella-alt ', 'icofont-umbrella ', 'icofont-volcano ', 'icofont-wave ', 'icofont-wind-scale-0 ', 'icofont-wind-scale-1 ', 'icofont-wind-scale-10 ', 'icofont-wind-scale-11 ', 'icofont-wind-scale-12 ', 'icofont-wind-scale-2 ', 'icofont-wind-scale-3 ', 'icofont-wind-scale-4 ', 'icofont-wind-scale-5 ', 'icofont-wind-scale-6 ', 'icofont-wind-scale-7 ', 'icofont-wind-scale-8 ', 'icofont-wind-scale-9 ', 'icofont-wind-waves ', 'icofont-wind ', 'icofont-windy-hail ', 'icofont-windy-night ', 'icofont-windy-raining ', 'icofont-windy-sunny ', 'icofont-windy-thunder-raining ', 'icofont-windy-thunder ', 'icofont-windy ', 'icofont-addons ', 'icofont-address-book ', 'icofont-adjust ', 'icofont-alarm ', 'icofont-anchor ', 'icofont-archive ', 'icofont-at ', 'icofont-attachment ', 'icofont-audio ', 'icofont-automation ', 'icofont-badge ', 'icofont-bag-alt ', 'icofont-bag ', 'icofont-ban ', 'icofont-bar-code ', 'icofont-bars ', 'icofont-basket ', 'icofont-battery-empty ', 'icofont-battery-full ', 'icofont-battery-half ', 'icofont-battery-low ', 'icofont-beaker ', 'icofont-beard ', 'icofont-bed ', 'icofont-bell ', 'icofont-beverage ', 'icofont-bill ', 'icofont-bin ', 'icofont-binary ', 'icofont-binoculars ', 'icofont-bluetooth ', 'icofont-bomb ', 'icofont-book-mark ', 'icofont-box ', 'icofont-briefcase ', 'icofont-broken ', 'icofont-bucket ', 'icofont-bucket1 ', 'icofont-bucket2 ', 'icofont-bug ', 'icofont-building ', 'icofont-bulb-alt ', 'icofont-bullet ', 'icofont-bullhorn ', 'icofont-bullseye ', 'icofont-calendar ', 'icofont-camera-alt ', 'icofont-camera ', 'icofont-card ', 'icofont-cart-alt ', 'icofont-cart ', 'icofont-cc ', 'icofont-charging ', 'icofont-chat ', 'icofont-check-alt ', 'icofont-check-circled ', 'icofont-check ', 'icofont-checked ', 'icofont-children-care ', 'icofont-clip ', 'icofont-clock-time ', 'icofont-close-circled ', 'icofont-close-line-circled ', 'icofont-close-line-squared-alt ', 'icofont-close-line-squared ', 'icofont-close-line ', 'icofont-close-squared-alt ', 'icofont-close-squared ', 'icofont-close ', 'icofont-cloud-download ', 'icofont-cloud-refresh ', 'icofont-cloud-upload ', 'icofont-cloud ', 'icofont-code-not-allowed ', 'icofont-code ', 'icofont-comment ', 'icofont-compass-alt ', 'icofont-compass ', 'icofont-computer ', 'icofont-connection ', 'icofont-console ', 'icofont-contacts ', 'icofont-contrast ', 'icofont-copyright ', 'icofont-credit-card ', 'icofont-crop ', 'icofont-crown ', 'icofont-cube ', 'icofont-cubes ', 'icofont-dashboard-web ', 'icofont-dashboard ', 'icofont-data ', 'icofont-database-add ', 'icofont-database-locked ', 'icofont-database-remove ', 'icofont-database ', 'icofont-delete ', 'icofont-diamond ', 'icofont-dice-multiple ', 'icofont-dice ', 'icofont-disc ', 'icofont-diskette ', 'icofont-document-folder ', 'icofont-download-alt ', 'icofont-download ', 'icofont-downloaded ', 'icofont-drag ', 'icofont-drag1 ', 'icofont-drag2 ', 'icofont-drag3 ', 'icofont-earth ', 'icofont-ebook ', 'icofont-edit ', 'icofont-eject ', 'icofont-email ', 'icofont-envelope-open ', 'icofont-envelope ', 'icofont-eraser ', 'icofont-error ', 'icofont-excavator ', 'icofont-exchange ', 'icofont-exclamation-circle ', 'icofont-exclamation-square ', 'icofont-exclamation-tringle ', 'icofont-exclamation ', 'icofont-exit ', 'icofont-expand ', 'icofont-external-link ', 'icofont-external ', 'icofont-eye-alt ', 'icofont-eye-blocked ', 'icofont-eye-dropper ', 'icofont-eye ', 'icofont-favourite ', 'icofont-fax ', 'icofont-file-fill ', 'icofont-film ', 'icofont-filter ', 'icofont-fire-alt ', 'icofont-fire-burn ', 'icofont-fire ', 'icofont-flag-alt-1 ', 'icofont-flag-alt-2 ', 'icofont-flag ', 'icofont-flame-torch ', 'icofont-flash-light ', 'icofont-flash ', 'icofont-flask ', 'icofont-focus ', 'icofont-folder-open ', 'icofont-folder ', 'icofont-foot-print ', 'icofont-garbage ', 'icofont-gear-alt ', 'icofont-gear ', 'icofont-gears ', 'icofont-gift ', 'icofont-glass ', 'icofont-globe ', 'icofont-graffiti ', 'icofont-grocery ', 'icofont-hand ', 'icofont-hanger ', 'icofont-hard-disk ', 'icofont-heart-alt ', 'icofont-heart ', 'icofont-history ', 'icofont-home ', 'icofont-horn ', 'icofont-hour-glass ', 'icofont-id ', 'icofont-image ', 'icofont-inbox ', 'icofont-infinite ', 'icofont-info-circle ', 'icofont-info-square ', 'icofont-info ', 'icofont-institution ', 'icofont-interface ', 'icofont-invisible ', 'icofont-jacket ', 'icofont-jar ', 'icofont-jewlery ', 'icofont-karate ', 'icofont-key-hole ', 'icofont-key ', 'icofont-label ', 'icofont-lamp ', 'icofont-layers ', 'icofont-layout ', 'icofont-leaf ', 'icofont-leaflet ', 'icofont-learn ', 'icofont-lego ', 'icofont-lens ', 'icofont-letter ', 'icofont-letterbox ', 'icofont-library ', 'icofont-license ', 'icofont-life-bouy ', 'icofont-life-buoy ', 'icofont-life-jacket ', 'icofont-life-ring ', 'icofont-light-bulb ', 'icofont-lighter ', 'icofont-lightning-ray ', 'icofont-like ', 'icofont-line-height ', 'icofont-link-alt ', 'icofont-link ', 'icofont-list ', 'icofont-listening ', 'icofont-listine-dots ', 'icofont-listing-box ', 'icofont-listing-number ', 'icofont-live-support ', 'icofont-location-arrow ', 'icofont-location-pin ', 'icofont-lock ', 'icofont-login ', 'icofont-logout ', 'icofont-lollipop ', 'icofont-long-drive ', 'icofont-look ', 'icofont-loop ', 'icofont-luggage ', 'icofont-lunch ', 'icofont-lungs ', 'icofont-magic-alt ', 'icofont-magic ', 'icofont-magnet ', 'icofont-mail-box ', 'icofont-mail ', 'icofont-male ', 'icofont-map-pins ', 'icofont-map ', 'icofont-maximize ', 'icofont-measure ', 'icofont-medicine ', 'icofont-mega-phone ', 'icofont-megaphone-alt ', 'icofont-megaphone ', 'icofont-memorial ', 'icofont-memory-card ', 'icofont-mic-mute ', 'icofont-mic ', 'icofont-military ', 'icofont-mill ', 'icofont-minus-circle ', 'icofont-minus-square ', 'icofont-minus ', 'icofont-mobile-phone ', 'icofont-molecule ', 'icofont-money ', 'icofont-moon ', 'icofont-mop ', 'icofont-muffin ', 'icofont-mustache ', 'icofont-navigation-menu ', 'icofont-navigation ', 'icofont-network-tower ', 'icofont-network ', 'icofont-news ', 'icofont-newspaper ', 'icofont-no-smoking ', 'icofont-not-allowed ', 'icofont-notebook ', 'icofont-notepad ', 'icofont-notification ', 'icofont-numbered ', 'icofont-opposite ', 'icofont-optic ', 'icofont-options ', 'icofont-package ', 'icofont-page ', 'icofont-paint ', 'icofont-paper-plane ', 'icofont-paperclip ', 'icofont-papers ', 'icofont-pay ', 'icofont-penguin-linux ', 'icofont-pestle ', 'icofont-phone-circle ', 'icofont-phone ', 'icofont-picture ', 'icofont-pine ', 'icofont-pixels ', 'icofont-plugin ', 'icofont-plus-circle ', 'icofont-plus-square ', 'icofont-plus ', 'icofont-polygonal ', 'icofont-power ', 'icofont-price ', 'icofont-print ', 'icofont-puzzle ', 'icofont-qr-code ', 'icofont-queen ', 'icofont-question-circle ', 'icofont-question-square ', 'icofont-question ', 'icofont-quote-left ', 'icofont-quote-right ', 'icofont-random ', 'icofont-recycle ', 'icofont-refresh ', 'icofont-repair ', 'icofont-reply-all ', 'icofont-reply ', 'icofont-resize ', 'icofont-responsive ', 'icofont-retweet ', 'icofont-road ', 'icofont-robot ', 'icofont-royal ', 'icofont-rss-feed ', 'icofont-safety ', 'icofont-sale-discount ', 'icofont-satellite ', 'icofont-send-mail ', 'icofont-server ', 'icofont-settings-alt ', 'icofont-settings ', 'icofont-share-alt ', 'icofont-share-boxed ', 'icofont-share ', 'icofont-shield ', 'icofont-shopping-cart ', 'icofont-sign-in ', 'icofont-sign-out ', 'icofont-signal ', 'icofont-site-map ', 'icofont-smart-phone ', 'icofont-soccer ', 'icofont-sort-alt ', 'icofont-sort ', 'icofont-space ', 'icofont-spanner ', 'icofont-speech-comments ', 'icofont-speed-meter ', 'icofont-spinner-alt-1 ', 'icofont-spinner-alt-2 ', 'icofont-spinner-alt-3 ', 'icofont-spinner-alt-4 ', 'icofont-spinner-alt-5 ', 'icofont-spinner-alt-6 ', 'icofont-spinner ', 'icofont-spreadsheet ', 'icofont-square ', 'icofont-ssl-security ', 'icofont-star-alt-1 ', 'icofont-star-alt-2 ', 'icofont-star ', 'icofont-street-view ', 'icofont-support-faq ', 'icofont-tack-pin ', 'icofont-tag ', 'icofont-tags ', 'icofont-tasks-alt ', 'icofont-tasks ', 'icofont-telephone ', 'icofont-telescope ', 'icofont-terminal ', 'icofont-thumbs-down ', 'icofont-thumbs-up ', 'icofont-tick-boxed ', 'icofont-tick-mark ', 'icofont-ticket ', 'icofont-tie ', 'icofont-toggle-off ', 'icofont-toggle-on ', 'icofont-tools-alt-2 ', 'icofont-tools ', 'icofont-touch ', 'icofont-traffic-light ', 'icofont-transparent ', 'icofont-tree ', 'icofont-unique-idea ', 'icofont-unlock ', 'icofont-unlocked ', 'icofont-upload-alt ', 'icofont-upload ', 'icofont-usb-drive ', 'icofont-usb ', 'icofont-vector-path ', 'icofont-verification-check ', 'icofont-wall-clock ', 'icofont-wall ', 'icofont-wallet ', 'icofont-warning-alt ', 'icofont-warning ', 'icofont-water-drop ', 'icofont-web ', 'icofont-wheelchair ', 'icofont-wifi-alt ', 'icofont-wifi ', 'icofont-world ', 'icofont-zigzag ', 'icofont-zipped ', 'icofont-xs ', 'icofont-sm ', 'icofont-md ', 'icofont-lg ', 'icofont-1x ', 'icofont-2x ', 'icofont-3x ', 'icofont-4x ', 'icofont-5x ', 'icofont-6x ', 'icofont-7x ', 'icofont-8x ', 'icofont-9x ', 'icofont-10x ', 'icofont-fw ', 'icofont-ul ', 'icofont-border ', 'icofont-spin ', 'icofont-pulse']; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (iconfontClasses); /***/ }), /***/ "./src/components/icon-picker/index.js": /*!*********************************************!*\ !*** ./src/components/icon-picker/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var _fontawesome_classes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./fontawesome-classes */ "./src/components/icon-picker/fontawesome-classes.js"); /* harmony import */ var _iconfont_classes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./iconfont-classes */ "./src/components/icon-picker/iconfont-classes.js"); /* harmony import */ var _bootstrap_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./bootstrap-icons */ "./src/components/icon-picker/bootstrap-icons.js"); const { Component, RawHTML } = wp.element; function Html(props) { if (!props.warn) { return null; } var library = props.library; var srcType = props.srcType; var iconSrc = props.iconSrc; const [iconsArr, setIconsArr] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(_fontawesome_classes__WEBPACK_IMPORTED_MODULE_2__["default"]); const [pickerOpen, setPickerOpen] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [iconData, setIconData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ keyword: '', library: library, filtered: [] }); const [filteredIcons, setFilteredIcons] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)([]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useEffect)(() => { if (iconData.library == 'fontAwesome') { setIconsArr(_fontawesome_classes__WEBPACK_IMPORTED_MODULE_2__["default"]); } if (iconData.library == 'iconFont') { setIconsArr(_iconfont_classes__WEBPACK_IMPORTED_MODULE_3__["default"]); } if (iconData.library == 'bootstrap') { setIconsArr(_bootstrap_icons__WEBPACK_IMPORTED_MODULE_4__["default"]); } }, [iconData]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "!border border-gray-500", onClick: ev => { setPickerOpen(prev => !prev); } }, iconSrc?.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Button, { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], className: "w-8 h-8 text-lg border cursor-pointer hover:bg-gray-200 border-gray-500 text-center" }), iconSrc?.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-8 h-8 text-lg !border cursor-pointer hover:bg-gray-200 border-gray-500 text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: iconSrc }))), pickerOpen && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "w-72 p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.SelectControl, { label: "", value: iconData.library, options: [{ label: "Choose Library", value: "" }, { label: "Font Awesome", value: "fontAwesome" }, { label: "IconFont", value: "iconFont" }, { label: "Bootstrap Icons", value: "bootstrap" } // { label: 'Material', value: 'material' }, ], onChange: newVal => { setIconData({ ...iconData, library: newVal }); props.onChange({ iconSrc: iconSrc, library: newVal, srcType: srcType }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.__experimentalInputControl, { placeholder: "Search for icons", value: iconData.keyword, onChange: newVal => { setIconData({ ...iconData, keyword: newVal }); setFilteredIcons([]); var icons = []; iconsArr.map(icon => { if (icon.indexOf(newVal) > 0) { icons.push(icon); } }); setFilteredIcons(icons); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, iconData.keyword.length == 0 && iconsArr.map(icon => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { onClick: ev => { props.onChange({ iconSrc: icon, library: library, srcType: srcType }); }, className: "m-1 text-lg w-10 text-center cursor-pointer hover:bg-slate-400 p-2 inline-block" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon })); }), iconData.keyword.length > 0 && filteredIcons.map(icon => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { onClick: ev => { props.onChange({ iconSrc: icon, library: library, srcType: srcType }); }, className: "m-1 text-lg w-10 text-center cursor-pointer hover:bg-slate-400 p-2 inline-block" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", { className: icon })); }), filteredIcons.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "text-center p-2 text-red-500 " }, "No icons found."))))); } class PGIconPicker extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { library, srcType, iconSrc, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { library: library, srcType: srcType, iconSrc: iconSrc, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGIconPicker); /***/ }), /***/ "./src/components/icon-toggle/index.js": /*!*********************************************!*\ !*** ./src/components/icon-toggle/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML } = wp.element; class IconToggle extends Component { render() { const { position, variant, iconList, //[{"label":"Select..","icon":"","value":""}] buttonTitle, onChange, activeIcon, value } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Dropdown, { position: position, renderToggle: ({ isOpen, onToggle }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "border border-solid border-gray-400 p-1 px-2 cursor-pointer", title: buttonTitle, variant: variant, onClick: onToggle, "aria-expanded": isOpen }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RawHTML, { className: "text-sm " }, activeIcon)), renderContent: () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, iconList.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " text-lg px-2 font-bold border-b inline-block hover:bg-blue-400 hover:text-white cursor-pointer", onClick: ev => { onChange(x, index); } }, !x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "icon-close" })), x.value && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RawHTML, null, x.icon)); })) })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (IconToggle); /***/ }), /***/ "./src/components/input-color-picker/index.js": /*!****************************************************!*\ !*** ./src/components/input-color-picker/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); const { Component } = wp.element; function WarningBanner(props) { if (!props.warn) { return null; } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.ColorPalette, { value: props.value, colors: props.colors, enableAlpha: true, onChange: newVal => { props.onChange(newVal); } })))); } class PGColorPicker extends Component { constructor(props) { super(props); this.state = { showWarning: false }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { value, colors, enableAlpha, onChange, label, initialOpen } = this.props; var placeholderStyle = { backgroundImage: "repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)", backgroundPosition: "0 0,25px 25px", backgroundSize: "50px 50px", boxShadow: "inset 0 0 0 1px rgb(0 0 0 / 20%)", cursor: "pointer" }; var defaultbtnStyle = { backgroundImage: "repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)", backgroundPosition: "0 0,25px 25px", backgroundSize: "50px 50px", boxShadow: "inset 0 0 0 1px rgb(0 0 0 / 20%)", cursor: "pointer" }; var btnStyle = { backgroundColor: value, boxShadow: "inset 0 0 0 1px rgb(0 0 0 / 20%)", cursor: "pointer" }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center mb-3" }, label), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative h-10", style: placeholderStyle }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute w-full h-full top-0 left-0 text-center", style: btnStyle, onClick: this.handleToggleClick }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-full text-center left-0 top-1/2 -translate-y-1/2\t absolute" }, value == undefined ? "Set Color" : value)))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(WarningBanner, { colors: colors, enableAlpha: enableAlpha, initialOpen: initialOpen, value: value, onChange: onChange, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGColorPicker); /***/ }), /***/ "./src/components/input-select/index.js": /*!**********************************************!*\ !*** ./src/components/input-select/index.js ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; class PGinputSelect extends Component { render() { var { val, options, multiple, onChange } = this.props; function Html() { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-full" }, multiple == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("select", { className: "w-full", multiple: true, onChange: event => { var options = event.target.options; var selected = []; for (var i = 0, l = options.length; i < l; i++) { if (options[i].selected) { selected.push(options[i].value); } } onChange(selected); } }, options.map(x => { var isSelected = val.includes(x.value); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", { value: x.value, selected: isSelected }, x.label); }))), multiple == false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("select", { onChange: event => { var currentVal = options[event.target.options.selectedIndex].value; onChange(currentVal); } }, options.map(x => { var selected = val.includes(x.value); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("option", { value: x.value, selected: selected }, x.label); })))); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, null); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGinputSelect); /***/ }), /***/ "./src/components/input-text/index.js": /*!********************************************!*\ !*** ./src/components/input-text/index.js ***! \********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("input", { className: props.className, id: props.id, value: props.value, type: "text", size: props.size, name: props.name, placeholder: props.placeholder, minlength: props.minlength, maxlength: props.maxlength, required: props.required, disabled: props.disabled, onChange: newVal => { props.onChange(newVal); } })); } class PGinputText extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { value, placeholder, className, id, name, size, minlength, maxlength, required, disabled, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { val: value, name: name, id: id, size: size, placeholder: placeholder, className: className, minlength: minlength, maxlength: maxlength, required: required, disabled: disabled, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGinputText); /***/ }), /***/ "./src/components/library-block-variations/index.js": /*!**********************************************************!*\ !*** ./src/components/library-block-variations/index.js ***! \**********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _components_tabs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../components/tabs */ "./src/components/tabs/index.js"); /* harmony import */ var _components_tab__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/tab */ "./src/components/tab/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/list.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/upload.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/link.js"); /* harmony import */ var html_to_image__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! html-to-image */ "./node_modules/html-to-image/es/index.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [queryCss, setQueryCss] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ keyword: "", page: 1, blockName: props.blockName, category: "", isReset: true }); var [cssLibrary, setCssLibrary] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ items: [] }); var [cssLibraryCats, setCssLibraryCats] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); var [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [sudoPicker, setsudoPicker] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_7__.applyFilters)("isProFeature", true); const selectedBlock = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_2__.useSelect)(select => select("core/block-editor").getSelectedBlock()); var [cssSubmission, setCssSubmission] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ enable: false, title: "", category: "", tags: "", thumb: "", email: "", status: "", // idle => ready to submit, busy => submission process, falied => submission falied, success=> Successfully submitted! successMessage: "Successfully submitted!", failedMessage: "Submission was failed!", idleMessage: "Submit to CSS Library", message: "", timeout: 2 }); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { fetchCss(); }, [queryCss]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_6___default()({ path: "/post-grid/v2/get_site_details", method: "POST", data: {} }).then(res => { // //setEmailSubscribe({ ...userDetails, email: res.email, status: res.subscribe_status }); setCssSubmission({ ...cssSubmission, email: res.email }); }); }, []); function fetchCss() { setIsLoading(true); var postData = { keyword: queryCss.keyword, page: queryCss.page, category: queryCss.category, blockName: queryCss.blockName }; postData = JSON.stringify(postData); fetch("https://getpostgrid.com/wp-json/post-grid/v2/get_block_patterns", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { console.log(res); var isReset = queryCss.isReset; if (isReset) { var items = res.posts; } else { res.posts.map(item => { cssLibrary.items.push(item); }); var items = cssLibrary.items; } setCssLibrary({ items: items }); setCssLibraryCats(res.terms); setIsLoading(false); }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } const htmlToImageCapt = () => { var stylesheet = document.getElementById("pg-google-fonts-css"); if (stylesheet && !stylesheet.hasAttribute("disabled")) { stylesheet.setAttribute("disabled", "disabled"); //setDisabled(true); } const eleementToCapture = document.querySelector("." + props.blockId); html_to_image__WEBPACK_IMPORTED_MODULE_5__.toPng(eleementToCapture).then(function (dataUrl) { setCssSubmission({ ...cssSubmission, thumb: dataUrl }); setTimeout(() => { if (stylesheet && stylesheet.hasAttribute("disabled")) { stylesheet.removeAttribute("disabled"); } }, 500); //download(dataUrl, 'my-node.png'); }); }; const [isHovered, setIsHovered] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [hoverValue, setHoverValue] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tabs__WEBPACK_IMPORTED_MODULE_3__["default"], { activeTab: "cssItems", orientation: "horizontal", activeClass: "active-tab", onSelect: tabName => {}, tabs: [{ name: "cssItems", title: "Library", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"], className: "tab-cssItems" }, { name: "submit", title: "Submission", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], className: "tab-submit" }] }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_4__["default"], { name: "cssItems" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: queryCss.keyword, type: "text", placeholder: "Search Block Variation...", onChange: newVal => { clearTimeout(debounce); debounce = setTimeout(() => { setQueryCss({ keyword: newVal, page: 1, category: queryCss.category, isReset: true }); }, 1000); //fetchLayouts(); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { className: "w-full", style: { margin: 0 }, label: "", value: queryCss.category, options: cssLibraryCats, onChange: newVal => { setQueryCss({ keyword: queryCss.keyword, page: 1, category: newVal, isReset: true }); //fetchLayouts(); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "items" }, cssLibrary.items.map((x, index) => { var content = x.post_content; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: `item-${index} border border-solid relative border-slate-400 rounded-md shadow-md py-2 my-3 transition-all duration-300 ease-in-out ` // onMouseEnter={() => { // setIsHovered(true); // setHoverValue(index); // }} // onMouseLeave={() => { // setIsHovered(false); // setHoverValue(""); // }} }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: x.thumb_url, alt: "" }), isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute top-0 right-2" }, !x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-lime-600 text-white text-xs px-2 rounded-sm py-1" }, "Free"), x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-orange-500 text-white text-xs px-2 rounded-sm py-1" }, "Pro"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2 mb-0 w-full bg-slate-400 bg-opacity-30 flex items-center justify-center flex-wrap gap-2 opacity-100 visible h-[max-content] \r transition-all duration-1000 ease-in-out \r " }, x.is_pro && isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { className: "px-3 py-2 bg-amber-500 rounded-sm text-white outline-none focus:ring-4 shadow-lg transform active:scale-75 transition-transform flex items-center gap-2 justify-center ", onClick: ev => { window.open("https://getpostgrid.com/pricing/", "_blank"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"] }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Subscribe to Import"))), (!x.is_pro || x.is_pro && !isProFeature) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center justify-evenly w-full flex-wrap gap-2 px-3 py-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: "pg-bg-color text-white no-underline hover:text-white text-xs px-2 rounded-sm py-1", href: x.url, target: "_blank" }, "#", x.ID), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { type: "button", title: "Insert New", className: "rounded-sm bg-slate-400 bg-opacity-30 text-white text-xs outline-none focus:ring-4 shadow-lg transform active:scale-75 transition-transform flex items-center justify-center gap-2", onClick: ev => { props.onChange(content, "insert"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "186", height: "187", viewBox: "0 0 186 187", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M160.72 139.058V139.675H161.337H178.422C181.118 139.675 183.5 142.057 183.5 144.753V156.143C183.5 158.839 181.118 161.221 178.422 161.221H161.337H160.72V161.838V178.922C160.72 181.619 158.339 184 155.643 184H144.253C141.556 184 139.175 181.619 139.175 178.922V161.838V161.221H138.558H121.474C118.777 161.221 116.396 158.839 116.396 156.143V144.753C116.396 142.057 118.777 139.675 121.474 139.675H138.558H139.175V139.058V121.974C139.175 119.278 141.556 116.896 144.253 116.896H155.643C158.339 116.896 160.72 119.278 160.72 121.974V139.058Z", fill: "url(#paint0_linear_1_2531)", stroke: "black", "stroke-width": "5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M129.067 100.476C125.689 100.476 122.756 103.41 122.756 106.788V123.255H106.288C102.91 123.255 99.9762 126.189 99.9762 129.567V138.441H17.0692C9.05756 138.441 2.5 131.884 2.5 123.872V17.5692C2.5 9.55757 9.05756 3 17.0692 3H123.372C131.384 3 137.942 9.55757 137.942 17.5692V100.476H129.067ZM51.2381 40.9653C52.5173 40.9653 53.6313 40.5362 54.4269 39.7406C55.2225 38.945 55.6516 37.831 55.6516 36.552V28.9587C55.6516 27.6797 55.2225 26.5658 54.4269 25.7702C53.6313 24.9743 52.5173 24.5454 51.2381 24.5454H28.459C27.1797 24.5454 26.0657 24.9743 25.2701 25.7702C24.4745 26.5658 24.0454 27.6797 24.0454 28.9587V36.552C24.0454 37.831 24.4745 38.945 25.2701 39.7406C26.0657 40.5362 27.1797 40.9653 28.459 40.9653H51.2381ZM96.7968 101.71C98.0758 101.71 99.1897 101.281 99.9853 100.485C100.781 99.6896 101.21 98.5757 101.21 97.2964V89.7034C101.21 88.4243 100.781 87.3104 99.9853 86.5148C99.1897 85.7189 98.0758 85.29 96.7968 85.29H28.459C27.1797 85.29 26.0657 85.7189 25.2701 86.5148C24.4745 87.3104 24.0454 88.4243 24.0454 89.7034V97.2964C24.0454 98.5757 24.4745 99.6896 25.2701 100.485C26.0657 101.281 27.1797 101.71 28.459 101.71H96.7968ZM111.983 71.3376C113.262 71.3376 114.376 70.9085 115.172 70.1129C115.967 69.3173 116.396 68.2034 116.396 66.9241V59.3311C116.396 58.052 115.967 56.9381 115.172 56.1425C114.376 55.3466 113.262 54.9177 111.983 54.9177H28.459C27.1797 54.9177 26.0657 55.3466 25.2701 56.1425C24.4745 56.9381 24.0454 58.052 24.0454 59.3311V66.9241C24.0454 68.2034 24.4745 69.3173 25.2701 70.1129C26.0657 70.9085 27.1797 71.3376 28.459 71.3376H111.983Z", fill: "url(#paint1_linear_1_2531)", stroke: "black", "stroke-width": "5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_1_2531", x1: "115.779", y1: "150.448", x2: "184.117", y2: "150.448", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_1_2531", x1: "1.88306", y1: "70.7207", x2: "138.559", y2: "70.7207", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { type: "button", title: "Apply Style", className: " rounded-sm bg-slate-400 bg-opacity-30 text-white text-xs outline-none focus:ring-4 shadow-lg transform active:scale-75 transition-transform flex gap-2 items-center justify-center ", onClick: ev => { props.onChange(content, "applyStyle"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "186", height: "186", viewBox: "0 0 186 186", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M79.2537 37.469L79.3566 38.3276L79.9681 38.9391L150.532 109.511L85.9794 174.063L85.9793 174.063C83.8361 176.207 81.2916 177.907 78.4912 179.067C75.6907 180.227 72.6892 180.825 69.658 180.825C66.6268 180.825 63.6253 180.227 60.8249 179.067C58.0244 177.907 55.48 176.207 53.3368 174.063L17.1756 137.894L17.1752 137.893C15.0317 135.75 13.3313 133.205 12.1712 130.405C11.011 127.605 10.4139 124.603 10.4139 121.572C10.4139 118.541 11.011 115.539 12.1712 112.739C13.3313 109.938 15.0317 107.394 17.1752 105.251L17.1757 105.25L41.0842 81.3331L41.8162 80.6009V79.5657V40.7441C41.8162 27.7933 50.6207 18.0338 60.6284 18.031C69.7864 18.0335 77.8956 26.1381 79.2537 37.469ZM66.6552 55.7537L67.3874 55.0214V53.9859V40.7441C67.3874 36.9846 64.7432 33.2049 60.6241 33.2049C56.5164 33.2049 53.8608 36.9811 53.8608 40.7441V62.5125V68.548L58.1286 64.2803L66.6552 55.7537ZM67.3874 89.7703V78.0991V72.0626L63.1194 76.3315L25.6877 113.772L25.6876 113.772C23.6205 115.84 22.4592 118.644 22.4592 121.568C22.4592 124.491 23.6205 127.296 25.6876 129.363L25.6879 129.364L61.8662 165.542L61.8665 165.542C63.9343 167.609 66.7384 168.771 69.6623 168.771C72.5861 168.771 75.3903 167.609 77.4581 165.542L77.4584 165.542L131.722 111.279L133.489 109.511L131.722 107.743L83.7169 59.7386L79.4491 55.4708V61.5064V89.7703H67.3874Z", fill: "url(#paint0_linear_7_12)", stroke: "black", "stroke-width": "5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M136.198 144.098L136.198 144.098L152.515 127.781L168.832 144.098L168.832 144.098C172.061 147.326 174.26 151.438 175.151 155.915C176.042 160.392 175.585 165.033 173.839 169.251C172.092 173.469 169.134 177.074 165.338 179.61C161.543 182.146 157.08 183.5 152.515 183.5C147.95 183.5 143.488 182.146 139.692 179.61C135.896 177.074 132.938 173.469 131.191 169.251C129.445 165.033 128.988 160.392 129.879 155.915C130.77 151.438 132.969 147.326 136.198 144.098Z", fill: "url(#paint1_linear_7_12)", stroke: "black", "stroke-width": "5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_7_12", x1: "7.91394", y1: "99.4278", x2: "154.067", y2: "99.4278", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint1_linear_7_12", x1: "126.935", y1: "155.123", x2: "178.095", y2: "155.123", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("button", { type: "button", title: "Replace", className: " rounded-sm bg-slate-400 bg-opacity-30 text-white text-xs outline-none focus:ring-4 shadow-lg transform active:scale-75 transition-transform flex items-center justify-center gap-2 ", onClick: ev => { props.onChange(content, "replace"); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { icon: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { width: "186", height: "186", viewBox: "0 0 186 186", fill: "none", xmlns: "http://www.w3.org/2000/svg" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M125.345 69.8943L125.33 69.8787L125.314 69.8633L97.4317 41.9807C97.4316 41.9806 97.4315 41.9805 97.4314 41.9804C96.1579 40.7064 95.4424 38.9786 95.4424 37.1772C95.4424 35.3757 96.1579 33.6479 97.4314 32.3739C97.4315 32.3738 97.4316 32.3737 97.4317 32.3736L125.298 4.50748C126.578 3.27866 128.288 2.59904 130.062 2.61447C131.844 2.62995 133.548 3.3445 134.808 4.60421C136.067 5.86393 136.782 7.56802 136.797 9.34946C136.813 11.1243 136.133 12.8344 134.904 14.1142L122.903 26.1151L118.636 30.3829H124.671H162.648C168.147 30.3829 173.421 32.5675 177.31 36.4562C181.199 40.3449 183.383 45.6191 183.383 51.1186V83.6486C183.383 85.4506 182.668 87.1787 181.393 88.4529C180.119 89.7271 178.391 90.4429 176.589 90.4429C174.787 90.4429 173.059 89.7271 171.785 88.4529C170.511 87.1787 169.795 85.4506 169.795 83.6486V51.1186C169.795 49.2231 169.042 47.4051 167.701 46.0648C166.361 44.7244 164.543 43.9714 162.648 43.9714H124.671H118.636L122.903 48.2392L134.921 60.2567L134.936 60.2721L134.952 60.2872C135.601 60.9139 136.118 61.6637 136.475 62.4926C136.831 63.3215 137.018 64.2131 137.026 65.1152C137.034 66.0173 136.862 66.912 136.52 67.747C136.179 68.582 135.674 69.3406 135.036 69.9785C134.398 70.6165 133.64 71.1209 132.805 71.4626C131.97 71.8042 131.075 71.9761 130.173 71.9683C129.271 71.9604 128.379 71.773 127.55 71.4169C126.721 71.0608 125.972 70.5432 125.345 69.8943ZM61.2097 141.914H67.2453L62.9775 137.647L50.9765 125.646C49.7477 124.366 49.068 122.656 49.0835 120.881C49.0989 119.099 49.8135 117.395 51.0732 116.136C52.3329 114.876 54.037 114.161 55.8185 114.146C57.5931 114.131 59.3031 114.81 60.583 116.039L88.4492 143.905C89.7229 145.179 90.4385 146.907 90.4385 148.709C90.4385 150.51 89.723 152.238 88.4494 153.512C88.4494 153.512 88.4493 153.512 88.4492 153.512L60.5666 181.395L60.5512 181.41L60.5361 181.426C59.9094 182.075 59.1597 182.592 58.3307 182.948C57.5018 183.304 56.6102 183.492 55.7081 183.5C54.806 183.508 53.9113 183.336 53.0763 182.994C52.2413 182.652 51.4827 182.148 50.8448 181.51C50.2069 180.872 49.7024 180.113 49.3607 179.278C49.0191 178.443 48.8472 177.549 48.855 176.647C48.8629 175.745 49.0503 174.853 49.4064 174.024C49.7625 173.195 50.2801 172.445 50.929 171.819L50.9446 171.804L50.96 171.788L62.9775 159.771L67.2453 155.503H61.2097H23.2333C17.7338 155.503 12.4596 153.318 8.57091 149.43C4.68221 145.541 2.49756 140.267 2.49756 134.767V102.237C2.49756 100.435 3.21338 98.7071 4.48756 97.4329C5.76174 96.1587 7.48989 95.4429 9.29185 95.4429C11.0938 95.4429 12.822 96.1587 14.0961 97.4329C15.3703 98.7071 16.0861 100.435 16.0861 102.237V134.767C16.0861 136.663 16.8391 138.481 18.1795 139.821C19.5198 141.161 21.3377 141.914 23.2333 141.914H61.2097ZM5.84868 5.85112C7.99436 3.70543 10.9045 2.5 13.939 2.5H60.4104C63.4449 2.5 66.3551 3.70543 68.5007 5.85112C70.6464 7.9968 71.8519 10.907 71.8519 13.9414V60.4129C71.8519 63.4473 70.6464 66.3575 68.5007 68.5032C66.3551 70.6489 63.4449 71.8543 60.4104 71.8543H13.939C10.9045 71.8543 7.99436 70.6489 5.84868 68.5032C3.70299 66.3575 2.49756 63.4473 2.49756 60.4129V13.9414C2.49756 10.907 3.70299 7.9968 5.84868 5.85112ZM183.383 171.944C183.383 174.979 182.178 177.889 180.032 180.035C177.887 182.18 174.976 183.386 171.942 183.386H125.47C122.436 183.386 119.526 182.18 117.38 180.035C115.234 177.889 114.029 174.979 114.029 171.944V125.473C114.029 122.438 115.234 119.528 117.38 117.383C119.526 115.237 122.436 114.031 125.47 114.031H171.942C174.976 114.031 177.887 115.237 180.032 117.383C182.178 119.528 183.383 122.438 183.383 125.473V171.944Z", fill: "url(#paint0_linear_7_28)", stroke: "black", "stroke-width": "5" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("defs", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("linearGradient", { id: "paint0_linear_7_28", x1: "-0.00244141", y1: "93", x2: "185.883", y2: "93", gradientUnits: "userSpaceOnUse" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { "stop-color": "#FC7F64" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("stop", { offset: "1", "stop-color": "#FF9D42" })))) }))))); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-full rounded-sm py-2 bg-blue-500 text-[14px] font-bold text-white cursor-pointer my-3 text-center", onClick: _ev => { var page = queryCss.page + 1; setQueryCss({ keyword: queryCss.keyword, page: page, category: queryCss.category, isReset: false, blockName: props.blockName }); } }, isLoading == true && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)), "Load More")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_tab__WEBPACK_IMPORTED_MODULE_4__["default"], { name: "submit" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Item Title"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "w-full", value: cssSubmission.title, type: "text", placeholder: "Ex: Blue Button", onChange: newVal => { setCssSubmission({ ...cssSubmission, title: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Choose category"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.SelectControl, { className: "w-full", style: { margin: 0 }, label: "", value: cssSubmission.category, options: cssLibraryCats, onChange: newVal => { setCssSubmission({ ...cssSubmission, category: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Add Some Tags"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "w-full", value: cssSubmission.tags, type: "text", placeholder: "button, blue button", onChange: newVal => { setCssSubmission({ ...cssSubmission, tags: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { onClick: htmlToImageCapt, className: "bg-green-700 text-white p-3 px-5 cursor-pointer" }, "Take Screenshot"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Preview Thumbnail"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: cssSubmission.thumb })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "" }, "Your Email"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "w-full", value: cssSubmission.email, type: "text", placeholder: "", onChange: newVal => { setCssSubmission({ ...cssSubmission, email: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 my-5 px-10 py-3 text-white cursor-pointer text-center rounded-sm mb-5", onClick: ev => { setIsLoading(true); setCssSubmission({ ...cssSubmission, status: "busy" }); var serelized = wp.blocks.serialize(selectedBlock); var postData = { title: cssSubmission.title, content: serelized, thumb: cssSubmission.thumb, category: cssSubmission.category, tags: cssSubmission.tags, blockName: props.blockName }; postData = JSON.stringify(postData); console.log(postData); fetch("https://getpostgrid.com/wp-json/post-grid/v2/submit_block_variation", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { if (res.status == "success") { setCssSubmission({ ...cssSubmission, status: "success", message: res.message }); setTimeout(() => { setCssSubmission({ ...cssSubmission, status: "idle", message: res.message }); }, 3000); } else { setCssSubmission({ ...cssSubmission, status: "falied", message: res.message }); setTimeout(() => { setCssSubmission({ ...cssSubmission, status: "idle", message: res.message }); }, 3000); } }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } }, "Submit to CSS Library", cssSubmission.status == "busy" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null))), cssSubmission.status == "success" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " font-bold text-green-700" }, cssSubmission.successMessage), cssSubmission.status == "falied" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " font-bold text-red-500" }, cssSubmission.failedMessage), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", null, cssSubmission.message))))); } class PGLibraryBlockVariations extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { blockName, blockId, clientId, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { blockId: blockId, clientId: clientId, blockName: blockName, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGLibraryBlockVariations); /***/ }), /***/ "./src/components/mail-subscribe/index.js": /*!************************************************!*\ !*** ./src/components/mail-subscribe/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); const { Component, RawHTML } = wp.element; class PGMailSubsctibe extends Component { render() { var { // library, // srcType, } = this.props; function SubscribeForm() { const [emailSubscribe, setEmailSubscribe] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ email: '', status: null, loading: false }); const [hasSubscribed, setHasSubscribed] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [PostGridPluginData, setPostGridPluginData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(window.PostGridPluginData); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: '/post-grid/v2/get_site_details', method: 'POST', data: {} }).then(res => { // setEmailSubscribe({ ...emailSubscribe, email: res.email, status: res.subscribe_status }); var hasSubscribed = res.subscribe_status == 'subscribed' ? true : false; setPostGridPluginData({ ...PostGridPluginData, hasSubscribed: hasSubscribed }); }); }, []); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "grid grid-cols-2 gap-2 mb-5" }, hasSubscribed && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "col-span-2 bg-green-700 text-white py-2 px-2 my-2" }, "Thanks for subscribe!"), PostGridPluginData.hasSubscribed == false && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "col-span-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { value: emailSubscribe.email, className: "!py-2 rounded-none", onChange: newVal => { //setEmailSubscribe({ ...emailSubscribe, email: newVal }); } })), emailSubscribe.loading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "col-span-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-2 text-center bg-lime-700 text-white cursor-pointer", onClick: ev => { setEmailSubscribe({ ...emailSubscribe, loading: true }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: '/post-grid/v2/email_subscribe', method: 'POST', data: { email: emailSubscribe.email } }).then(res => { // setEmailSubscribe({ ...emailSubscribe, loading: false, status: res.subscribe_status }); setHasSubscribed(true); setPostGridPluginData({ ...PostGridPluginData, hasSubscribed: true }); setTimeout(() => { setHasSubscribed(false); }, 3000); }); } }, "Subscribe to News")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "col-span-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-2 text-center bg-gray-700 text-white cursor-pointer", onClick: ev => { setEmailSubscribe({ ...emailSubscribe, loading: true }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: '/post-grid/v2/email_subscribe', method: 'POST', data: { interested: false } }).then(res => { // setEmailSubscribe({ ...emailSubscribe, loading: false, status: res.subscribe_status }); }); } }, "No Interested")))); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(SubscribeForm, null); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGMailSubsctibe); /***/ }), /***/ "./src/components/openai-article-writer/index.js": /*!*******************************************************!*\ !*** ./src/components/openai-article-writer/index.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__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 openai__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai */ "./node_modules/openai/index.mjs"); const { Component } = wp.element; const openai = new openai__WEBPACK_IMPORTED_MODULE_2__["default"]({ apiKey: "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", dangerouslyAllowBrowser: true }); // function Html(props) { if (!props.warn) { return null; } const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)(false); const [openAi, setopenAi] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.useState)({ promt: "", model: '', role: "", reponse: null }); //var [debounce, setDebounce] = useState(null); // Using the hook. //var [keyframesX, setkeyframesX] = useState(props.keyframes); // Using the hook. // useEffect(() => { // console.log('useEffect'); // console.log(keyframesX); // props.onChange(keyframesX); // }, [keyframesX]); async function getGTP() { console.log(openAi.promt); setisLoading(true); if (openAi.promt.length > 0) { const chatCompletion = await openai.chat.completions.create({ model: "gpt-3.5-turbo", messages: [{ "role": "user", "content": openAi.promt }] }); console.log(chatCompletion.choices[0].message); var choices = chatCompletion.choices; console.log(choices); var message = choices[0].message.content; setopenAi({ ...openAi, reponse: message }); } setTimeout(() => { setisLoading(false); }, 1000); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: " mt-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "px-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.TextareaControl, { label: "", help: "Write OpenAI Prompt", value: openAi.promt, onChange: value => { setopenAi({ ...openAi, promt: value }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer text-center my-3 bg-blue-500 rounded-sm text-white px-3 py-2", onClick: ev => { getGTP(); } }, isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, " Please wait..."), !isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("span", null, " Get Response"), isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_0__.Spinner, null)), openAi.reponse != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)("div", { className: "cursor-pointer whitespace-pre-line p-2 hover:bg-gray-200", title: "Click to replace text.", onClick: ev => { //var options = { ...text.options, content: openAi.reponse }; //setAttributes({ text: { ...text, options: options } }); } }, openAi.reponse))); } class PGcssOpenaiArticleWriter extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { args, onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_1__.createElement)(Html, { args: args, onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGcssOpenaiArticleWriter); /***/ }), /***/ "./src/components/page-styles/index.js": /*!*********************************************!*\ !*** ./src/components/page-styles/index.js ***! \*********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/edit.js"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _components_styles__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/styles */ "./src/components/styles/index.js"); const { Component } = wp.element; var myStore = wp.data.select("postgrid-shop"); function Html(props) { if (!props.warn) { return null; } const pgClipboard = localStorage.getItem("pgPageStyles"); const [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [pageCssObj, setpageCssObj] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); const [pageStylsObj, setpageStylsObj] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); const [pageStylesClipboardObj, setPageStylesClipboardObj] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); //var [breakPointX, setBreakPointX] = useState(myStore.getBreakPoint()); console.log(typeof pageStylsObj); const [copyPrams, setCopyPrams] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ isCopied: false, isError: false, errorMessage: "" }); const [pastePrams, setpastePrams] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ init: false, isPasted: false, isError: false, errorMessage: "" }); const [resetPrams, setresetPrams] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ isReset: false, isError: false, errorMessage: "" }); const [clipboard, setclipboard] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(pgClipboard == null ? [] : JSON.parse(pgClipboard)); const postType = wp.data.select("core/editor").getCurrentPostType(); const postId = wp.data.select("core/editor").getCurrentPostId(); const { deviceType } = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_3__.useSelect)(select => { const { __experimentalGetPreviewDeviceType } = select("core/edit-post"); return { deviceType: __experimentalGetPreviewDeviceType() }; }, []); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { generateCss(); update_post(); }, [pageCssObj]); // useEffect(() => { // console.log('generateCss'); // if (pageStylsObj != null) { // generateCss(); // } // }, []); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { localStorage.setItem("pgPageStyles", JSON.stringify(clipboard)); }, [clipboard]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { update_post(); //localStorage.setItem("pgPageStyles", JSON.stringify(clipboard)); generateCss(); }, [pageStylsObj]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var postTypeX = postType; if (postType == "post") { var postTypeX = "posts"; } if (postType == "page") { var postTypeX = "pages"; } _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/wp/v2/" + postTypeX + "/" + postId, method: "POST" }).then(res => { console.log(res.pgc_meta); // if (pageStylsObj == null) { // } setpageStylsObj(typeof res.pgc_meta == "string" ? [] : res.pgc_meta); generateCss(); }); }, []); function update_post() { setisLoading(true); var postTypeX = postType; if (postType == "post") { var postTypeX = "posts"; } if (postType == "page") { var postTypeX = "pages"; } _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: "/wp/v2/" + postTypeX + "/" + postId, method: "POST", data: { pgc_meta: pageStylsObj } }).then(res => { setisLoading(false); }); } function generateCss() { var selectorPrefix = ".editor-styles-wrapper "; var cssObj = {}; pageStylsObj != null && pageStylsObj.map(item => { Object.entries(item).map(arg => { var sudoSrc = arg[0]; var sudoArgs = arg[1]; if (sudoSrc != "options" && sudoArgs != null) { var selector = selectorPrefix + myStore.getElementSelector(sudoSrc, item.options.selector); var elemetnCssObj = myStore.generateElementCss(item, selector); Object.entries(arg[1]).map(x => { var attr = x[0]; var cssPropty = myStore.cssAttrParse(attr); if (cssObj[selector] == undefined) { cssObj[selector] = {}; } if (cssObj[selector][cssPropty] == undefined) { cssObj[selector][cssPropty] = {}; } cssObj[selector][cssPropty] = x[1]; }); } }); }); myStore.generateBlockCss(cssObj, "page-css", ""); } function onChangeStyleItem(sudoScource, newVal, attr, obj, extra) { var path = [sudoScource, attr, deviceType]; let objX = Object.assign({}, obj); const itemX = myStore.updatePropertyDeep(objX, path, newVal); var pageStylsObjX = [...pageStylsObj]; pageStylsObjX[extra.index] = itemX; // props.onChange(pageStylsObj); setpageStylsObj(pageStylsObjX); var elementSelector = myStore.getElementSelector(sudoScource, obj.options.selector); var cssPropty = myStore.cssAttrParse(attr); if (pageCssObj[elementSelector] == undefined) { pageCssObj[elementSelector] = {}; } var cssPath = [elementSelector, cssPropty, deviceType]; const cssObject = myStore.updatePropertyDeep(pageCssObj, cssPath, newVal); setpageCssObj(cssObject); } function onRemoveStyleItem(sudoScource, key, obj, extra) { var itemX = myStore.deletePropertyDeep(obj, [sudoScource, key, deviceType]); var pageStylsObjX = [...pageStylsObj]; pageStylsObjX[extra.index] = itemX; // props.onChange(pageStylsObj); setpageStylsObj(pageStylsObjX); var elementSelector = myStore.getElementSelector(sudoScource, obj.options.selector); var cssPropty = myStore.cssAttrParse(key); var cssObject = myStore.deletePropertyDeep(pageCssObj, [elementSelector, cssPropty, deviceType]); setpageCssObj(cssObject); } // function onBulkAddItem(sudoScource, cssObj, obj, extra) { // let objX = Object.assign({}, obj); // objX[sudoScource] = cssObj; // // setAttributes({ postTitle: obj }); // setpageStylsObj(objX); // var selector = myStore.getElementSelector( // sudoScource, // obj.options.selector // ); // var stylesObj = {}; // Object.entries(cssObj).map((args) => { // var attr = args[0]; // var cssPropty = myStore.cssAttrParse(attr); // if (stylesObj[selector] == undefined) { // stylesObj[selector] = {}; // } // if (stylesObj[selector][cssPropty] == undefined) { // stylesObj[selector][cssPropty] = {}; // } // stylesObj[selector][cssPropty] = args[1]; // }); // var cssItems = { ...blockCssY.items }; // console.log(cssItems); // var cssItemsX = { ...cssItems, ...stylesObj }; // setAttributes({ blockCssY: { items: cssItemsX } }); // } function onAddStyleItem(sudoScource, key, obj, extra) { const itemX = myStore.onAddStyleItem(sudoScource, key, obj); var pageStylsObjX = [...pageStylsObj]; pageStylsObjX[extra.index] = itemX; setpageStylsObj(pageStylsObjX); } const copyObjectToClipboard = obj => { console.log(obj); // var objZ = JSON.parse(obj); // var objX = { ...objZ }; // objX.pgStyle = true; // var objStr = JSON.stringify(objX); const jsonString = JSON.stringify(obj); console.log(jsonString); // .writeText(objStr) navigator.clipboard.writeText(jsonString).then(() => {}).catch(err => { console.error("Could not copy object: ", err); // Handle errors here }); }; const [isPgClipboardData, setIsPgClipboardData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(true); const [pgCount, setPgCount] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(0); // useEffect(() => { // checkClipboardData(); // }, [pgCount]); // const checkClipboardData = async () => { // try { // const clipboardData = await navigator.clipboard.readText(); // console.log(clipboardData); // if (clipboardData) { // console.log(clipboardData); // setIsPgClipboardData(true); // // const jsonString = JSON.stringify(clipboardData); // // console.log(typeof jsonString); // setPgClipboardData(jsonString); // // Perform actions as needed when clipboard has data // } else { // console.log("Clipboard is empty"); // // Perform actions when clipboard is empty // } // } catch (error) { // console.error("Error reading clipboard:", error); // // Handle errors if any // } // }; const handlePasteFromClipboard = async () => { try { const clipboardData = await navigator.clipboard.readText(); if (clipboardData) { const contentX = JSON.parse(clipboardData); setpageStylsObj(JSON.parse(contentX)); } } catch (error) {} }; var RemoveStyleObj = function ({ title, index }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { var pageStylsObjX = [...pageStylsObj]; var sdsd = pageStylsObjX.splice(index, 1); setpageStylsObj(pageStylsObjX); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, title)); }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3 flex items-center gap-2" }, isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 my-3 cursor-pointer rounded-sm inline-block text-white px-3 py-1", onClick: ev => { var pageStylsObjX = pageStylsObj == undefined ? [] : pageStylsObj; console.log(pageStylsObjX); var sdsd = pageStylsObjX.concat({ options: { selector: ".selector" }, styles: {} }); setpageStylsObj(sdsd); } }, "Add"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 my-3 cursor-pointer rounded-sm inline-block text-white px-3 py-1", onClick: ev => { var styleStr = JSON.stringify(pageStylsObj); if (styleStr == null) { alert("Style is empty"); return; } setPgCount(pgCount + 1); clipboard.push({ content: styleStr, label: Date.now() }); setclipboard(clipboard); copyObjectToClipboard(styleStr); localStorage.setItem("pgPageStyles", JSON.stringify(clipboard)); setCopyPrams({ ...copyPrams, isCopied: true }); setTimeout(() => { setCopyPrams({ ...copyPrams, isCopied: false }); }, 2000); } }, "Copy Styles", copyPrams.isCopied && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom left" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-2" }, "Coppied"))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-blue-500 my-3 cursor-pointer rounded-sm inline-block text-white px-3 py-1" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { onClick: ev => { ev.stopPropagation(); setPgCount(pgCount + 1); setpastePrams({ ...pastePrams, init: !pastePrams.init }); } }, "Paste", clipboard.length != 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 ml-2 rounded-sm text-white px-1" }, clipboard != null ? clipboard.length : 0)), pastePrams.init && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom left" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "w-52" }, clipboard.length == 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "py-1 px-3" }, "Paste is empty!"), clipboard.map((item, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center py-1 px-3 hover:bg-blue-200 justify-between" }, (item.edit == null || item.edit == false) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "cursor-pointer", onClick: ev => { var clipboardX = [...clipboard]; var content = clipboardX[index].content; var pageStylsObjX = [...pageStylsObj]; console.log(content); console.log(typeof content); console.log(JSON.parse(content)); if (content.length == 0) { alert("Style is empty"); return; } // pageStylsObjX[index].options.selector = value setpageStylsObj(JSON.parse(content)); } }, item.label), item.edit && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "my-3", placeholder: "", value: item.label, onChange: value => { var clipboardX = [...clipboard]; clipboardX[index].label = value; setclipboard(clipboardX); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "hover:bg-blue-500 cursor-pointer hover:text-white py-1 px-1", onClick: ev => { //item.edit = true; var clipboardX = [...clipboard]; clipboardX[index].edit = !item.edit; setclipboard(clipboardX); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "hover:bg-red-500 cursor-pointer hover:text-white py-1 px-1", onClick: ev => { //item.edit = true; var clipboardX = [...clipboard]; clipboardX.splice(index, 1); setclipboard(clipboardX); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_5__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_6__["default"] })))); }), isPgClipboardData && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { onClick: handlePasteFromClipboard }, "hello"))))), pageStylsObj == null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Spinner, null)), pageStylsObj != null && typeof pageStylsObj == "object" && pageStylsObj.map((item, index) => { //var itemIndex = item[0]; //var itemArgs = item[1]; var options = item.options; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveStyleObj, { title: options.selector, index: index }), initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { className: "my-3", label: "", help: "", placeholder: ".element-class or #element-id", value: options.selector, onChange: value => { // setopenAi({ ...openAi, promt: value }) //item.options.selector = value var pageStylsObjX = [...pageStylsObj]; pageStylsObjX[index].options.selector = value; setpageStylsObj(pageStylsObjX); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_styles__WEBPACK_IMPORTED_MODULE_4__["default"], { extra: { index: index }, obj: item, onChange: onChangeStyleItem, onAdd: onAddStyleItem, onRemove: onRemoveStyleItem // onBulkAdd={onBulkAddItem} })); })); } class PGPageStyles extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { onChange: onChange, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGPageStyles); /***/ }), /***/ "./src/components/request-a-template/index.js": /*!****************************************************!*\ !*** ./src/components/request-a-template/index.js ***! \****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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_icons__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* 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_input_text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/input-text */ "./src/components/input-text/index.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [searchPrams, setsearchPrams] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ title: "", content: '', files: [], budget: 50, email: '', name: "", status: 'idle' }); var [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const ALLOWED_MEDIA_TYPES = ['image']; let budgetArgs = { custom: { label: 'Custom', value: '' }, '50-': { label: 'Less than 50$', value: '50-' }, 50: { label: '50$+', value: 50 }, 100: { label: '100$+', value: 100 }, 200: { label: '200$+', value: 200 }, 300: { label: '300$+', value: 300 }, 500: { label: '500$+', value: 500 } }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: '/post-grid/v2/get_site_details', method: 'POST', data: {} }).then(res => { setsearchPrams({ ...searchPrams, email: res.email, name: res.name }); }); }, []); function senMail() { setIsLoading(true); var htmlBody = ''; htmlBody += '<p style="font-weight:bold;font-size:18px">' + searchPrams.title + '</p>'; htmlBody += '<p style="font-weight:bold">Budget: ' + searchPrams.budget + '$</p>'; htmlBody += '<p style="font-weight:bold">Email: ' + searchPrams.email + '</p>'; htmlBody += '<p></p>'; htmlBody += searchPrams.content; htmlBody += '<p>Design Files:</p>'; searchPrams.files.map(x => { htmlBody += '<p><a href="' + x + '"><img style="width:200px;height:auto" src="' + x + '"/></a></p>'; }); var postData = { subject: '#Combo Blcoks - Template Request', body: htmlBody, email_to: 'support@pickplugins.com', email_from: searchPrams.email, email_from_name: searchPrams.name, reply_to: searchPrams.email, reply_to_name: searchPrams.name, attachments: searchPrams.files }; _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default()({ path: '/post-grid/v2/send_mail', method: 'POST', data: postData }).then(res => { var mail_sent = res.mail_sent; if (mail_sent) { setsearchPrams({ ...searchPrams, status: 'success' }); } else { setsearchPrams({ ...searchPrams, status: 'fail' }); } setTimeout(() => { setsearchPrams({ ...searchPrams, status: 'idle' }); }, 4000); setIsLoading(false); }); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { id: "requestTemplate", className: "pg-setting-input-text" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "grid grid-cols-2 gap-5 items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: "pg-font mb-3 block text-white text-base" }, "Template Title"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_text__WEBPACK_IMPORTED_MODULE_5__["default"], { className: "w-full !py-1 !rounded-none pg-font ", type: "text", placeholder: "Write a short title", value: searchPrams.title, onChange: ev => { var newVal = ev.target.value; setsearchPrams({ ...searchPrams, title: newVal }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: " pg-font mt-5 mb-3 block text-white text-base" }, "Template Details"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.RichText, { className: "w-full pg-font bg-white pb-5 p-2", tagName: "div", value: searchPrams.content, allowedFormats: ["core/bold", "core/italic", "core/link"], onChange: content => { setsearchPrams({ ...searchPrams, content: content }); }, placeholder: "Write details about your design..." }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.PanelRow, { className: "mb-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: " pg-font mt-5 mb-3 block text-white text-base" }, "Design Files"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaUploadCheck, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_block_editor__WEBPACK_IMPORTED_MODULE_3__.MediaUpload, { className: "bg-blue-500 pg-font ", onSelect: media => { var filesX = searchPrams.files.push(media.url); console.log(searchPrams.files); setsearchPrams({ ...searchPrams, files: searchPrams.files }); }, onClose: () => {}, allowedTypes: ALLOWED_MEDIA_TYPES, render: ({ open }) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Button, { className: " pg-font bg-blue-500 hover:bg-blue-600 text-white hover:text-white", onClick: open }, "Open Media Library") }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex mb-5" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, searchPrams.files.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " bg-white m-3 my-2 p-3 relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { src: x, alt: "", className: "w-32" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer pg-font absolute top-0 right-0 p-1 bg-red-500 hover:bg-red-600 inline-block", onClick: () => { var filesX = searchPrams.files.splice(index, 1); console.log(filesX); setsearchPrams({ ...searchPrams, files: searchPrams.files }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_7__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_8__["default"], className: "fill-white" }))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: " pg-font text-white text-base mr-3" }, "Estimated Budget"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_6__["default"], { className: "text-white", position: "bottom right", variant: "secondary", options: budgetArgs, buttonTitle: "Choose", btnClass: "!border-none pg-font !bg-blue-500 !text-white", onChange: (option, index) => { setsearchPrams({ ...searchPrams, budget: option.value }); } })), budgetArgs[searchPrams.budget] == undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_text__WEBPACK_IMPORTED_MODULE_5__["default"], { className: " !py-1 my-3 pg-font !rounded-none inline-block", type: "text", placeholder: "", value: searchPrams.budget, onChange: ev => { var newVal = ev.target.value; setsearchPrams({ ...searchPrams, budget: newVal }); } }), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "inline-block mx-2 pg-font text-white" }, "USD")), budgetArgs[searchPrams.budget] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "text-gray-800 text-[18px] pg-font" }, budgetArgs[searchPrams.budget] == undefined ? "" : budgetArgs[searchPrams.budget].label)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: " mb-3 mt-5 block pg-font text-white text-base" }, "You Email"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_text__WEBPACK_IMPORTED_MODULE_5__["default"], { className: "w-full !py-1 pg-font !rounded-none ", type: "text", placeholder: "", value: searchPrams.email, onChange: ev => { var newVal = ev.target.value; setsearchPrams({ ...searchPrams, email: newVal }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", { for: "", className: " my-3 block pg-font text-white text-base" }, "You Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_input_text__WEBPACK_IMPORTED_MODULE_5__["default"], { className: "w-full !py-1 pg-font !rounded-none ", type: "text", placeholder: "", value: searchPrams.name, onChange: ev => { var newVal = ev.target.value; setsearchPrams({ ...searchPrams, name: newVal }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "py-5 px-10" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("p", { className: "text-base pg-font " }, "By sending mail, you are requested to follow these terms."), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("ul", { className: "my-3 text-base list-inside" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", { className: "list-disc pg-font " }, "We do not provide design made by 3rd party blocks. default blocks may use."), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("li", { className: "list-disc pg-font " }, "We do not provide immediate/emmargency delivery. But we try our best as soon as possible.")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex bg-blue-600 pg-font justify-center items-center rounded-md text-white font-bold text-base text-center cursor-pointer hover:bg-blue-500 px-10 py-3 my-5", onClick: ev => { senMail(); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, "Send Mail"), isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_4__.Spinner, { className: "!m-0 !mx-3" }))), searchPrams.status == "success" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-white pg-font text-green-800 font-bold text-base p-2 px-4" }, "Mial has sent. Our team will contact soon."), searchPrams.status == "fail" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-white pg-font text-red-500 font-bold text-base p-2 px-4" }, "Sorry, Unable to send mail.")))); } class PGRequestTemplate extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGRequestTemplate); /***/ }), /***/ "./src/components/sidebars/index.js": /*!******************************************!*\ !*** ./src/components/sidebars/index.js ***! \******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react-sortablejs */ "./node_modules/react-sortablejs/dist/index.js"); /* harmony import */ var react_sortablejs__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react_sortablejs__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__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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 _components_dropdown__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_css_keyframes__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/css-keyframes */ "./src/components/css-keyframes/index.js"); /* harmony import */ var _components_openai_article_writer__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/openai-article-writer */ "./src/components/openai-article-writer/index.js"); /* harmony import */ var _components_global_styles__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/global-styles */ "./src/components/global-styles/index.js"); /* harmony import */ var _components_page_styles__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/page-styles */ "./src/components/page-styles/index.js"); const { Component } = wp.element; var myStore = wp.data.select('postgrid-shop'); function Html(props) { if (!props.warn) { return null; } var isLoaded = props.isLoaded; var optionDataDefault = { customFonts: [], googleFonts: [], container: { width: '1150px' }, breakpoints: [], colors: [], editor: { width: '1150px' }, blocks: { disabled: [] }, blockInserter: { postGridPositon: '' }, // Category positon openAI: { apiKey: '' }, keyframes: {}, globalStyles: [{ options: { selector: "a" }, styles: {} }, { options: { selector: "h1" }, styles: {} }, { options: { selector: "h2" }, styles: {} }], pageStyles: [{ options: { selector: "a" }, styles: {} }, { options: { selector: "h1" }, styles: {} }, { options: { selector: "h2" }, styles: {} }] }; var breakPointX = myStore.getBreakPoint(); var [optionData, setoptionData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(optionDataDefault); // Using the hook. console.log(optionData); var [dataLoaded, setdataLoaded] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Using the hook. var [isLoading, setisLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); // Using the hook. var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [colorPopup, setcolorPopup] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [blockCategories, setblockCategories] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var isLoaded = props.isLoaded; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: '/post-grid/v2/get_options', method: 'POST', data: { option: 'post_grid_block_editor' } }).then(res => { setdataLoaded(true); if (res.length != 0) { setoptionData(res); } }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: '/post-grid/v2/block_categories', method: 'POST', data: {} }).then(res => { var items = []; res.map(x => { items.push({ label: x.title, value: x.slug }); }); setblockCategories(items); }); }, [isLoaded]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (optionData != null) { clearTimeout(debounce); debounce = setTimeout(() => { updateOption(); }, 1000); } }, [optionData]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { wp.domReady(function () { optionData.blocks.disabled.forEach(function (blockName) { if (blockName && wp.blocks.getBlockType(blockName) !== undefined) { wp.blocks.unregisterBlockType(blockName); } }); }); }, [optionData.blocks.disabled]); function updateOption() { setisLoading(true); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default()({ path: '/post-grid/v2/update_options', method: 'POST', data: { name: 'post_grid_block_editor', value: optionData } }).then(res => { setisLoading(false); //setoptionData(res) }); } var unitArgs = { px: { "label": "PX", "value": "px" }, em: { "label": "EM", "value": "em" }, rem: { "label": "REM", "value": "rem" }, auto: { "label": "AUTO", "value": "auto" }, "%": { "label": "%", "value": "%" }, cm: { "label": "CM", "value": "cm" }, mm: { "label": "MM", "value": "mm" }, in: { "label": "IN", "value": "in" }, pt: { "label": "PT", "value": "pt" }, pc: { "label": "PC", "value": "pc" }, ex: { "label": "EX", "value": "ex" }, ch: { "label": "CH", "value": "ch" }, vw: { "label": "VW", "value": "vw" }, vh: { "label": "VH", "value": "vh" }, vmin: { "label": "VMIN", "value": "vmin" }, vmax: { "label": "VMAX", "value": "vmax" } }; var fontWeightArgs = { 'normal': { "label": "normal", "value": "normal" }, 'bold': { "label": "bold", "value": "bold" }, 'bolder': { "label": "bolder", "value": "bolder" }, 'lighter': { "label": "lighter", "value": "lighter" }, '100': { "label": "100", "value": "100" }, '200': { "label": "200", "value": "200" }, '300': { "label": "300", "value": "300" }, '400': { "label": "400", "value": "400" }, '500': { "label": "500", "value": "500" }, '600': { "label": "600", "value": "600" }, '700': { "label": "700", "value": "700" }, '800': { "label": "800", "value": "800" }, '900': { "label": "900", "value": "900" } }; var fontStyleArgs = { normal: { "label": "normal", "value": "normal" }, italic: { "label": "italic", "value": "italic" }, oblique: { "label": "oblique", "value": "oblique" } }; var fontStretchArgs = { 'ultra-condensed': { "label": "ultra-condensed", "value": "ultra-condensed" }, 'extra-condensed': { "label": "extra-condensed", "value": "extra-condensed" }, 'condensed': { "label": "condensed", "value": "condensed" }, 'semi-condensed': { "label": "semi-condensed", "value": "semi-condensed" }, 'normal': { "label": "normal", "value": "normal" }, 'semi-expanded': { "label": "semi-expanded", "value": "semi-expanded" }, 'expanded': { "label": "expanded", "value": "expanded" }, 'extra-expanded': { "label": "extra-expanded", "value": "extra-expanded" }, 'ultra-expanded': { "label": "ultra-expanded", "value": "ultra-expanded" } }; var pgBlocks = { "post-grid/post-grid": { label: "Post Grid", value: "post-grid/post-grid" }, "post-grid/post-grid-filterable": { label: "Post Grid - Filterable", value: "post-grid/post-grid-filterable" }, "post-grid/content-slider": { label: "Content Slider", value: "post-grid/content-slider" }, "post-grid/content-slider-item": { label: "Content Slider Item", value: "post-grid/content-slider-item" }, "post-grid/popup": { label: "Popup", value: "post-grid/popup" }, "post-grid/post-title": { label: "Post title", value: "post-grid/post-title" }, "post-grid/post-excerpt": { label: "Post Excerpt", value: "post-grid/post-excerpt" }, "post-grid/post-featured-image": { label: "Post Featured Image", value: "post-grid/post-featured-image" }, "post-grid/image": { label: "Image", value: "post-grid/image" }, "post-grid/post-author": { label: "Post Author", value: "post-grid/post-author" }, "post-grid/post-author-fields": { label: "Post Author Fields", value: "post-grid/post-author-fields" }, "post-grid/post-categories": { label: "Post Categories", value: "post-grid/post-categories" }, "post-grid/post-tags": { label: "Post Tags", value: "post-grid/post-tags" }, "post-grid/post-taxonomies": { label: "Post Taxonomies", value: "post-grid/post-taxonomies" }, "post-grid/post-date": { label: "Post Date", value: "post-grid/post-date" }, "post-grid/post-meta": { label: "Post Meta", value: "post-grid/post-meta" }, "post-grid/read-more": { label: "Read More", value: "post-grid/read-more" }, "post-grid/post-comment-count": { label: "Post Comment Count", value: "post-grid/post-comment-count" }, "post-grid/progress-bar": { label: "Progress Bar", value: "post-grid/progress-bar" }, "post-grid/form-wrap": { label: "Form Wrap", value: "post-grid/form-wrap" }, "post-grid/form-field-input": { label: "Form Field Input", value: "post-grid/form-field-input" }, "post-grid/form-field-select": { label: "Form Field Select", value: "post-grid/form-field-select" }, "post-grid/form-field-checkbox": { label: "Form Field Checkbox", value: "post-grid/form-field-checkbox" }, "post-grid/form-field-radio": { label: "Form Field Radio", value: "post-grid/form-field-radio" }, "post-grid/form-field-textarea": { label: "Form Field Textarea", value: "post-grid/form-field-textarea" }, "post-grid/form-field-submit": { label: "Form Field Submit", value: "post-grid/form-field-submit" }, "post-grid/form-field-file-multi": { label: "Form Field File Multi", value: "post-grid/form-field-file-multi" }, "post-grid/form-field-file": { label: "Form Field File", value: "post-grid/form-field-file" }, "post-grid/list": { label: "List", value: "post-grid/list" }, "post-grid/number-counter": { label: "Number Counter", value: "post-grid/number-counter" }, "post-grid/icon": { label: "Icon", value: "post-grid/icon" }, "post-grid/text": { label: "Text", value: "post-grid/text" }, "post-grid/star-rate": { label: "Star Rate", value: "post-grid/star-rate" }, "post-grid/breadcrumb": { label: "Breadcrumb", value: "post-grid/breadcrumb" }, "post-grid/shortcode": { label: "Shortcode", value: "post-grid/shortcode" }, "post-grid/social-share": { label: "Social Share", value: "post-grid/social-share" }, "post-grid/terms-list": { label: "Terms List", value: "post-grid/terms-list" }, "post-grid/layers": { label: "Layers", value: "post-grid/layers" }, "post-grid/layer": { label: "Layer", value: "post-grid/layer" }, "post-grid/flex-wrap": { label: "Flex Wrap", value: "post-grid/flex-wrap" }, "post-grid/flex-wrap-item": { label: "Flex Wrap Item", value: "post-grid/flex-wrap-item" }, "post-grid/grid-wrap": { label: "Grid Wrap", value: "post-grid/grid-wrap" }, "post-grid/grid-wrap-item": { label: "Grid Wrap Item", value: "post-grid/grid-wrap-item" }, "post-grid/image-gallery": { label: "Image Gallery", value: "post-grid/image-gallery" }, "post-grid/image-gallery-item": { label: "image Gallery Item", value: "post-grid/image-gallery-item" }, "post-grid/accordion-nested": { label: "Accordion Nested", value: "post-grid/accordion-nested" }, "post-grid/accordion-nested-item": { label: "Accordion Nested Item", value: "post-grid/accordion-nested-item" }, "post-grid/tabs-nested": { label: "Tabs Nested", value: "post-grid/tabs-nested" }, "post-grid/tabs-nested-item": { label: "Tabs Nested Item", value: "post-grid/tabs-nested-item" }, "post-grid/post": { label: "Post", value: "post-grid/post" }, "post-grid/accordion": { label: "Accordion", value: "post-grid/accordion" }, "post-grid/tabs": { label: "Tabs", value: "post-grid/tabs" } }; (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { var width = optionData.editor.width; var str = `body.block-editor-page #editor .wp-block { max-width: ${width}; }`; var wpfooter = document.getElementById("wpfooter"); var divWrap = document.getElementById("pg-editor-width"); if (divWrap != undefined) { document.getElementById("pg-editor-width").outerHTML = ""; } var divWrap = '<div id="pg-editor-width"></div>'; wpfooter.insertAdjacentHTML("beforeend", divWrap); var csswrappg = document.getElementById("pg-editor-width"); var contWidth = "<style>" + str + "</style>"; csswrappg.insertAdjacentHTML("beforeend", contWidth); }, [optionData]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative pg-setting-input-text" }, (!dataLoaded || isLoading) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute w-full text-center p-3 top-0 left-0" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Spinner, null)), dataLoaded && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Container Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalInputControl, { placeholder: "", type: "number", value: optionData.container.width == undefined ? '' : optionData.container.width.match(/-?\d+/g)[0], onChange: newVal => { var container = { ...optionData.container }; var widthValX = container.width == undefined || container.width.match(/-?\d+/g) == null ? 0 : container.width.match(/-?\d+/g)[0]; var widthUnitX = container.width == undefined || container.width.match(/[a-zA-Z%]+/g) == null ? 'px' : container.width.match(/[a-zA-Z%]+/g)[0]; var containerX = { ...optionData.container, width: newVal + widthUnitX }; setoptionData({ ...optionData, container: containerX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_5__["default"], { position: "bottom right", variant: "secondary", options: unitArgs, buttonTitle: optionData.container.width.match(/[a-zA-Z%]+/g) == null ? "Choose" : optionData.container.width.match(/[a-zA-Z%]+/g)[0], onChange: (option, index) => { var container = { ...optionData.container }; var widthValX = container.width == undefined || container.width.match(/-?\d+/g) == null ? 0 : container.width.match(/-?\d+/g)[0]; var widthUnitX = container.width == undefined || container.width.match(/[a-zA-Z%]+/g) == null ? 'px' : container.width.match(/[a-zA-Z%]+/g)[0]; var containerX = { ...optionData.container, width: widthValX + option.value }; setoptionData({ ...optionData, container: containerX }); }, values: '' })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Editor Width"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalInputControl, { placeholder: "", type: "number", value: optionData.editor.width.match(/-?\d+/g)[0], onChange: newVal => { var editor = { ...optionData.editor }; var widthValX = editor.width == undefined || editor.width.match(/-?\d+/g) == null ? 0 : editor.width.match(/-?\d+/g)[0]; var widthUnitX = editor.width == undefined || editor.width.match(/[a-zA-Z%]+/g) == null ? 'px' : editor.width.match(/[a-zA-Z%]+/g)[0]; var editorX = { ...optionData.editor, width: newVal + widthUnitX }; setoptionData({ ...optionData, editor: editorX }); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_5__["default"], { position: "bottom right", variant: "secondary", options: unitArgs, buttonTitle: optionData.editor.width.match(/[a-zA-Z%]+/g) == null ? "Choose" : optionData.editor.width.match(/[a-zA-Z%]+/g)[0], onChange: (option, index) => { var editor = { ...optionData.editor }; var widthValX = editor.width == undefined || editor.width.match(/-?\d+/g) == null ? 0 : editor.width.match(/-?\d+/g)[0]; var widthUnitX = editor.width == undefined || editor.width.match(/[a-zA-Z%]+/g) == null ? 'px' : editor.width.match(/[a-zA-Z%]+/g)[0]; var editorX = { ...optionData.editor, width: widthValX + option.value }; setoptionData({ ...optionData, editor: editorX }); }, values: '' }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { title: "Custom Fonts", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { // className="inline-block px-4 py-1 my-3 bg-gray-400 text-white rounded-sm cursor-pointer" className: "pg-font flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var customFonts = optionData.customFonts; customFonts.push({ family: "Font Family", weight: "", style: "", stretch: "", src: [] }); setoptionData({ ...optionData, customFonts: customFonts }); } }, "Add"), optionData.customFonts.map((x, i) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { title: x.family, initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 p-1 cursor-pointer", onClick: ev => { var customFonts = optionData.customFonts; customFonts.splice(i, 1); setoptionData({ ...optionData, customFonts: customFonts }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Family Name"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalInputControl, { placeholder: "", value: x.family, onChange: newVal => { var customFonts = optionData.customFonts; customFonts[i].family = newVal; clearTimeout(debounce); debounce = setTimeout(() => { setoptionData({ ...optionData, customFonts: customFonts }); }, 1000); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Font URL's"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { // className="inline-block px-4 my-3 py-1 bg-gray-400 text-white rounded-sm cursor-pointer" className: "pg-font flex gap-2 justify-center my-4 cursor-pointer py-2 px-4 capitalize bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700", onClick: ev => { var customFonts = optionData.customFonts; customFonts[i].src.push({ url: "", format: "" }); setoptionData({ ...optionData, customFonts: customFonts }); } }, "Add")), x.src.map((srcArg, j) => { var url = srcArg.url; var format = srcArg.format; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex my-2 items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.__experimentalInputControl, { placeholder: "", value: url, onChange: newVal => { var customFonts = optionData.customFonts; customFonts[i].src[j].url = newVal; clearTimeout(debounce); debounce = setTimeout(() => { setoptionData({ ...optionData, customFonts: customFonts }); }, 1000); } }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 p-1 cursor-pointer", onClick: ev => { var customFonts = optionData.customFonts; customFonts[i].src.splice(1, j); setoptionData({ ...optionData, customFonts: customFonts }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { fill: "#fff", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"] }))); }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Font Wieght"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_5__["default"], { position: "bottom right", variant: "secondary", options: fontWeightArgs, buttonTitle: fontWeightArgs[x.weight] == undefined ? "Choose" : x.weight, onChange: (option, index) => { var customFonts = optionData.customFonts; customFonts[i].weight = option.value; setoptionData({ ...optionData, customFonts: customFonts }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Font Style"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_5__["default"], { position: "bottom right", variant: "secondary", options: fontStyleArgs, buttonTitle: fontStyleArgs[x.style] == undefined ? "Choose" : x.style, onChange: (option, index) => { var customFonts = optionData.customFonts; customFonts[i].style = option.value; setoptionData({ ...optionData, customFonts: customFonts }); }, values: "" })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelRow, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("label", null, "Font Stretch"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_5__["default"], { position: "bottom right", variant: "secondary", options: fontStretchArgs, buttonTitle: fontStretchArgs[x.stretch] == undefined ? "Choose" : x.stretch, onChange: (option, index) => { var customFonts = optionData.customFonts; customFonts[i].stretch = option.value; setoptionData({ ...optionData, customFonts: customFonts }); }, values: "" }))))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { title: "Colors", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-3" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "inline-block px-4 py-1 bg-gray-400 text-white rounded-sm cursor-pointer", onClick: ev => { var colors = optionData.colors; colors.push('#ffffff'); setoptionData({ ...optionData, colors: colors }); } }, "Add"), optionData.colors.map((x, i) => { var placeholderStyle = { backgroundImage: 'repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0),repeating-linear-gradient(45deg,#e0e0e0 25%,transparent 0,transparent 75%,#e0e0e0 0,#e0e0e0)', backgroundPosition: '0 0,10px 10px', backgroundSize: '20px 20px', boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; var btnStyle = { backgroundColor: x, boxShadow: 'inset 0 0 0 1px rgb(0 0 0 / 20%)', cursor: 'pointer' }; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center border my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "bg-red-500 p-1 cursor-pointer", onClick: ev => { var colors = optionData.colors; colors.splice(i, 1); setoptionData({ ...optionData, colors: colors }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"], { fill: '#fff', icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-3 py-1 bg-gray-400 text-white rounded-sm" }, x)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { style: placeholderStyle }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "w-20 h-9 inline-block border", style: btnStyle, onClick: ev => { ev.preventDefault(); ev.stopPropagation(); setcolorPopup(colorPopup == null ? i : null); } }), colorPopup != null && colorPopup == i && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.Popover, { position: "bottom right" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.ColorPalette, { value: x, enableAlpha: true, onChange: newVal => { var colors = optionData.colors; colors[i] = newVal; setoptionData({ ...optionData, colors: colors }); } }))))); }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_2__.PanelBody, { title: "Page Styles", initialOpen: false }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_page_styles__WEBPACK_IMPORTED_MODULE_9__["default"], { onChange: prams => { //setoptionData({ ...optionData, pageStyles: prams }) } }))))); } class PGsidebars extends Component { constructor(props) { super(props); this.state = { showWarning: true, isLoaded: false }; this.handleToggleClick = this.handleToggleClick.bind(this); } componentDidMount() { setTimeout(() => { this.setState(state => ({ isLoaded: !state.isLoaded })); }, 1000); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { onChange } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { onChange: onChange, warn: this.state.showWarning, isLoaded: this.state.isLoaded }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGsidebars); /***/ }), /***/ "./src/components/styles/index.js": /*!****************************************!*\ !*** ./src/components/styles/index.js ***! \****************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_122__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_123__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_124__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/arrow-right.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_dropdown_sudo_selector__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/dropdown-sudo-selector */ "./src/components/dropdown-sudo-selector/index.js"); /* harmony import */ var _components_css_align_content__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/css-align-content */ "./src/components/css-align-content/index.js"); /* harmony import */ var _components_css_align_items__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../../components/css-align-items */ "./src/components/css-align-items/index.js"); /* harmony import */ var _components_css_align_self__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ../../components/css-align-self */ "./src/components/css-align-self/index.js"); /* harmony import */ var _components_css_aspect_ratio__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ../../components/css-aspect-ratio */ "./src/components/css-aspect-ratio/index.js"); /* harmony import */ var _components_css_backface_visibility__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ../../components/css-backface-visibility */ "./src/components/css-backface-visibility/index.js"); /* harmony import */ var _components_css_background_attachment__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../components/css-background-attachment */ "./src/components/css-background-attachment/index.js"); /* harmony import */ var _components_css_background_blend_mode__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../components/css-background-blend-mode */ "./src/components/css-background-blend-mode/index.js"); /* harmony import */ var _components_css_background_clip__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../components/css-background-clip */ "./src/components/css-background-clip/index.js"); /* harmony import */ var _components_css_background_color__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ../../components/css-background-color */ "./src/components/css-background-color/index.js"); /* harmony import */ var _components_css_bg_color__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ../../components/css-bg-color */ "./src/components/css-bg-color/index.js"); /* harmony import */ var _components_css_background_image__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ../../components/css-background-image */ "./src/components/css-background-image/index.js"); /* harmony import */ var _components_css_background_origin__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ../../components/css-background-origin */ "./src/components/css-background-origin/index.js"); /* harmony import */ var _components_css_background_position__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ../../components/css-background-position */ "./src/components/css-background-position/index.js"); /* harmony import */ var _components_css_background_repeat__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ../../components/css-background-repeat */ "./src/components/css-background-repeat/index.js"); /* harmony import */ var _components_css_background_size__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ../../components/css-background-size */ "./src/components/css-background-size/index.js"); /* harmony import */ var _components_css_border__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ../../components/css-border */ "./src/components/css-border/index.js"); /* harmony import */ var _components_css_border_top__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ../../components/css-border-top */ "./src/components/css-border-top/index.js"); /* harmony import */ var _components_css_border_right__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ../../components/css-border-right */ "./src/components/css-border-right/index.js"); /* harmony import */ var _components_css_border_bottom__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ../../components/css-border-bottom */ "./src/components/css-border-bottom/index.js"); /* harmony import */ var _components_css_border_left__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ../../components/css-border-left */ "./src/components/css-border-left/index.js"); /* harmony import */ var _components_css_border_radius__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ../../components/css-border-radius */ "./src/components/css-border-radius/index.js"); /* harmony import */ var _components_css_border_image__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ../../components/css-border-image */ "./src/components/css-border-image/index.js"); /* harmony import */ var _components_css_bottom__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ../../components/css-bottom */ "./src/components/css-bottom/index.js"); /* harmony import */ var _components_css_border_collapse__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ../../components/css-border-collapse */ "./src/components/css-border-collapse/index.js"); /* harmony import */ var _components_css_border_spacing__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ../../components/css-border-spacing */ "./src/components/css-border-spacing/index.js"); /* harmony import */ var _components_css_backdrop_filter__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ../../components/css-backdrop-filter */ "./src/components/css-backdrop-filter/index.js"); /* harmony import */ var _components_css_box_shadow__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ../../components/css-box-shadow */ "./src/components/css-box-shadow/index.js"); /* harmony import */ var _components_css_box_sizing__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ../../components/css-box-sizing */ "./src/components/css-box-sizing/index.js"); /* harmony import */ var _components_css_clear__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ../../components/css-clear */ "./src/components/css-clear/index.js"); /* harmony import */ var _components_css_color__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ../../components/css-color */ "./src/components/css-color/index.js"); /* harmony import */ var _components_css_cursor__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ../../components/css-cursor */ "./src/components/css-cursor/index.js"); /* harmony import */ var _components_css_content__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ../../components/css-content */ "./src/components/css-content/index.js"); /* harmony import */ var _components_css_column_count__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ../../components/css-column-count */ "./src/components/css-column-count/index.js"); /* harmony import */ var _components_css_column_rule__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ../../components/css-column-rule */ "./src/components/css-column-rule/index.js"); /* harmony import */ var _components_css_clip__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ../../components/css-clip */ "./src/components/css-clip/index.js"); /* harmony import */ var _components_css_display__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ../../components/css-display */ "./src/components/css-display/index.js"); /* harmony import */ var _components_css_direction__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ../../components/css-direction */ "./src/components/css-direction/index.js"); /* harmony import */ var _components_css_filter__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ../../components/css-filter */ "./src/components/css-filter/index.js"); /* harmony import */ var _components_css_float__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ../../components/css-float */ "./src/components/css-float/index.js"); /* harmony import */ var _components_css_font_family__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ../../components/css-font-family */ "./src/components/css-font-family/index.js"); /* harmony import */ var _components_css_font_size__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ../../components/css-font-size */ "./src/components/css-font-size/index.js"); /* harmony import */ var _components_css_font_stretch__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ../../components/css-font-stretch */ "./src/components/css-font-stretch/index.js"); /* harmony import */ var _components_css_font_style__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ../../components/css-font-style */ "./src/components/css-font-style/index.js"); /* harmony import */ var _components_css_font_weight__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ../../components/css-font-weight */ "./src/components/css-font-weight/index.js"); /* harmony import */ var _components_css_font_variant_caps__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ../../components/css-font-variant-caps */ "./src/components/css-font-variant-caps/index.js"); /* harmony import */ var _components_css_flex_wrap__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ../../components/css-flex-wrap */ "./src/components/css-flex-wrap/index.js"); /* harmony import */ var _components_css_flex_direction__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ../../components/css-flex-direction */ "./src/components/css-flex-direction/index.js"); /* harmony import */ var _components_css_flex_shrink__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ../../components/css-flex-shrink */ "./src/components/css-flex-shrink/index.js"); /* harmony import */ var _components_css_flex_basis__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ../../components/css-flex-basis */ "./src/components/css-flex-basis/index.js"); /* harmony import */ var _components_css_user_select__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ../../components/css-user-select */ "./src/components/css-user-select/index.js"); /* harmony import */ var _components_css_flex_grow__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ../../components/css-flex-grow */ "./src/components/css-flex-grow/index.js"); /* harmony import */ var _components_css_flex_flow__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ../../components/css-flex-flow */ "./src/components/css-flex-flow/index.js"); /* harmony import */ var _components_css_grid_column_end__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ../../components/css-grid-column-end */ "./src/components/css-grid-column-end/index.js"); /* harmony import */ var _components_css_grid_column_start__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ../../components/css-grid-column-start */ "./src/components/css-grid-column-start/index.js"); /* harmony import */ var _components_css_grid_row_end__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ../../components/css-grid-row-end */ "./src/components/css-grid-row-end/index.js"); /* harmony import */ var _components_css_grid_row_start__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ../../components/css-grid-row-start */ "./src/components/css-grid-row-start/index.js"); /* harmony import */ var _components_css_grid_template_columns__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ../../components/css-grid-template-columns */ "./src/components/css-grid-template-columns/index.js"); /* harmony import */ var _components_css_grid_template_rows__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ../../components/css-grid-template-rows */ "./src/components/css-grid-template-rows/index.js"); /* harmony import */ var _components_css_height__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ../../components/css-height */ "./src/components/css-height/index.js"); /* harmony import */ var _components_css_justify_content__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ../../components/css-justify-content */ "./src/components/css-justify-content/index.js"); /* harmony import */ var _components_css_left__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ../../components/css-left */ "./src/components/css-left/index.js"); /* harmony import */ var _components_css_letter_spacing__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ../../components/css-letter-spacing */ "./src/components/css-letter-spacing/index.js"); /* harmony import */ var _components_css_line_height__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ../../components/css-line-height */ "./src/components/css-line-height/index.js"); /* harmony import */ var _components_css_list_style__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ../../components/css-list-style */ "./src/components/css-list-style/index.js"); /* harmony import */ var _components_css_margin__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ../../components/css-margin */ "./src/components/css-margin/index.js"); /* harmony import */ var _components_css_margin_top__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ../../components/css-margin-top */ "./src/components/css-margin-top/index.js"); /* harmony import */ var _components_css_margin_right__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ../../components/css-margin-right */ "./src/components/css-margin-right/index.js"); /* harmony import */ var _components_css_margin_bottom__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ../../components/css-margin-bottom */ "./src/components/css-margin-bottom/index.js"); /* harmony import */ var _components_css_margin_left__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ../../components/css-margin-left */ "./src/components/css-margin-left/index.js"); /* harmony import */ var _components_css_max_height__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ../../components/css-max-height */ "./src/components/css-max-height/index.js"); /* harmony import */ var _components_css_max_width__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ../../components/css-max-width */ "./src/components/css-max-width/index.js"); /* harmony import */ var _components_css_min_height__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ../../components/css-min-height */ "./src/components/css-min-height/index.js"); /* harmony import */ var _components_css_min_width__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ../../components/css-min-width */ "./src/components/css-min-width/index.js"); /* harmony import */ var _components_css_perspective__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ../../components/css-perspective */ "./src/components/css-perspective/index.js"); /* harmony import */ var _components_css_object_fit__WEBPACK_IMPORTED_MODULE_80__ = __webpack_require__(/*! ../../components/css-object-fit */ "./src/components/css-object-fit/index.js"); /* harmony import */ var _components_css_opacity__WEBPACK_IMPORTED_MODULE_81__ = __webpack_require__(/*! ../../components/css-opacity */ "./src/components/css-opacity/index.js"); /* harmony import */ var _components_css_outline__WEBPACK_IMPORTED_MODULE_82__ = __webpack_require__(/*! ../../components/css-outline */ "./src/components/css-outline/index.js"); /* harmony import */ var _components_css_outline_offset__WEBPACK_IMPORTED_MODULE_83__ = __webpack_require__(/*! ../../components/css-outline-offset */ "./src/components/css-outline-offset/index.js"); /* harmony import */ var _components_css_order__WEBPACK_IMPORTED_MODULE_84__ = __webpack_require__(/*! ../../components/css-order */ "./src/components/css-order/index.js"); /* harmony import */ var _components_css_overflow__WEBPACK_IMPORTED_MODULE_85__ = __webpack_require__(/*! ../../components/css-overflow */ "./src/components/css-overflow/index.js"); /* harmony import */ var _components_css_overflow_x__WEBPACK_IMPORTED_MODULE_86__ = __webpack_require__(/*! ../../components/css-overflow-x */ "./src/components/css-overflow-x/index.js"); /* harmony import */ var _components_css_overflow_y__WEBPACK_IMPORTED_MODULE_87__ = __webpack_require__(/*! ../../components/css-overflow-y */ "./src/components/css-overflow-y/index.js"); /* harmony import */ var _components_css_padding__WEBPACK_IMPORTED_MODULE_88__ = __webpack_require__(/*! ../../components/css-padding */ "./src/components/css-padding/index.js"); /* harmony import */ var _components_css_padding_top__WEBPACK_IMPORTED_MODULE_89__ = __webpack_require__(/*! ../../components/css-padding-top */ "./src/components/css-padding-top/index.js"); /* harmony import */ var _components_css_padding_right__WEBPACK_IMPORTED_MODULE_90__ = __webpack_require__(/*! ../../components/css-padding-right */ "./src/components/css-padding-right/index.js"); /* harmony import */ var _components_css_padding_bottom__WEBPACK_IMPORTED_MODULE_91__ = __webpack_require__(/*! ../../components/css-padding-bottom */ "./src/components/css-padding-bottom/index.js"); /* harmony import */ var _components_css_padding_left__WEBPACK_IMPORTED_MODULE_92__ = __webpack_require__(/*! ../../components/css-padding-left */ "./src/components/css-padding-left/index.js"); /* harmony import */ var _components_css_position__WEBPACK_IMPORTED_MODULE_93__ = __webpack_require__(/*! ../../components/css-position */ "./src/components/css-position/index.js"); /* harmony import */ var _components_css_right__WEBPACK_IMPORTED_MODULE_94__ = __webpack_require__(/*! ../../components/css-right */ "./src/components/css-right/index.js"); /* harmony import */ var _components_css_gap__WEBPACK_IMPORTED_MODULE_95__ = __webpack_require__(/*! ../../components/css-gap */ "./src/components/css-gap/index.js"); /* harmony import */ var _components_css_column_gap__WEBPACK_IMPORTED_MODULE_96__ = __webpack_require__(/*! ../../components/css-column-gap */ "./src/components/css-column-gap/index.js"); /* harmony import */ var _components_css_row_gap__WEBPACK_IMPORTED_MODULE_97__ = __webpack_require__(/*! ../../components/css-row-gap */ "./src/components/css-row-gap/index.js"); /* harmony import */ var _components_css_text_align__WEBPACK_IMPORTED_MODULE_98__ = __webpack_require__(/*! ../../components/css-text-align */ "./src/components/css-text-align/index.js"); /* harmony import */ var _components_css_transform_origin__WEBPACK_IMPORTED_MODULE_99__ = __webpack_require__(/*! ../../components/css-transform-origin */ "./src/components/css-transform-origin/index.js"); /* harmony import */ var _components_css_text_decoration__WEBPACK_IMPORTED_MODULE_100__ = __webpack_require__(/*! ../../components/css-text-decoration */ "./src/components/css-text-decoration/index.js"); /* harmony import */ var _components_css_text_indent__WEBPACK_IMPORTED_MODULE_101__ = __webpack_require__(/*! ../../components/css-text-indent */ "./src/components/css-text-indent/index.js"); /* harmony import */ var _components_css_text_justify__WEBPACK_IMPORTED_MODULE_102__ = __webpack_require__(/*! ../../components/css-text-justify */ "./src/components/css-text-justify/index.js"); /* harmony import */ var _components_css_text_overflow__WEBPACK_IMPORTED_MODULE_103__ = __webpack_require__(/*! ../../components/css-text-overflow */ "./src/components/css-text-overflow/index.js"); /* harmony import */ var _components_css_text_shadow__WEBPACK_IMPORTED_MODULE_104__ = __webpack_require__(/*! ../../components/css-text-shadow */ "./src/components/css-text-shadow/index.js"); /* harmony import */ var _components_css_text_transform__WEBPACK_IMPORTED_MODULE_105__ = __webpack_require__(/*! ../../components/css-text-transform */ "./src/components/css-text-transform/index.js"); /* harmony import */ var _components_css_top__WEBPACK_IMPORTED_MODULE_106__ = __webpack_require__(/*! ../../components/css-top */ "./src/components/css-top/index.js"); /* harmony import */ var _components_css_text_align_last__WEBPACK_IMPORTED_MODULE_107__ = __webpack_require__(/*! ../../components/css-text-align-last */ "./src/components/css-text-align-last/index.js"); /* harmony import */ var _components_css_table_layout__WEBPACK_IMPORTED_MODULE_108__ = __webpack_require__(/*! ../../components/css-table-layout */ "./src/components/css-table-layout/index.js"); /* harmony import */ var _components_css_transform__WEBPACK_IMPORTED_MODULE_109__ = __webpack_require__(/*! ../../components/css-transform */ "./src/components/css-transform/index.js"); /* harmony import */ var _components_css_transition__WEBPACK_IMPORTED_MODULE_110__ = __webpack_require__(/*! ../../components/css-transition */ "./src/components/css-transition/index.js"); /* harmony import */ var _components_css_vertical_align__WEBPACK_IMPORTED_MODULE_111__ = __webpack_require__(/*! ../../components/css-vertical-align */ "./src/components/css-vertical-align/index.js"); /* harmony import */ var _components_css_visibility__WEBPACK_IMPORTED_MODULE_112__ = __webpack_require__(/*! ../../components/css-visibility */ "./src/components/css-visibility/index.js"); /* harmony import */ var _components_css_width__WEBPACK_IMPORTED_MODULE_113__ = __webpack_require__(/*! ../../components/css-width */ "./src/components/css-width/index.js"); /* harmony import */ var _components_css_white_space__WEBPACK_IMPORTED_MODULE_114__ = __webpack_require__(/*! ../../components/css-white-space */ "./src/components/css-white-space/index.js"); /* harmony import */ var _components_css_word_break__WEBPACK_IMPORTED_MODULE_115__ = __webpack_require__(/*! ../../components/css-word-break */ "./src/components/css-word-break/index.js"); /* harmony import */ var _components_css_word_spacing__WEBPACK_IMPORTED_MODULE_116__ = __webpack_require__(/*! ../../components/css-word-spacing */ "./src/components/css-word-spacing/index.js"); /* harmony import */ var _components_css_writing_mode__WEBPACK_IMPORTED_MODULE_117__ = __webpack_require__(/*! ../../components/css-writing-mode */ "./src/components/css-writing-mode/index.js"); /* harmony import */ var _components_css_word_wrap__WEBPACK_IMPORTED_MODULE_118__ = __webpack_require__(/*! ../../components/css-word-wrap */ "./src/components/css-word-wrap/index.js"); /* harmony import */ var _components_css_z_index__WEBPACK_IMPORTED_MODULE_119__ = __webpack_require__(/*! ../../components/css-z-index */ "./src/components/css-z-index/index.js"); /* harmony import */ var _breakpoints__WEBPACK_IMPORTED_MODULE_120__ = __webpack_require__(/*! ../../breakpoints */ "./src/breakpoints.js"); /* harmony import */ var _components_icon_toggle__WEBPACK_IMPORTED_MODULE_121__ = __webpack_require__(/*! ../../components/icon-toggle */ "./src/components/icon-toggle/index.js"); const { Component, RawHTML } = wp.element; // import PGcssClip from '../../components/css-clip' // import PGcssClipPath from '../../components/css-clip-path' var myStore = wp.data.select("postgrid-shop"); //console.log(myStore); function Html(props) { if (!props.warn) { return null; } var sudoScourceArgsBasic = { styles: { label: "Idle", value: "styles" }, hover: { label: "Hover", value: "hover" }, after: { label: "After", value: "after", isPro: true }, before: { label: "Before", value: "before", isPro: true }, active: { label: "Active", value: "active", isPro: true }, focus: { label: "Focus", value: "focus", isPro: true }, "focus-within": { label: "Focus-within", value: "focus-within", isPro: true }, target: { label: "target", value: "target", isPro: true }, visited: { label: "Visited", value: "visited", isPro: true }, selection: { label: "Selection", value: "selection", isPro: true }, "first-child": { label: "First-child", value: "first-child", isPro: true }, "last-child": { label: "Last-child", value: "last-child", isPro: true }, "first-letter": { label: "First-letter", value: "first-letter", isPro: true }, "first-line": { label: "First-line", value: "first-line", isPro: true } //custom: { label: 'Custom', value: '', isPro: true }, }; let sudoScourceArgs = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("sudoScourceArgs", sudoScourceArgsBasic); const [sudoScources, setSudoScources] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(sudoScourceArgs); const [sudoScource, setSudoScource] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)("styles"); const [styles, setStyles] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); const [cssAtts, setcssAtts] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({}); const [breakPointLocal, setbreakPointLocal] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(myStore.getBreakPoint()); var breakPointX = myStore.getBreakPoint(); //breakPointX = (breakPointLocal != breakPointX) ? breakPointLocal : breakPointX; // useEffect(() => { // console.log(props.obj); // var sudoSourceX = { ...sudoScources }; // Object.entries(props.obj).map((arg) => { // var sudoIndex = arg[0]; // var sudoValues = arg[1]; // if (sudoIndex != "options") { // sudoSourceX[sudoIndex].label = sudoScources[sudoIndex].label + " ^"; // } // }); // console.log("sudoSourceX : ", sudoSourceX); // setSudoScources(sudoSourceX); // }, [props.obj]); const [extraOpt, setextraOpt] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [copyArgs, setCopyArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ isCopied: false, isPasted: false, pasteError: false, copyError: false, errorMessage: "" }); const [resetArgs, setResetArgs] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ isReset: false, resetError: false, errorMessage: "" }); var cssPropsBasic = { alignContent: { id: "alignContent", label: "Align Content" }, alignItems: { id: "alignItems", label: "Align Items" }, alignSelf: { id: "alignSelf", label: "Align Self" }, aspectRatio: { id: "aspectRatio", label: "Aspect Ratio" }, backfaceVisibility: { id: "backfaceVisibility", label: "Backface Visibility" }, //background: { id: 'background', label: 'Background' }, backgroundAttachment: { id: "backgroundAttachment", label: "Background Attachment", isPro: true }, backgroundBlendMode: { id: "backgroundBlendMode", label: "Background Blend Mode", isPro: true }, backgroundClip: { id: "backgroundClip", label: "Background Clip", isPro: true }, backgroundColor: { id: "backgroundColor", label: "Background Color" }, backgroundImage: { id: "backgroundImage", label: "Background Image" }, backgroundOrigin: { id: "backgroundOrigin", label: "Background Origin" }, backgroundRepeat: { id: "backgroundRepeat", label: "Background Repeat" }, backgroundPosition: { id: "backgroundPosition", label: "Background Position" }, backgroundSize: { id: "backgroundSize", label: "Background Size" }, border: { id: "border", label: "Border" }, borderTop: { id: "borderTop", label: "Border Top" }, borderRight: { id: "borderRight", label: "Border Right" }, borderBottom: { id: "borderBottom", label: "Border Bottom" }, borderLeft: { id: "borderLeft", label: "Border Left" }, borderCollapse: { id: "borderCollapse", label: "Border Collapse", isPro: true }, borderImage: { id: "borderImage", label: "Border Image", isPro: true }, borderRadius: { id: "borderRadius", label: "Border Radius" }, borderSpacing: { id: "borderSpacing", label: "Border Spacing", isPro: true }, backdropFilter: { id: "backdropFilter", label: "Backdrop Filter" }, bottom: { id: "bottom", label: "Bottom" }, boxShadow: { id: "boxShadow", label: "Box Shadow" }, boxSizing: { id: "boxSizing", label: "Box Sizing", isPro: true }, clear: { id: "clear", label: "Clear" }, clip: { id: "clip", label: "Clip", isPro: true }, // clipPath: { id: 'clipPath', label: 'Clip Path', isPro: true }, color: { id: "color", label: "Color" }, columnCount: { id: "columnCount", label: "Column Count", isPro: true }, columnRule: { id: "columnRule", label: "Column Rule", isPro: true }, content: { id: "content", label: "Content", isPro: true }, cursor: { id: "cursor", label: "Cursor", isPro: true }, display: { id: "display", label: "Display" }, direction: { id: "direction", label: "Direction" }, flexBasis: { id: "flexBasis", label: "Flex Basis" }, flexFlow: { id: "flexFlow", label: "Flex Basis" }, flexDirection: { id: "flexDirection", label: "Flex Direction" }, flexDirection: { id: "flexDirection", label: "Flex Direction" }, flexFlow: { id: "flexFlow", label: "Flex Flow" }, flexGrow: { id: "flexGrow", label: "Flex Grow" }, flexShrink: { id: "flexShrink", label: "Flex Shrink" }, flexWrap: { id: "flexWrap", label: "Flex Wrap" }, float: { id: "float", label: "Float" }, filter: { id: "filter", label: "Filter", isPro: true }, fontSize: { id: "fontSize", label: "Font Size" }, fontFamily: { id: "fontFamily", label: "Font Family" }, fontStretch: { id: "fontStretch", label: "Font Stretch", isPro: true }, fontStyle: { id: "fontStyle", label: "Font Style" }, userSelect: { id: "userSelect", label: "User Select" }, fontVariantCaps: { id: "fontVariantCaps", label: "Font VariantCaps", isPro: true }, fontWeight: { id: "fontWeight", label: "Font Weight" }, gridColumnEnd: { id: "gridColumnEnd", label: "Grid Column End" }, gridColumnStart: { id: "gridColumnStart", label: "Grid Column Start" }, gridRowEnd: { id: "gridRowEnd", label: "Grid Row End" }, gridRowStart: { id: "gridRowStart", label: "Grid Row Start" }, gridTemplateColumns: { id: "gridTemplateColumns", label: "Grid Template Columns" }, gridTemplateRows: { id: "gridTemplateRows", label: "Grid Template Rows" }, height: { id: "height", label: "Height" }, left: { id: "left", label: "Left" }, letterSpacing: { id: "letterSpacing", label: "Letter Spacing", isPro: true }, lineHeight: { id: "lineHeight", label: "Line Height" }, listStyle: { id: "listStyle", label: "List Style" }, margin: { id: "margin", label: "Margin" }, marginTop: { id: "marginTop", label: "Margin Top" }, marginRight: { id: "marginRight", label: "Margin Right" }, marginBottom: { id: "marginBottom", label: "Margin Bottom" }, marginLeft: { id: "marginLeft", label: "Margin Left" }, maxHeight: { id: "maxHeight", label: "Max Height" }, maxWidth: { id: "maxWidth", label: "Max Width" }, minHeight: { id: "minHeight", label: "Min Height" }, minWidth: { id: "minWidth", label: "Min Width" }, justifyContent: { id: "justifyContent", label: "Justify Content" }, opacity: { id: "opacity", label: "Opacity" }, objectFit: { id: "objectFit", label: "Object Fit" }, outline: { id: "outline", label: "Outline", isPro: true }, overflow: { id: "overflow", label: "Overflow" }, overflowX: { id: "overflowX", label: "OverflowX", isPro: true }, overflowY: { id: "overflowY", label: "OverflowY", isPro: true }, order: { id: "order", label: "Order" }, padding: { id: "padding", label: "Padding" }, paddingTop: { id: "paddingTop", label: "Padding Top" }, paddingRight: { id: "paddingRight", label: "Padding Right" }, paddingBottom: { id: "paddingBottom", label: "Padding Bottom" }, paddingLeft: { id: "paddingLeft", label: "Padding Left" }, perspective: { id: "perspective", label: "Perspective", isPro: true }, position: { id: "position", label: "Position" }, right: { id: "right", label: "Right" }, gap: { id: "gap", label: "Gap" }, columnGap: { id: "columnGap", label: "Column gap" }, rowGap: { id: "rowGap", label: "Row Gap" }, textAlign: { id: "textAlign", label: "Text Align" }, top: { id: "top", label: "Top" }, transform: { id: "transform", label: "Transform", isPro: true }, transition: { id: "transition", label: "Transition", isPro: true }, verticalAlign: { id: "verticalAlign", label: "Vertical Align" }, visibility: { id: "visibility", label: "Visibility" }, width: { id: "width", label: "Width" }, zIndex: { id: "zIndex", label: "Z-Index" }, textDecoration: { id: "textDecoration", label: "Text Decoration", isPro: true }, textIndent: { id: "textIndent", label: "Text Indent", isPro: true }, textJustify: { id: "textJustify", label: "Text Justify", isPro: true }, textOverflow: { id: "textOverflow", label: "Text Overflow" }, textShadow: { id: "textShadow", label: "Text Shadow", isPro: true }, transformOrigin: { id: "transformOrigin", label: "Transform Origin", isPro: true }, textTransform: { id: "textTransform", label: "Text Transform", isPro: true }, wordBreak: { id: "wordBreak", label: "Word Break", isPro: true }, wordSpacing: { id: "wordSpacing", label: "Word Spacing", isPro: true }, wordWrap: { id: "wordWrap", label: "Word Wrap", isPro: true }, writingMode: { id: "writingMode", label: "Writing Mode", isPro: true } }; let cssProps = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_2__.applyFilters)("cssProps", cssPropsBasic); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { //console.log('props.obj', props.obj); }, [props.obj]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { if (props.obj[sudoScource] == undefined) { props.obj[sudoScource] = {}; } }, [sudoScource]); function sudoScourceUpdate(args) { setSudoScources(args); } var RemoveQueryPram = function ({ title, sudoScource, keyX }) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer hover:bg-red-500 hover:text-white px-1 py-1", onClick: ev => { props.onRemove(sudoScource, keyX, props.obj, props.extra); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_122__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_123__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "mx-2" }, title)); }; function setCssAttr(option, index) { //var objX = { ...props.obj } let objX = Object.assign({}, props.obj); if (objX[sudoScource][option.id] == undefined) { var path = [sudoScource, option.id]; const object = myStore.addPropertyDeep(objX, path, {}); props.onAdd(sudoScource, option.id, object, props.extra); //props.obj[sudoScource][option.id] = {}; } else { //alert('Property already added'); if (objX[sudoScource][option.id][breakPointX] == undefined) { var path = [sudoScource, option.id, breakPointX]; const object = myStore.addPropertyDeep(objX, path, ""); props.onAdd(sudoScource, option.id, object, props.extra); } else { alert("Property already added"); } } //props.onAdd(sudoScource, option.id, props.obj, props.extra) } function onChangeCssVal(newVal, attr) { // console.log(props.obj); props.onChange(sudoScource, newVal, attr, props.obj, props.extra); } var breakPointList = []; for (var x in _breakpoints__WEBPACK_IMPORTED_MODULE_120__["default"]) { var item = _breakpoints__WEBPACK_IMPORTED_MODULE_120__["default"][x]; breakPointList.push({ label: item.name, icon: item.icon, value: item.id }); } // copy to clipboard start const copyObjectToClipboard = obj => { // console.log(typeof obj ) var objZ = JSON.parse(obj); var objX = { ...objZ }; objX.pgStyle = true; var objStr = JSON.stringify(objX); // const jsonString = JSON.stringify(obj); navigator.clipboard.writeText(objStr).then(() => {}).catch(err => { console.error("Could not copy object: ", err); // Handle errors here }); }; // copy to clipboard end //paste from clipboard start const pasteFromClipboard = () => { return new Promise((resolve, reject) => { navigator.clipboard.readText().then(text => { resolve(text); }).catch(err => { reject(err); }); }); }; const handlePasteFromClipboard = async () => { try { const clipboardData = await navigator.clipboard.readText(); // console.log(clipboardData) var stylesClipboard = myStore.getStylesClipboard(); if (stylesClipboard == null && !clipboardData) { setCopyArgs({ ...copyArgs, pasteError: true, errorMessage: "Paste is empty" }); setTimeout(() => { setCopyArgs({ ...copyArgs, pasteError: false, errorMessage: "" }); }, 2000); return; } else { // if (stylesClipboard) { // const styleObj = JSON.parse(stylesClipboard); // console.log(styleObj); // if (props.onBulkAdd) { // props.onBulkAdd(sudoScource, styleObj); // } // } else const styleObj = JSON.parse(clipboardData); if (typeof styleObj == "object" && styleObj.pgStyle) { delete styleObj.pgStyle; try { if (props.onBulkAdd) { props.onBulkAdd(sudoScource, styleObj); } } catch (error) { setCopyArgs({ ...copyArgs, pasteError: true, errorMessage: "Invalid data format in clipboard" }); setTimeout(() => { setCopyArgs({ ...copyArgs, pasteError: false, errorMessage: "" }); }, 2000); } } } setCopyArgs({ ...copyArgs, isPasted: true }); setTimeout(() => { setCopyArgs({ ...copyArgs, isPasted: false }); }, 2000); } catch (error) { setCopyArgs({ ...copyArgs, pasteError: true, errorMessage: "Invalid data format in clipboard" }); setTimeout(() => { setCopyArgs({ ...copyArgs, pasteError: false, errorMessage: "" }); }, 2000); } }; //paste from clipboard end return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelRow, { className: "bg-gray-200 p-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown_sudo_selector__WEBPACK_IMPORTED_MODULE_5__["default"], { position: "bottom right", variant: "secondary", options: sudoScources, sudoScourceUpdate: sudoScourceUpdate, obj: props.obj, buttonTitle: sudoScources[sudoScource] != undefined ? sudoScources[sudoScource].label : "Choose", onChange: (option, index) => { setSudoScource(option.value); }, values: "" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_122__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_124__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_4__["default"], { position: "bottom right", variant: "secondary", options: cssProps, buttonTitle: "Add Style", onChange: setCssAttr, values: "" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative" }, props.onBulkAdd && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: extraOpt ? "bg-gray-400 hover:bg-gray-400 cursor-pointer p-2 " : "cursor-pointer p-2 ", onClick: ev => { setextraOpt(!extraOpt); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { "aria-hidden": "true", focusable: "false", role: "img", className: "octicon octicon-ellipsis", viewBox: "0 0 16 16", width: "16", height: "16", fill: "currentColor" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { d: "M0 5.75C0 4.784.784 4 1.75 4h12.5c.966 0 1.75.784 1.75 1.75v4.5A1.75 1.75 0 0 1 14.25 12H1.75A1.75 1.75 0 0 1 0 10.25ZM12 7a1 1 0 1 0 0 2 1 1 0 0 0 0-2ZM7 8a1 1 0 1 0 2 0 1 1 0 0 0-2 0ZM4 7a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z" }))), extraOpt && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.Popover, { position: "bottom left" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-3 w-80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex flex-wrap gap-3 justify-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // className="px-4 inline-block m-2 py-2 bg-sky-600 text-white cursor-pointer" , onClick: ev => { var styleStr = JSON.stringify(props.obj[sudoScource]); //var asdsdsd = wp.data.dispatch('postgrid-shop').setStylesClipboard(styleStr) if (props.onReset) { props.onReset(sudoScources); } // asdsdsd.then((res) => { // }); setResetArgs({ ...resetArgs, isReset: true }); setTimeout(() => { setResetArgs({ ...resetArgs, isReset: false }); }, 2000); } }, resetArgs.isReset && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Reset Done!"), !resetArgs.isReset && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, " Reset Styles!")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // className="px-4 inline-block m-2 py-2 bg-sky-600 text-white cursor-pointer" , onClick: ev => { var styleStr = JSON.stringify(props.obj[sudoScource]); copyObjectToClipboard(styleStr); var asdsdsd = wp.data.dispatch("postgrid-shop").setStylesClipboard(styleStr); asdsdsd.then(res => {}); setCopyArgs({ ...copyArgs, isCopied: true }); setTimeout(() => { setCopyArgs({ ...copyArgs, isCopied: false }); }, 2000); } }, copyArgs.isCopied && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Copied!"), !copyArgs.isCopied && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, " Copy Styles!")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // className="px-4 inline-block m-2 py-2 bg-sky-600 text-white cursor-pointer" , onClick: handlePasteFromClipboard }, copyArgs.isPasted && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Paste Done"), !copyArgs.isPasted && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, "Paste Copied Styles"))), copyArgs.pasteError && copyArgs.errorMessage && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "text-red-800 my-3" }, copyArgs.errorMessage)))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "inline-block" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_icon_toggle__WEBPACK_IMPORTED_MODULE_121__["default"], { position: "bottom", variant: "secondary", iconList: breakPointList, buttonTitle: "Break Point Switch", onChange: (x, index) => { var asdsdsd = wp.data.dispatch("postgrid-shop").setBreakPoint(x.value); asdsdsd.then(res => { setbreakPointLocal(x.value); }); }, activeIcon: _breakpoints__WEBPACK_IMPORTED_MODULE_120__["default"][breakPointX].icon, value: breakPointX })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-5 pg-setting-input-text " }, //Object.entries(cssAtts).map(([key, value]) => ( props.obj[sudoScource] != undefined && Object.entries(props.obj[sudoScource]).reverse().map(([key, value]) => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, value[breakPointX] != undefined && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.PanelBody, { title: (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(RemoveQueryPram, { title: cssProps[key] != undefined ? cssProps[key].label : key, sudoScource: sudoScource, keyX: key }), initialOpen: false, key: key }, key == "alignContent" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_align_content__WEBPACK_IMPORTED_MODULE_6__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "alignItems" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_align_items__WEBPACK_IMPORTED_MODULE_7__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "alignSelf" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_align_self__WEBPACK_IMPORTED_MODULE_8__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "aspectRatio" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_aspect_ratio__WEBPACK_IMPORTED_MODULE_9__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backfaceVisibility" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_backface_visibility__WEBPACK_IMPORTED_MODULE_10__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundAttachment" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_attachment__WEBPACK_IMPORTED_MODULE_11__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundBlendMode" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_blend_mode__WEBPACK_IMPORTED_MODULE_12__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundImage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_image__WEBPACK_IMPORTED_MODULE_16__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundClip" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_clip__WEBPACK_IMPORTED_MODULE_13__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "bgColor" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_color__WEBPACK_IMPORTED_MODULE_14__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundColor" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_color__WEBPACK_IMPORTED_MODULE_14__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundOrigin" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_origin__WEBPACK_IMPORTED_MODULE_17__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundRepeat" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_repeat__WEBPACK_IMPORTED_MODULE_19__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundSize" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_size__WEBPACK_IMPORTED_MODULE_20__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backgroundPosition" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_background_position__WEBPACK_IMPORTED_MODULE_18__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "boxShadow" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_box_shadow__WEBPACK_IMPORTED_MODULE_32__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "border" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border__WEBPACK_IMPORTED_MODULE_21__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderTop" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_top__WEBPACK_IMPORTED_MODULE_22__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderRight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_right__WEBPACK_IMPORTED_MODULE_23__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderBottom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_bottom__WEBPACK_IMPORTED_MODULE_24__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderLeft" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_left__WEBPACK_IMPORTED_MODULE_25__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderRadius" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_radius__WEBPACK_IMPORTED_MODULE_26__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderCollapse" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_collapse__WEBPACK_IMPORTED_MODULE_29__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderSpacing" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_spacing__WEBPACK_IMPORTED_MODULE_30__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "borderImage" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_border_image__WEBPACK_IMPORTED_MODULE_27__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "backdropFilter" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_backdrop_filter__WEBPACK_IMPORTED_MODULE_31__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "bottom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_bottom__WEBPACK_IMPORTED_MODULE_28__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "cursor" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_cursor__WEBPACK_IMPORTED_MODULE_36__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "content" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_content__WEBPACK_IMPORTED_MODULE_37__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "columnCount" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_column_count__WEBPACK_IMPORTED_MODULE_38__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "columnRule" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_column_rule__WEBPACK_IMPORTED_MODULE_39__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "clip" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_clip__WEBPACK_IMPORTED_MODULE_40__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "top" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_top__WEBPACK_IMPORTED_MODULE_106__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "left" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_left__WEBPACK_IMPORTED_MODULE_66__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "right" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_right__WEBPACK_IMPORTED_MODULE_94__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "boxSizing" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_box_sizing__WEBPACK_IMPORTED_MODULE_33__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "clear" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_clear__WEBPACK_IMPORTED_MODULE_34__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "direction" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_direction__WEBPACK_IMPORTED_MODULE_42__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "color" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_color__WEBPACK_IMPORTED_MODULE_35__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "filter" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_filter__WEBPACK_IMPORTED_MODULE_43__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "float" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_float__WEBPACK_IMPORTED_MODULE_44__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "fontFamily" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_font_family__WEBPACK_IMPORTED_MODULE_45__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "fontSize" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_font_size__WEBPACK_IMPORTED_MODULE_46__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "fontStyle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_font_style__WEBPACK_IMPORTED_MODULE_48__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "userSelect" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_user_select__WEBPACK_IMPORTED_MODULE_55__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "fontStretch" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_font_stretch__WEBPACK_IMPORTED_MODULE_47__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "fontWeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_font_weight__WEBPACK_IMPORTED_MODULE_49__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "fontVariantCaps" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_font_variant_caps__WEBPACK_IMPORTED_MODULE_50__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "flexWrap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_flex_wrap__WEBPACK_IMPORTED_MODULE_51__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "flexDirection" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_flex_direction__WEBPACK_IMPORTED_MODULE_52__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "flexShrink" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_flex_shrink__WEBPACK_IMPORTED_MODULE_53__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "flexBasis" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_flex_basis__WEBPACK_IMPORTED_MODULE_54__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "flexFlow" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_flex_flow__WEBPACK_IMPORTED_MODULE_57__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "flexGrow" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_flex_grow__WEBPACK_IMPORTED_MODULE_56__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gridColumnEnd" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_grid_column_end__WEBPACK_IMPORTED_MODULE_58__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gridColumnStart" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_grid_column_start__WEBPACK_IMPORTED_MODULE_59__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gridRowEnd" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_grid_row_end__WEBPACK_IMPORTED_MODULE_60__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gridRowStart" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_grid_row_start__WEBPACK_IMPORTED_MODULE_61__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gridTemplateColumns" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_grid_template_columns__WEBPACK_IMPORTED_MODULE_62__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gridTemplateRows" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_grid_template_rows__WEBPACK_IMPORTED_MODULE_63__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "letterSpacing" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_letter_spacing__WEBPACK_IMPORTED_MODULE_67__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "lineHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_line_height__WEBPACK_IMPORTED_MODULE_68__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "listStyle" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_list_style__WEBPACK_IMPORTED_MODULE_69__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "justifyContent" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_justify_content__WEBPACK_IMPORTED_MODULE_65__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "objectFit" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_object_fit__WEBPACK_IMPORTED_MODULE_80__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "opacity" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_opacity__WEBPACK_IMPORTED_MODULE_81__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "outline" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_outline__WEBPACK_IMPORTED_MODULE_82__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "outlineOffset" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_outline_offset__WEBPACK_IMPORTED_MODULE_83__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "position" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_position__WEBPACK_IMPORTED_MODULE_93__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "tableLayout" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_table_layout__WEBPACK_IMPORTED_MODULE_108__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "gap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_gap__WEBPACK_IMPORTED_MODULE_95__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "columnGap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_column_gap__WEBPACK_IMPORTED_MODULE_96__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "rowGap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_row_gap__WEBPACK_IMPORTED_MODULE_97__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "transition" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_transition__WEBPACK_IMPORTED_MODULE_110__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "transform" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_transform__WEBPACK_IMPORTED_MODULE_109__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "transformOrigin" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_transform_origin__WEBPACK_IMPORTED_MODULE_99__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textIndent" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_indent__WEBPACK_IMPORTED_MODULE_101__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textJustify" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_justify__WEBPACK_IMPORTED_MODULE_102__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textOverflow" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_overflow__WEBPACK_IMPORTED_MODULE_103__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textTransform" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_transform__WEBPACK_IMPORTED_MODULE_105__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textDecoration" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_decoration__WEBPACK_IMPORTED_MODULE_100__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textShadow" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_shadow__WEBPACK_IMPORTED_MODULE_104__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textAlign" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_align__WEBPACK_IMPORTED_MODULE_98__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "textAlignLast" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_text_align_last__WEBPACK_IMPORTED_MODULE_107__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "visibility" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_visibility__WEBPACK_IMPORTED_MODULE_112__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "wordBreak" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_word_break__WEBPACK_IMPORTED_MODULE_115__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "wordSpacing" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_word_spacing__WEBPACK_IMPORTED_MODULE_116__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "zIndex" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_z_index__WEBPACK_IMPORTED_MODULE_119__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "padding" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_padding__WEBPACK_IMPORTED_MODULE_88__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "paddingTop" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_padding_top__WEBPACK_IMPORTED_MODULE_89__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "paddingRight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_padding_right__WEBPACK_IMPORTED_MODULE_90__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "paddingBottom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_padding_bottom__WEBPACK_IMPORTED_MODULE_91__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "paddingLeft" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_padding_left__WEBPACK_IMPORTED_MODULE_92__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "marginTop" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_margin_top__WEBPACK_IMPORTED_MODULE_71__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "marginRight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_margin_right__WEBPACK_IMPORTED_MODULE_72__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "marginBottom" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_margin_bottom__WEBPACK_IMPORTED_MODULE_73__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "marginLeft" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_margin_left__WEBPACK_IMPORTED_MODULE_74__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "margin" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_margin__WEBPACK_IMPORTED_MODULE_70__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "maxHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_max_height__WEBPACK_IMPORTED_MODULE_75__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "maxWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_max_width__WEBPACK_IMPORTED_MODULE_76__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "minHeight" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_min_height__WEBPACK_IMPORTED_MODULE_77__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "minWidth" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_min_width__WEBPACK_IMPORTED_MODULE_78__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "display" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_display__WEBPACK_IMPORTED_MODULE_41__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "width" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_width__WEBPACK_IMPORTED_MODULE_113__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "height" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_height__WEBPACK_IMPORTED_MODULE_64__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "verticalAlign" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_vertical_align__WEBPACK_IMPORTED_MODULE_111__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "overflow" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_overflow__WEBPACK_IMPORTED_MODULE_85__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "order" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_order__WEBPACK_IMPORTED_MODULE_84__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "overflowX" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_overflow_x__WEBPACK_IMPORTED_MODULE_86__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "overflowY" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_overflow_y__WEBPACK_IMPORTED_MODULE_87__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "writingMode" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_writing_mode__WEBPACK_IMPORTED_MODULE_117__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "wordWrap" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_word_wrap__WEBPACK_IMPORTED_MODULE_118__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "perspective" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_perspective__WEBPACK_IMPORTED_MODULE_79__["default"], { val: value[breakPointX], onChange: onChangeCssVal }), key == "whiteSpace" && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_css_white_space__WEBPACK_IMPORTED_MODULE_114__["default"], { val: value[breakPointX], onChange: onChangeCssVal })))))); } class PGStyles extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } componentDidMount(props) {} render() { var { extra, obj, onChange, onAdd, onRemove, onBulkAdd, onReset } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, onBulkAdd == null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { obj: obj, extra: extra, onAdd: onAdd, onRemove: onRemove, onChange: onChange, warn: this.state.showWarning, onReset: onReset }), onBulkAdd != null && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { obj: obj, extra: extra, onAdd: onAdd, onRemove: onRemove, onChange: onChange, onBulkAdd: onBulkAdd, onReset: onReset, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGStyles); /***/ }), /***/ "./src/components/tab/index.js": /*!*************************************!*\ !*** ./src/components/tab/index.js ***! \*************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); const { Component, RawHTML, useState } = wp.element; class PGtab extends Component { render() { const { children } = this.props; function MyFunction() { //const [selected, setSelected] = useState(activeTab); // useEffect(() => { // }, [keyword]); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "tabContent py-3" }, children); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MyFunction, null)); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGtab); /***/ }), /***/ "./src/components/tabs/index.js": /*!**************************************!*\ !*** ./src/components/tabs/index.js ***! \**************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/chevron-left.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/chevron-right.js"); const { Component, RawHTML, useState } = wp.element; function MyFunction(props) { if (!props.warn) { return null; } const [selected, setSelected] = useState(props.activeTab); const [scrollTo, setscrollTo] = useState(200); var content; // useEffect(() => { // }, [keyword]); props.children.map(child => { if (selected == child.props.name) { content = child.props.children; } }); function scrollPrev() { const tabsNavs = document.querySelector(".tabsNavs"); if (tabsNavs == null) return; tabsNavs.scrollBy({ left: -scrollTo, behavior: "smooth" }); } function scrollNext() { const tabsNavs = document.querySelector(".tabsNavs"); if (tabsNavs == null) return; tabsNavs.scrollBy({ left: scrollTo, behavior: "smooth" }); } function onWheel(ev) { // ev.preventDefault(); ev.stopPropagation(); const tabsNavs = document.querySelector(".tabsNavs"); tabsNavs.scrollBy({ left: ev.deltaY, behavior: "smooth" }); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "tabsWrapper " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: " relative " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex overflow-hidden tabsNavs cursor-move\t", onWheel: onWheel }, props.tabs.map(tab => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: tab.name == selected ? "flex flex-none border-0 flex-col items-center text-slate-900 font-medium bg-gray-400 grow p-2 cursor-pointer" : "flex flex-none border-0 flex-col items-center grow bg-gray-200 font-medium text-slate-900 p-2 cursor-pointer hover:bg-gray-300 ", onClick: ev => { props.onSelect(tab); setSelected(tab.name); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: "#404040", icon: tab.icon // className="mr-2 w-[20px] text-green-500" , className: " w-[20px] text-green-500" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "font-medium" }, tab.title)); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "navs" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "navPrev cursor-pointer absolute top-[50%] left-0 -translate-y-2/4 bg-[#ffffff6b]", onClick: scrollPrev }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: "#333", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_3__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "navNext cursor-pointer absolute top-[50%] -translate-y-2/4 right-[-4px] bg-[#ffffff6b]", onClick: scrollNext }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_2__["default"], { fill: "#333", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_4__["default"] })))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "tabContent py-3" }, content)); } class PGtabs extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { const { activeTab, orientation, activeClass, onSelect, tabs, children } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(MyFunction, { children: children, tabs: tabs, onSelect: onSelect, activeTab: activeTab, warn: this.state.showWarning })); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGtabs); /***/ }), /***/ "./src/components/templates/index.js": /*!*******************************************!*\ !*** ./src/components/templates/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__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__); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/icon/index.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/arrow-right.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/close.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/download.js"); /* harmony import */ var _wordpress_icons__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! @wordpress/icons */ "./node_modules/@wordpress/icons/build-module/library/plus-circle.js"); /* harmony import */ var _components_dropdown__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../components/dropdown */ "./src/components/dropdown/index.js"); /* harmony import */ var _components_input_text__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../components/input-text */ "./src/components/input-text/index.js"); /* harmony import */ var _components_request_a_template__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../components/request-a-template */ "./src/components/request-a-template/index.js"); /* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! masonry-layout */ "./node_modules/masonry-layout/masonry.js"); /* harmony import */ var masonry_layout__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(masonry_layout__WEBPACK_IMPORTED_MODULE_7__); /* harmony import */ var imagesloaded__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! imagesloaded */ "./node_modules/imagesloaded/imagesloaded.js"); /* harmony import */ var imagesloaded__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(imagesloaded__WEBPACK_IMPORTED_MODULE_8__); const { Component } = wp.element; function Html(props) { if (!props.warn) { return null; } const [searchPrams, setsearchPrams] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ keyword: "", categories: [], page: 1, myTemplates: false }); var [templateLibrary, settemplateLibrary] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)({ items: [] }); var [templateLibraryCats, settemplateLibraryCats] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); var [templateType, settemplateType] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)("section"); // section, fullpage, bundle, archive var [debounce, setDebounce] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(null); // Using the hook. var [isLoading, setIsLoading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); var [customTemplate, setcustomTemplate] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); let isProFeature = (0,_wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__.applyFilters)("isProFeature", true); var templateTypes = { section: { label: "Sections", value: "section" }, fullpage: { label: "Full pages", value: "fullpage" } // bundle: { label: "Bundles", value: "bundle" }, }; // useEffect(() => { // fetchCss(); // }, [searchPrams]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { settemplateLibrary({ items: [] }); fetchCss(); }, [templateType]); function loadMasonry() { var elem = document.querySelector("#itemsWrap"); if (elem != null) { imagesloaded__WEBPACK_IMPORTED_MODULE_8___default()(elem, function () { var msnry = new (masonry_layout__WEBPACK_IMPORTED_MODULE_7___default())(elem, { // options itemSelector: ".item", gutter: 15, horizontalOrder: true, percentPosition: true, fitWidth: true }); }); } } function fetchCss() { setIsLoading(true); var postData = { keyword: searchPrams.keyword, page: searchPrams.page, categories: searchPrams.categories }; postData = JSON.stringify(postData); if (templateType == "section") { fetch("https://getpostgrid.com/wp-json/post-grid/v2/get_post_section", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { var items = templateLibrary.items; if (res.posts.length > 0) { res.posts.map(x => { return items.push(x); }); settemplateLibrary({ items: items }); } var cats = res.terms.map(x => { return { label: x.count == undefined ? x.label : x.label + " (" + x.count + ")", value: x.value }; }); settemplateLibraryCats(cats); setIsLoading(false); setTimeout(() => { loadMasonry(); }, 500); }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } if (templateType == "fullpage") { fetch("https://getpostgrid.com/wp-json/post-grid/v2/get_post_fullpage", { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" }, body: postData }).then(response => { if (response.ok && response.status < 400) { response.json().then(res => { var items = templateLibrary.items; if (res.posts.length > 0) { res.posts.map(x => { return items.push(x); }); settemplateLibrary({ items: items }); } var cats = res.terms.map(x => { return { label: x.count == undefined ? x.label : x.label + " (" + x.count + ")", value: x.value }; }); settemplateLibraryCats(cats); setIsLoading(false); setTimeout(() => { loadMasonry(); }, 500); }); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); } } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { id: "pgTemplates-items", className: "pg-setting-input-text pgTemplates-items pl-[160px] pr-[320px] mt-[70px] fixed z-[999] top-6 left-0 w-full h-full overflow-y-scroll pb-[200px]" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-gray-400 " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex justify-between items-center p-3 bg-white " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center " }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-4" }, isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Spinner, null), " ", templateType), !isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_4__["default"], { position: "bottom right", variant: "secondary", options: templateTypes, buttonTitle: templateTypes[templateType] == undefined ? "Categories" : templateTypes[templateType].label, onChange: (option, index) => { settemplateLibrary({ items: [] }); setsearchPrams({ ...searchPrams, page: 0 }); settemplateType(option.value); }, values: [] }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_10__["default"] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.__experimentalInputControl, { className: "w-60 !px-3 !py-2 !rounded-none !text-lg", type: "text", placeholder: "Search...", value: searchPrams.keyword, onChange: newVal => { clearTimeout(debounce); debounce = setTimeout(() => { //var newVal = ev.target.value; settemplateLibrary({ items: [] }); setsearchPrams({ ...searchPrams, keyword: newVal }); }, 1000); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_dropdown__WEBPACK_IMPORTED_MODULE_4__["default"], { position: "bottom right", variant: "secondary", options: templateLibraryCats, buttonTitle: "Categories", onChange: (option, index) => { if (searchPrams.categories.includes(option.value)) { var categoriesX = searchPrams.categories.splice(option.value, 1); } else { var categoriesX = searchPrams.categories.concat(option.value); } setsearchPrams({ ...searchPrams, categories: categoriesX }); settemplateLibrary({ items: [] }); }, values: [] })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-4 flex items-center" }, searchPrams.categories.length > 0 && searchPrams.categories.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center mx-1 text-sm bg-slate-500 text-white" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer p-1 bg-red-500 inline-block", onClick: () => { settemplateLibrary({ items: [] }); var categoriesX = searchPrams.categories.splice(index, 1); setsearchPrams({ ...searchPrams, categories: searchPrams.categories }); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"] })), " ", (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "px-2 inline-block" }, templateLibraryCats[templateLibraryCats.findIndex(p => p.value == x)].label)); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.ToggleControl, { className: "!mb-0 hidden", label: searchPrams.myTemplates ? "Loaded Your Teplates?" : "My Teplates?", checked: searchPrams.myTemplates ? true : false, onChange: e => { setsearchPrams({ ...searchPrams, myTemplates: !searchPrams.myTemplates }); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // className="bg-blue-600 flex items-center cursor-pointer hover:bg-blue-500 text-lg text-white px-4 py-1 rounded-sm hover:text-white" , onClick: () => { setcustomTemplate(!customTemplate); setTimeout(() => { loadMasonry(); }, 500); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-slides mr-2" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Request a Template")), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "px-4" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "cursor-pointer rounded-sm p-1 bg-red-500 hover:bg-red-600 inline-block", onClick: () => { props.setEnable(false); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_11__["default"], className: "fill-white" }))))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "p-5 " }, customTemplate && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_request_a_template__WEBPACK_IMPORTED_MODULE_6__["default"], null), !customTemplate && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { id: "itemsWrap", className: "m-auto" }, templateLibrary.items.map((x, index) => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "bg-white inline-block relative pb-16 item mb-3 w-[24%]" // onMouseEnter={() => { // setIsHovered(true); // setHoverValue(index); // }} // onMouseLeave={() => { // setIsHovered(false); // setHoverValue(""); // }} }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "relative" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("img", { className: "!shadow-none p-3", src: x.thumb_url, alt: "" }), isProFeature && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "absolute top-2 right-2" }, !x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-lime-600 text-white text-xs px-2 rounded-sm py-1" }, "Free"), x.is_pro && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: " bg-orange-500 text-white text-xs px-2 rounded-sm py-1" }, "Pro"))), (!x.is_pro || x.is_pro && !isProFeature) && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "flex items-center absolute bottom-0 left-0 w-full p-2 bg-slate-600 bg-opacity-80" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "pg-bg-color text-white p-1 px-3 cursor-pointer rounded-sm flex items-center ", onClick: ev => { var content = x.post_content; var wp_editor = wp.data.dispatch("core/editor"); var wp_insertBlocks = wp_editor.insertBlocks; wp_insertBlocks(wp.blocks.parse(content)); props.setEnable(false); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "inline-block" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_12__["default"], className: "fill-white\t" }))), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: "inline-block pg-font mx-2 text-white no-underline font-medium text-lg hover:text-white ", target: "_blank", href: x.url }, x.post_title)), x.is_pro && isProFeature && // <div // className={`${ // // isHovered && hoverValue == index // // ? // "opacity-100 flex items-center absolute bottom-0 left-0 w-full p-2 bg-slate-600 " // // : "opacity-0" // } `}> (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: " text-lg flex gap-2 justify-center text-amber-500 no-underline font-medium transition-colors duration-300 hover:text-white pg-font absolute bottom-0 left-0 w-full p-2 bg-slate-600 ", href: "https://getpostgrid.com/pricing/" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Subscribe to Import"), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_icons__WEBPACK_IMPORTED_MODULE_9__["default"], { fill: "white", icon: _wordpress_icons__WEBPACK_IMPORTED_MODULE_13__["default"] }))) // </div> ); })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-5 p-5 text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "inline-block pg-font pg-bg-color rounded-md relative p-3 px-5 cursor-pointer text-white font-bold ", onClick: ev => { var pageX = parseInt(searchPrams.page) + 1; setsearchPrams({ ...searchPrams, page: pageX }); fetchCss(); } }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "animate-ping absolute -top-1 -right-1 h-3 w-3 rounded-full pg-bg-color " }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "flex items-center justify-center gap-2" }, isLoading && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "text-center" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_3__.Spinner, null)), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", null, "Load More")))))))); } class PGTemplates extends Component { constructor(props) { super(props); this.state = { showWarning: true }; this.handleToggleClick = this.handleToggleClick.bind(this); } handleToggleClick() { this.setState(state => ({ showWarning: !state.showWarning })); } render() { var { onChange, setEnable } = this.props; return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, { setEnable: setEnable, warn: this.state.showWarning }); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGTemplates); /***/ }), /***/ "./src/components/tutorials/index.js": /*!*******************************************!*\ !*** ./src/components/tutorials/index.js ***! \*******************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /* 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_components__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/components */ "@wordpress/components"); /* harmony import */ var _wordpress_components__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_2__); const { Component, RawHTML } = wp.element; class PGTutorials extends Component { render() { var { slug } = this.props; function Html(props) { const [filteredLinks, setfilteredLinks] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); const [keyword, setKeyword] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [docsData, setDocsData] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(""); const [loading, setloading] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); const [links, setLinks] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)([]); (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useEffect)(() => { fetch(`https://getpostgrid.com/wp-json/post-grid/v2/get_post_docs?category=${slug}`, { method: "POST", headers: { "Content-Type": "application/json;charset=utf-8" } }).then(response => { if (response.ok && response.status < 400) { response.json().then(data => { var tutorialsLinks = []; data.posts.map(x => { tutorialsLinks.push({ label: x.post_title, url: x.url, isVideo: false }); }); }); setLinks(tutorialsLinks); } }).catch(_error => { //this.saveAsStatus = 'error'; // handle the error }); }, []); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-2" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_components__WEBPACK_IMPORTED_MODULE_1__.__experimentalInputControl, { type: "text", className: "w-full rounded-none px-3 py-2", placeholder: "Search Tutorials", value: keyword, onChange: newVal => { setKeyword(newVal); setfilteredLinks([]); var newLinks = []; var xLink = links.map((x, index) => { var linkObj = {}; let position = x.label.toLowerCase().search(newVal.toLowerCase()); if (position < 0) { linkObj.exclude = true; } else { linkObj.exclude = false; } if (newVal.length > 0) { let label = x.label.replace(newVal, "<span className='bg-amber-500'>" + newVal + "</span>"); linkObj.label = label; } else { linkObj.label = x.label; } linkObj = { ...x, exclude: linkObj.exclude, label: linkObj.label }; return linkObj; //newLinks.push(x); }); setfilteredLinks(xLink); } })), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { className: "my-5" }, keyword.length == 0 && links.map(link => { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, link.url.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: "block my-1 text-[14px] hover:underline", href: link.url, target: "_blank" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-editor-help" }), " ", link.label)); }), keyword.length > 0 && filteredLinks.map(link => { if (link.exclude === false) { return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, link.url.length > 0 && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("a", { className: "block my-1 text-[14px] hover:underline", href: link.url, target: "_blank" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-editor-help" }), " ", link.label)); } }))); } return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(Html, null)); } } /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (PGTutorials); /***/ }), /***/ "./src/custom-tags.js": /*!****************************!*\ !*** ./src/custom-tags.js ***! \****************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); var customTags = { currentYear: { label: "Current Year", id: "currentYear['y']", value: "2023" }, currentMonth: { label: "Current Month", id: "currentMonth['m']", value: "07" }, currentDay: { label: "Current Day", id: "currentDay['d']", value: "01" }, currentDate: { label: "Current Date", id: "currentDate['d-m-Y']", value: "01-01-2023", isPro: true }, currentTime: { label: "Current Time", id: "currentTime['h:i:sa']", value: "06:00:00:am" }, postPublishDate: { label: "Post Publish Date", id: "postPublishDate['d-m-Y']", value: "01-01-2023" }, postModifiedDate: { label: "Post Modified Date", id: "postModifiedDate['d-m-Y']", value: "01-01-2023", isPro: true }, termId: { label: "Term Id", id: "termId", value: "123" }, termTitle: { label: "Term Title", id: "termTitle", value: "Hello Term Title", isPro: true }, termDescription: { label: "Term Description", id: "termDescription", value: "Hello term description" }, termPostCount: { label: "Term Post Count", id: "termPostCount", value: "123", isPro: true }, postTagTitle: { label: "Post Tag Title", id: "postTagTitle", value: "sports", isPro: true }, postTagsTitle: { label: "Post Tags Title", id: "postTagsTitle['3,-']", value: "football , cricket" }, postCategoryTitle: { label: "Post Category Title", id: "postCategoryTitle", value: "sports", isPro: true }, postCategoriesTitle: { label: "Post Categories Title", id: "postCategoriesTitle['3']", value: "football , cricket" }, postTermTitle: { label: "Post Term Title", id: "postTermTitle['taxonomy']", value: "sports", isPro: true }, postTermsTitle: { label: "Post Terms Title", id: "postTermsTitle['taxonomy,3']", value: "football , cricket", isPro: true }, postSlug: { label: "Post Slug", id: "postSlug", value: "post-slug" }, postId: { label: "Post ID", id: "postID", value: "123" }, postStatus: { label: "Post Status", id: "postStatus", value: "published" }, authorId: { label: "Author Id", id: "authorId", value: "123" }, authorName: { label: "Author Name", id: "authorName", value: "hello author", isPro: true }, authorFirstName: { label: "Author FirstName", id: "authorFirstName", value: "first name", isPro: true }, authorLastName: { label: "Author Last Name", id: "authorLastName", value: "last name", isPro: true }, authorDescription: { label: "Author Description", id: "authorDescription", value: "Hello author description" }, excerpt: { label: "Post Excerpt", id: "excerpt", value: "hello excerpt" }, rankmathTitle: { label: "Rankmath Title", id: "rankmathTitle", value: "Rank Math Title", isPro: true }, // rankmathPermalink: { // label: "Rankmath Permalink", // id: "rankmathPermalink", // value: "", // }, rankmathDescription: { label: "Rankmath Description", id: "rankmathDescription", value: "Rank Math Description" }, rankmathFocusKeyword: { label: "Rankmath Focus Keyword", id: "rankmathFocusKeyword", value: "Rank Math Focus Keyword" }, // rankmathFocusKeywords: { // label: "Rankmath Focus Keywords", // id: "rankmathFocusKeywords[', ']", // value: "", // }, rankmathOrgname: { label: "Rankmath Org name", id: "rankmathOrgname", value: "Rank Math Org Name" }, rankmathOrgurl: { label: "Rankmath Org URL", id: "rankmathOrgurl", value: "https://hello.world" }, rankmathOrglogo: { label: "Rankmath Org logo", id: "rankmathOrglogo", value: "" }, siteTitle: { label: "Site Title", id: "siteTitle", value: "WordPress" }, siteDescription: { label: "Site Description", id: "siteDescription", value: "Hello site description" }, // siteTagline: { label: "Site Tagline", id: "siteTagline", value: "" }, postMeta: { label: "Post Meta", id: "postMeta['metaKey']", value: "meta value" }, separator: { label: "Separator", id: "separator['-']", value: "-" }, searchTerms: { label: "Search Terms", id: "searchTerms", value: "hello search terms", isPro: true } // counter: { label: "Counter", id: "counter", value: "" }, }; /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (customTags); /***/ }), /***/ "./src/sidebars.js": /*!*************************!*\ !*** ./src/sidebars.js ***! \*************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/plugins */ "@wordpress/plugins"); /* harmony import */ var _wordpress_plugins__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__); /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @wordpress/edit-post */ "@wordpress/edit-post"); /* harmony import */ var _wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__); /* harmony import */ var _components_sidebars__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./components/sidebars */ "./src/components/sidebars/index.js"); var myStore = wp.data.select('postgrid-shop'); var breakPointX = myStore.getBreakPoint(); var iconPostGrid = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("svg", { xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 36 36" }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d4ed8", d: "M15.41,15.41H0V0H15.41ZM3,12.41h9.41V3H3Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d4ed8", d: "M15.41,36H0V20.59H15.41ZM3,33h9.41V23.59H3Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("path", { fill: "#1d4ed8", d: "M36,36H20.59V20.59H36ZM23.59,33H33V23.59H23.59Z" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "25.15", y: "3.87", width: "10.85", height: "2.35" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("rect", { fill: "#1d4ed8", x: "25.15", y: "9.19", width: "10.85", height: "2.35" })); const PostGridSidebar = () => (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_edit_post__WEBPACK_IMPORTED_MODULE_2__.PluginSidebar, { name: "post-grid-sidebar", title: "Post Grid Combo", icon: iconPostGrid }, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_sidebars__WEBPACK_IMPORTED_MODULE_3__["default"], null)); (0,_wordpress_plugins__WEBPACK_IMPORTED_MODULE_1__.registerPlugin)('post-grid-sidebar', { render: PostGridSidebar }); /***/ }), /***/ "./src/store.js": /*!**********************!*\ !*** ./src/store.js ***! \**********************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ store: () => (/* binding */ store) /* harmony export */ }); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_1__); const { __experimentalSetPreviewDeviceType: setPreviewDeviceType } = wp.data.dispatch("core/edit-post"); // if (wp.data.dispatch('core/edit-post') != null) { // const { // __experimentalSetPreviewDeviceType: setPreviewDeviceType, // } = wp.data.dispatch('core/edit-post') // } else { // const { // __experimentalSetPreviewDeviceType: setPreviewDeviceType, // } = wp.data.dispatch('core/edit-widgets') // } const DEFAULT_STATE = { breakPoint: "Desktop", clientdata: {}, license: { license_status: "", license_key: "" }, blockCss: "", stylesClipboard: null }; var selectors = { getBreakPoint(state) { const { breakPoint } = state; return breakPoint; }, getclientdata(state) { const { clientdata } = state; return clientdata; }, getLicense(state) { const { license } = state; return license; }, getStylesClipboard(state) { const { stylesClipboard } = state; return stylesClipboard; }, parseCustomTags(state, str, tags) { var strArr = str.split(" "); var newStr = strArr.map(item => { if (item.indexOf("currentYear") >= 0) { return tags.currentYear.value; } else if (item.indexOf("currentMonth") >= 0) { return tags.currentMonth.value; } else if (item.indexOf("currentDay") >= 0) { return tags.currentDay.value; } else if (item.indexOf("currentDate") >= 0) { return tags.currentDate.value; } else if (item.indexOf("currentTime") >= 0) { return tags.currentTime.value; } else if (item.indexOf("postPublishDate") >= 0) { return tags.postPublishDate.value; } else if (item.indexOf("postModifiedDate") >= 0) { return tags.postModifiedDate.value; } else if (item.indexOf("termId") >= 0) { return tags.termId.value; } else if (item.indexOf("termTitle") >= 0) { return tags.termTitle.value; } else if (item.indexOf("termDescription") >= 0) { return tags.termDescription.value; } else if (item.indexOf("termPostCount") >= 0) { return tags.termPostCount.value; } else if (item.indexOf("postTagTitle") >= 0) { return tags.postTagTitle.value; } else if (item.indexOf("postTagsTitle") >= 0) { return tags.postTagsTitle.value; } else if (item.indexOf("postCategoryTitle") >= 0) { return tags.postCategoryTitle.value; } else if (item.indexOf("postCategoriesTitle") >= 0) { return tags.postCategoriesTitle.value; } else if (item.indexOf("postTermTitle") >= 0) { return tags.postTermTitle.value; } else if (item.indexOf("postTermsTitle") >= 0) { return tags.postTermsTitle.value; } else if (item.indexOf("postSlug") >= 0) { return tags.postSlug.value; } else if (item.indexOf("postId") >= 0) { return tags.postId.value; } else if (item.indexOf("postStatus") >= 0) { return tags.postStatus.value; } else if (item.indexOf("authorId") >= 0) { return tags.authorId.value; } else if (item.indexOf("authorName") >= 0) { return tags.authorName.value; } else if (item.indexOf("authorFirstName") >= 0) { return tags.authorFirstName.value; } else if (item.indexOf("authorLastName") >= 0) { return tags.authorLastName.value; } else if (item.indexOf("authorDescription") >= 0) { return tags.authorDescription.value; } else if (item.indexOf("excerpt") >= 0) { return tags.excerpt.value; } else if (item.indexOf("rankmathTitle") >= 0) { return tags.rankmathTitle.value; } else if (item.indexOf("rankmathDescription") >= 0) { return tags.rankmathDescription.value; } else if (item.indexOf("rankmathFocusKeyword") >= 0) { return tags.rankmathFocusKeyword.value; } else if (item.indexOf("rankmathOrgname") >= 0) { return tags.rankmathOrgname.value; } else if (item.indexOf("rankmathOrgurl") >= 0) { return tags.rankmathOrgurl.value; } else if (item.indexOf("rankmathOrglogo") >= 0) { return tags.rankmathOrglogo.value; } else if (item.indexOf("siteTitle") >= 0) { return tags.siteTitle.value; } else if (item.indexOf("siteDescription") >= 0) { return tags.siteDescription.value; } else if (item.indexOf("postMeta") >= 0) { return tags.currentDay.value; } else if (item.indexOf("separator") >= 0) { return tags.separator.value; } else if (item.indexOf("searchTerms") >= 0) { return tags.searchTerms.value; } // else if (item.indexOf("counter") >= 0) { // return tags.counter.value; // } else { return item; } }); return newStr.join(" "); }, cssAttrParse(state, key) { var cssProp = ""; if (key == "alignContent") { cssProp = "align-content"; } else if (key == "alignItems") { cssProp = "align-items"; } else if (key == "alignSelf") { cssProp = "align-self"; } else if (key == "aspectRatio") { cssProp = "aspect-ratio"; } else if (key == "backfaceVisibility") { cssProp = "backface-visibility"; } else if (key == "backgroundAttachment") { cssProp = "background-attachment"; } else if (key == "backgroundBlendMode") { cssProp = "background-blend-mode"; } else if (key == "backgroundClip") { cssProp = "background-clip"; } else if (key == "bgColor") { cssProp = "background-color"; } else if (key == "backgroundColor") { cssProp = "background-color"; } else if (key == "backgroundOrigin") { cssProp = "background-origin"; } else if (key == "backgroundRepeat") { cssProp = "background-repeat"; } else if (key == "backgroundSize") { cssProp = "background-size"; } else if (key == "backgroundPosition") { cssProp = "background-position"; } else if (key == "backgroundImage") { cssProp = "background-image"; } else if (key == "border") { cssProp = "border"; } else if (key == "borderTop") { cssProp = "border-top"; } else if (key == "borderRight") { cssProp = "border-right"; } else if (key == "borderBottom") { cssProp = "border-bottom"; } else if (key == "borderLeft") { cssProp = "border-left"; } else if (key == "borderRadius") { cssProp = "border-radius"; } else if (key == "borderCollapse") { cssProp = "border-collapse"; } else if (key == "borderSpacing") { cssProp = "border-spacing"; } else if (key == "borderImage") { cssProp = "border-image"; } else if (key == "boxShadow") { cssProp = "box-shadow"; } else if (key == "backdropFilter") { cssProp = "backdrop-filter"; } else if (key == "bottom" || key == "top" || key == "left" || key == "right" || key == "clear" || key == "color" || key == "filter" || key == "float") { cssProp = key; } else if (key == "boxSizing") { cssProp = "box-sizing"; } else if (key == "cursor") { cssProp = "cursor"; } else if (key == "content") { cssProp = "content"; } else if (key == "columnCount") { cssProp = "column-count"; } else if (key == "columnRule") { cssProp = "column-rule"; } else if (key == "direction") { cssProp = "direction"; } else if (key == "fontFamily") { cssProp = "font-family"; } else if (key == "fontSize") { cssProp = "font-size"; } else if (key == "fontStyle") { cssProp = "font-style"; } else if (key == "fontStretch") { cssProp = "font-stretch"; } else if (key == "fontWeight") { cssProp = "font-weight"; } else if (key == "fontVariantCaps") { cssProp = "font-variant-caps"; } else if (key == "flexWrap") { cssProp = "flex-wrap"; } else if (key == "flexDirection") { cssProp = "flex-direction"; } else if (key == "flexGrow") { cssProp = "flex-grow"; } else if (key == "flexShrink") { cssProp = "flex-shrink"; } else if (key == "flexBasis") { cssProp = "flex-basis"; } else if (key == "flexFlow") { cssProp = "flex-flow"; } else if (key == "letterSpacing") { cssProp = "letter-spacing"; } else if (key == "gridColumnEnd") { cssProp = "grid-column-end"; } else if (key == "gridColumnStart") { cssProp = "grid-column-start"; } else if (key == "gridRowEnd") { cssProp = "grid-row-end"; } else if (key == "gridRowStart") { cssProp = "grid-row-start"; } else if (key == "gridTemplateColumns") { cssProp = "grid-template-columns"; } else if (key == "gridTemplateRows") { cssProp = "grid-template-rows"; } else if (key == "listStyle") { cssProp = "list-style"; } else if (key == "lineHeight") { cssProp = "line-height"; } else if (key == "justifyContent") { cssProp = "justify-content"; } else if (key == "objectFit") { cssProp = "object-fit"; } else if (key == "opacity") { cssProp = "opacity"; } else if (key == "outline") { cssProp = "outline"; } else if (key == "order") { cssProp = "order"; } else if (key == "outlineOffset") { cssProp = "outline-offset"; } else if (key == "position") { cssProp = "position"; } else if (key == "textIndent") { cssProp = "text-indent"; } else if (key == "textJustify") { cssProp = "text-justify"; } else if (key == "textTransform") { cssProp = "text-transform"; } else if (key == "textDecoration") { cssProp = "text-decoration"; } else if (key == "textOverflow") { cssProp = "text-overflow"; } else if (key == "textShadow") { cssProp = "text-shadow"; } else if (key == "textAlign") { cssProp = "text-align"; } else if (key == "visibility") { cssProp = "visibility"; } else if (key == "wordBreak") { cssProp = "word-break"; } else if (key == "wordSpacing") { cssProp = "word-spacing"; } else if (key == "zIndex") { cssProp = "z-index"; } else if (key == "padding") { cssProp = "padding"; } else if (key == "paddingTop") { cssProp = "padding-top"; } else if (key == "paddingRight") { cssProp = "padding-right"; } else if (key == "paddingBottom") { cssProp = "padding-bottom"; } else if (key == "paddingLeft") { cssProp = "padding-left"; } else if (key == "margin") { cssProp = "margin"; } else if (key == "marginTop") { cssProp = "margin-top"; } else if (key == "marginRight") { cssProp = "margin-right"; } else if (key == "marginBottom") { cssProp = "margin-bottom"; } else if (key == "marginLeft") { cssProp = "margin-left"; } else if (key == "display") { cssProp = "display"; } else if (key == "width") { cssProp = "width"; } else if (key == "height") { cssProp = "height"; } else if (key == "verticalAlign") { cssProp = "vertical-align"; } else if (key == "overflow") { cssProp = "overflow"; } else if (key == "overflowX") { cssProp = "overflow-x"; } else if (key == "overflowY") { cssProp = "overflow-y"; } else if (key == "writingMode") { cssProp = "writing-mode"; } else if (key == "wordWrap") { cssProp = "word-wrap"; } else if (key == "perspective") { cssProp = "perspective"; } else if (key == "minWidth") { cssProp = "min-width"; } else if (key == "minHeight") { cssProp = "min-height"; } else if (key == "maxHeight") { cssProp = "max-height"; } else if (key == "maxWidth") { cssProp = "max-width"; } else if (key == "transition") { cssProp = "transition"; } else if (key == "transform") { cssProp = "transform"; } else if (key == "transformOrigin") { cssProp = "transform-origin"; } else if (key == "gap") { cssProp = "gap"; } else if (key == "rowGap") { cssProp = "row-gap"; } else if (key == "columnGap") { cssProp = "column-gap"; } else if (key == "userSelect") { cssProp = "user-select"; } else { cssProp = key; } return cssProp; }, onAddStyleItem(state, sudoScource, key, obj) { const { breakPoint } = state; var path = [sudoScource, key, breakPoint]; let objX = Object.assign({}, obj); const object = selectors.addPropertyDeep(state, objX, path, ""); return object; }, addPropertyDeep(state, obj, path, value) { const [head, ...rest] = path; return { ...obj, [head]: rest.length ? selectors.addPropertyDeep(state, obj[head], rest, value) : value }; }, updatePropertyDeep(state, obj, path, value) { // console.log('obj', obj); const [head, ...rest] = path; return { ...obj, [head]: rest.length ? selectors.updatePropertyDeep(state, obj[head], rest, value) : value }; }, setPropertyDeep(state, obj, path, value) { const [head, ...rest] = path.split("."); return { ...obj, [head]: rest.length ? selectors.setPropertyDeep(state, obj[head], rest.join("."), value) : value }; }, deletePropertyDeep(state, object, path) { var last = path.pop(); delete path.reduce((o, k) => o[k] || {}, object)[last]; return object; }, getElementSelector(state, sudoScource, mainSelector) { var elementSelector = mainSelector; if (sudoScource == "styles") { elementSelector = mainSelector; } else if (sudoScource == "hover") { elementSelector = mainSelector + ":hover"; } else if (sudoScource == "after") { elementSelector = mainSelector + "::after"; } else if (sudoScource == "before") { elementSelector = mainSelector + "::before"; } else if (sudoScource == "first-child") { elementSelector = mainSelector + ":first-child"; } else if (sudoScource == "last-child") { elementSelector = mainSelector + ":last-child"; } else if (sudoScource == "visited") { elementSelector = mainSelector + ":visited"; } else if (sudoScource == "selection") { elementSelector = mainSelector + "::selection"; } else if (sudoScource == "first-letter") { elementSelector = mainSelector + "::first-letter"; } else if (sudoScource == "first-line") { elementSelector = mainSelector + "::first-line"; } else { elementSelector = mainSelector + ":" + sudoScource; } return elementSelector; }, // generateElementCss(state, obj, elementSelector) { // var cssObj = {}; // Object.entries(obj).map((args) => { // var sudoSrc = args[0]; // var sudoArgs = args[1]; // if (sudoSrc != "options" && sudoArgs != null) { // var selector = selectors.getElementSelector( // state, // sudoSrc, // elementSelector // ); // Object.entries(args[1]).map((x) => { // var attr = x[0]; // var cssPropty = selectors.cssAttrParse(state, attr); // if (cssObj[selector] == undefined) { // cssObj[selector] = {}; // } // if (cssObj[selector][cssPropty] == undefined) { // cssObj[selector][cssPropty] = {}; // } // cssObj[selector][cssPropty] = x[1]; // }); // } // }); // return cssObj; // }, generateElementCss(state, obj, elementSelector) { var cssObj = {}; Object.entries(obj).map(args => { var sudoSrc = args[0]; var sudoArgs = args[1]; if (sudoSrc != "options" && sudoArgs != null) { var selector = selectors.getElementSelector(state, sudoSrc, elementSelector); Object.entries(args[1]).map(x => { var attr = x[0]; var propVal = x[1]; var cssPropty = selectors.cssAttrParse(state, attr); var found = Object.entries(propVal).reduce((a, [k, v]) => v ? (a[k] = v, a) : a, {}); if (Object.keys(found).length > 0) { if (cssObj[selector] == undefined) { cssObj[selector] = {}; } if (cssObj[selector][cssPropty] == undefined) { cssObj[selector][cssPropty] = {}; } cssObj[selector][cssPropty] = x[1]; } }); } }); return cssObj; }, // getBlockCssRules(state, blockCssObj) { // var blockCssRules = {}; // Object.entries(blockCssObj).map((args) => { // var elementSelector = args[0]; // var elementObj = args[1]; // var elementCss = selectors.generateElementCss( // state, // elementObj, // elementSelector // ); // if (elementCss[elementSelector] == undefined) { // } else { // blockCssRules[elementSelector] = elementCss[elementSelector]; // } // }); // return blockCssRules; // }, getBlockCssRules(state, blockCssObj) { var blockCssRules = {}; // console.log(blockCssObj); Object.entries(blockCssObj).map(args => { var elementSelector = args[0]; var elementObj = args[1]; var elementCss = selectors.generateElementCss(state, elementObj, elementSelector); Object.entries(elementCss).map(sudoCss => { var sudoSelector = sudoCss[0]; var sudoVal = sudoCss[1]; blockCssRules[sudoSelector] = sudoVal; }); }); return blockCssRules; }, generateCssFromElementObject(state, obj, selector) { var reponsiveCssGroups = {}; }, generateBlockCss(state, items, blockId) { const { blockCss } = state; var reponsiveCssGroups = {}; for (var selector in items) { var attrs = items[selector]; for (var attr in attrs) { var breakpoints = attrs[attr]; for (var device in breakpoints) { var attrValue = breakpoints[device]; if (reponsiveCssGroups[device] == undefined) { reponsiveCssGroups[device] = []; } if (reponsiveCssGroups[device] == undefined) { reponsiveCssGroups[device] = []; } if (reponsiveCssGroups[device][selector] == undefined) { reponsiveCssGroups[device][selector] = []; } //console.log("attrValue"); //console.log(attrValue); console.log(attr); console.log(attrValue); attrValue = attrValue.replaceAll("u0022", '"'); reponsiveCssGroups[device][selector].push({ attr: attr, val: attrValue }); } } } var reponsiveCssDesktop = ""; if (reponsiveCssGroups["Desktop"] != undefined) { for (var selector in reponsiveCssGroups["Desktop"]) { var attrs = reponsiveCssGroups["Desktop"][selector]; reponsiveCssDesktop += selector + "{"; for (var index in attrs) { var attr = attrs[index]; var attrName = attr.attr; var attrValue = attr.val; reponsiveCssDesktop += attrName + ":" + attrValue + ";"; } reponsiveCssDesktop += "}"; } } var reponsiveCssTablet = ""; if (reponsiveCssGroups["Tablet"] != undefined) { reponsiveCssTablet += "@media(max-width: 991px){"; for (var selector in reponsiveCssGroups["Tablet"]) { var attrs = reponsiveCssGroups["Tablet"][selector]; reponsiveCssTablet += selector + "{"; for (var index in attrs) { var attr = attrs[index]; var attrName = attr.attr; var attrValue = attr.val; reponsiveCssTablet += attrName + ":" + attrValue + ";"; } reponsiveCssTablet += "}"; } reponsiveCssTablet += "}"; } var reponsiveCssMobile = ""; if (reponsiveCssGroups["Mobile"] != undefined) { reponsiveCssMobile += "@media(max-width:767px){"; for (var selector in reponsiveCssGroups["Mobile"]) { var attrs = reponsiveCssGroups["Mobile"][selector]; reponsiveCssMobile += selector + "{"; for (var index in attrs) { var attr = attrs[index]; var attrName = attr.attr; var attrValue = attr.val; reponsiveCssMobile += attrName + ":" + attrValue + ";"; } reponsiveCssMobile += "}"; } reponsiveCssMobile += "}"; } var reponsiveCss = reponsiveCssDesktop + reponsiveCssTablet + reponsiveCssMobile; var iframe = document.querySelectorAll('[name="editor-canvas"]')[0]; if (iframe) { setTimeout(() => { var iframeDocument = iframe.contentDocument; var body = iframeDocument.body; var divWrap = iframeDocument.getElementById("css-block-" + blockId); if (divWrap != undefined) { iframeDocument.getElementById("css-block-" + blockId).outerHTML = ""; } var divWrap = '<div id="css-block-' + blockId + '"></div>'; body.insertAdjacentHTML("beforeend", divWrap); var csswrappg = iframeDocument.getElementById("css-block-" + blockId); var str = "<style>" + reponsiveCss + "</style>"; csswrappg.insertAdjacentHTML("beforeend", str); }, 200); } else { var wpfooter = document.getElementById("wpfooter"); var divWrap = document.getElementById("css-block-" + blockId); if (divWrap != undefined) { document.getElementById("css-block-" + blockId).outerHTML = ""; } var divWrap = '<div id="css-block-' + blockId + '"></div>'; wpfooter.insertAdjacentHTML("beforeend", divWrap); var csswrappg = document.getElementById("css-block-" + blockId); var str = "<style>" + reponsiveCss + "</style>"; csswrappg.insertAdjacentHTML("beforeend", str); } return blockCss; } }; var resolvers = { *getLicense() { const path = "/post-grid/v2/get_license"; const res = yield actions.fetchLicense(path); return actions.setLicense(res); }, *getclientdata() { const path = "/post-grid/v2/get_site_details"; const res = yield actions.fetchclientdata(path); return actions.setclientdata(res); } }; const actions = { setBreakPoint(breakpoint) { // console.log(breakpoint); setPreviewDeviceType(breakpoint); return { type: "SET_BREAKPOINT", breakpoint }; }, setclientdata(clientdata) { return { type: "SET_CLIENTDATA", clientdata }; }, setLicense(license) { return { type: "SET_LICENSE", license }; }, setStylesClipboard(stylesClipboard) { return { type: "SET_CLIPBOARD", stylesClipboard }; }, fetchLicense(path) { return { type: "FETCH_LICENSE_FROM_API", path }; }, fetchclientdata(path) { return { type: "FETCH_CLIENTDATA_FROM_API", path }; } }; var controls = { FETCH_LICENSE_FROM_API(action) { return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ path: action.path, method: "POST", data: {} }); }, FETCH_CLIENTDATA_FROM_API(action) { return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ path: action.path, method: "POST", data: {} }); }, FETCH_PRO_INFO_FROM_API(action) { return _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ path: action.path, method: "POST", data: {} }); } }; const store = (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.createReduxStore)("postgrid-shop", { reducer(state = DEFAULT_STATE, action) { switch (action.type) { case "SET_BREAKPOINT": return { ...state, breakPoint: action.breakpoint }; case "SET_CLIENTDATA": return { ...state, clientdata: action.clientdata }; case "SET_LICENSE": return { ...state, license: action.license }; case "SET_CLIPBOARD": return { ...state, stylesClipboard: action.stylesClipboard }; } return state; }, actions, selectors, controls, resolvers }); (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.register)(store); (0,_wordpress_data__WEBPACK_IMPORTED_MODULE_1__.subscribe)(() => {}); /***/ }), /***/ "./src/templates.js": /*!**************************!*\ !*** ./src/templates.js ***! \**************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/element */ "@wordpress/element"); /* harmony import */ var _wordpress_element__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _components_templates__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./components/templates */ "./src/components/templates/index.js"); function TemplatesBtn(props) { // if (!props.warn) { // return null; // } const [enable, setEnable] = (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.useState)(false); return (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.Fragment, null, (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("div", { id: "pgTemplatesEnable", className: "pg-font flex gap-2 justify-center my-2 cursor-pointer py-2 px-4 capitalize tracking-wide bg-gray-800 text-white font-medium rounded hover:bg-gray-700 hover:text-white focus:outline-none focus:bg-gray-700" // className="bg-blue-700 px-5 py-2 cursor-pointer rounded-sm text-white font-bold hover:text-white" , onClick: ev => { setEnable(!enable); } }, enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-no-alt" }), !enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "dashicons dashicons-buddicons-groups" }), (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)("span", { className: "inline-block mx-2" }, "Templates")), enable && (0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(_components_templates__WEBPACK_IMPORTED_MODULE_1__["default"], { setEnable: setEnable })); } document.addEventListener("DOMContentLoaded", DOMContentLoadedImport); function DOMContentLoadedImport() { setTimeout(() => { var headerSettings = document.querySelector('.edit-post-header__settings'); var wpcontent = document.querySelector('#wpcontent'); var wpfooter = document.querySelector('#wpfooter'); var wpbody = document.querySelector('#wpbody'); var templatesWrap = document.querySelector('#editor .interface-interface-skeleton__content'); var importEl = document.createElement('div'); var html = '<div class="pgTemplates" id="pgTemplatesBtn"></div>'; importEl.innerHTML = html; //headerSettings.appendChild(importEl); if (headerSettings != null) { headerSettings.prepend(importEl); } var pgTemplatesBtn = document.querySelector('#pgTemplatesBtn'); if (pgTemplatesBtn != null) { wp.element.render((0,_wordpress_element__WEBPACK_IMPORTED_MODULE_0__.createElement)(TemplatesBtn, null), pgTemplatesBtn); } }, 2000); } /***/ }), /***/ "./node_modules/desandro-matches-selector/matches-selector.js": /*!********************************************************************!*\ !*** ./node_modules/desandro-matches-selector/matches-selector.js ***! \********************************************************************/ /***/ ((module, exports, __webpack_require__) => { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** * matchesSelector v2.0.2 * matchesSelector( element, '.selector' ) * MIT license */ /*jshint browser: true, strict: true, undef: true, unused: true */ ( function( window, factory ) { /*global define: false, module: false */ 'use strict'; // universal module definition if ( true ) { // AMD !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }( window, function factory() { 'use strict'; var matchesMethod = ( function() { var ElemProto = window.Element.prototype; // check for the standard method name first if ( ElemProto.matches ) { return 'matches'; } // check un-prefixed if ( ElemProto.matchesSelector ) { return 'matchesSelector'; } // check vendor prefixes var prefixes = [ 'webkit', 'moz', 'ms', 'o' ]; for ( var i=0; i < prefixes.length; i++ ) { var prefix = prefixes[i]; var method = prefix + 'MatchesSelector'; if ( ElemProto[ method ] ) { return method; } } })(); return function matchesSelector( elem, selector ) { return elem[ matchesMethod ]( selector ); }; })); /***/ }), /***/ "./node_modules/ev-emitter/ev-emitter.js": /*!***********************************************!*\ !*** ./node_modules/ev-emitter/ev-emitter.js ***! \***********************************************/ /***/ (function(module) { /** * EvEmitter v2.1.1 * Lil' event emitter * MIT License */ ( function( global, factory ) { // universal module definition if ( true && module.exports ) { // CommonJS - Browserify, Webpack module.exports = factory(); } else { // Browser globals global.EvEmitter = factory(); } }( typeof window != 'undefined' ? window : this, function() { function EvEmitter() {} let proto = EvEmitter.prototype; proto.on = function( eventName, listener ) { if ( !eventName || !listener ) return this; // set events hash let events = this._events = this._events || {}; // set listeners array let listeners = events[ eventName ] = events[ eventName ] || []; // only add once if ( !listeners.includes( listener ) ) { listeners.push( listener ); } return this; }; proto.once = function( eventName, listener ) { if ( !eventName || !listener ) return this; // add event this.on( eventName, listener ); // set once flag // set onceEvents hash let onceEvents = this._onceEvents = this._onceEvents || {}; // set onceListeners object let onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; // set flag onceListeners[ listener ] = true; return this; }; proto.off = function( eventName, listener ) { let listeners = this._events && this._events[ eventName ]; if ( !listeners || !listeners.length ) return this; let index = listeners.indexOf( listener ); if ( index != -1 ) { listeners.splice( index, 1 ); } return this; }; proto.emitEvent = function( eventName, args ) { let listeners = this._events && this._events[ eventName ]; if ( !listeners || !listeners.length ) return this; // copy over to avoid interference if .off() in listener listeners = listeners.slice( 0 ); args = args || []; // once stuff let onceListeners = this._onceEvents && this._onceEvents[ eventName ]; for ( let listener of listeners ) { let isOnce = onceListeners && onceListeners[ listener ]; if ( isOnce ) { // remove listener // remove before trigger to prevent recursion this.off( eventName, listener ); // unset once flag delete onceListeners[ listener ]; } // trigger listener listener.apply( this, args ); } return this; }; proto.allOff = function() { delete this._events; delete this._onceEvents; return this; }; return EvEmitter; } ) ); /***/ }), /***/ "./node_modules/fizzy-ui-utils/utils.js": /*!**********************************************!*\ !*** ./node_modules/fizzy-ui-utils/utils.js ***! \**********************************************/ /***/ ((module, exports, __webpack_require__) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** * Fizzy UI utils v2.0.7 * MIT license */ /*jshint browser: true, undef: true, unused: true, strict: true */ ( function( window, factory ) { // universal module definition /*jshint strict: false */ /*globals define, module, require */ if ( true ) { // AMD !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! desandro-matches-selector/matches-selector */ "./node_modules/desandro-matches-selector/matches-selector.js") ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( matchesSelector ) { return factory( window, matchesSelector ); }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }( window, function factory( window, matchesSelector ) { 'use strict'; var utils = {}; // ----- extend ----- // // extends objects utils.extend = function( a, b ) { for ( var prop in b ) { a[ prop ] = b[ prop ]; } return a; }; // ----- modulo ----- // utils.modulo = function( num, div ) { return ( ( num % div ) + div ) % div; }; // ----- makeArray ----- // var arraySlice = Array.prototype.slice; // turn element or nodeList into an array utils.makeArray = function( obj ) { if ( Array.isArray( obj ) ) { // use object if already an array return obj; } // return empty array if undefined or null. #6 if ( obj === null || obj === undefined ) { return []; } var isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; if ( isArrayLike ) { // convert nodeList to array return arraySlice.call( obj ); } // array of single index return [ obj ]; }; // ----- removeFrom ----- // utils.removeFrom = function( ary, obj ) { var index = ary.indexOf( obj ); if ( index != -1 ) { ary.splice( index, 1 ); } }; // ----- getParent ----- // utils.getParent = function( elem, selector ) { while ( elem.parentNode && elem != document.body ) { elem = elem.parentNode; if ( matchesSelector( elem, selector ) ) { return elem; } } }; // ----- getQueryElement ----- // // use element as selector string utils.getQueryElement = function( elem ) { if ( typeof elem == 'string' ) { return document.querySelector( elem ); } return elem; }; // ----- handleEvent ----- // // enable .ontype to trigger from .addEventListener( elem, 'type' ) utils.handleEvent = function( event ) { var method = 'on' + event.type; if ( this[ method ] ) { this[ method ]( event ); } }; // ----- filterFindElements ----- // utils.filterFindElements = function( elems, selector ) { // make array of elems elems = utils.makeArray( elems ); var ffElems = []; elems.forEach( function( elem ) { // check that elem is an actual element if ( !( elem instanceof HTMLElement ) ) { return; } // add elem if no selector if ( !selector ) { ffElems.push( elem ); return; } // filter & find items if we have a selector // filter if ( matchesSelector( elem, selector ) ) { ffElems.push( elem ); } // find children var childElems = elem.querySelectorAll( selector ); // concat childElems to filterFound array for ( var i=0; i < childElems.length; i++ ) { ffElems.push( childElems[i] ); } }); return ffElems; }; // ----- debounceMethod ----- // utils.debounceMethod = function( _class, methodName, threshold ) { threshold = threshold || 100; // original method var method = _class.prototype[ methodName ]; var timeoutName = methodName + 'Timeout'; _class.prototype[ methodName ] = function() { var timeout = this[ timeoutName ]; clearTimeout( timeout ); var args = arguments; var _this = this; this[ timeoutName ] = setTimeout( function() { method.apply( _this, args ); delete _this[ timeoutName ]; }, threshold ); }; }; // ----- docReady ----- // utils.docReady = function( callback ) { var readyState = document.readyState; if ( readyState == 'complete' || readyState == 'interactive' ) { // do async to allow for other scripts to run. metafizzy/flickity#441 setTimeout( callback ); } else { document.addEventListener( 'DOMContentLoaded', callback ); } }; // ----- htmlInit ----- // // http://jamesroberts.name/blog/2010/02/22/string-functions-for-javascript-trim-to-camel-case-to-dashed-and-to-underscore/ utils.toDashed = function( str ) { return str.replace( /(.)([A-Z])/g, function( match, $1, $2 ) { return $1 + '-' + $2; }).toLowerCase(); }; var console = window.console; /** * allow user to initialize classes via [data-namespace] or .js-namespace class * htmlInit( Widget, 'widgetName' ) * options are parsed from data-namespace-options */ utils.htmlInit = function( WidgetClass, namespace ) { utils.docReady( function() { var dashedNamespace = utils.toDashed( namespace ); var dataAttr = 'data-' + dashedNamespace; var dataAttrElems = document.querySelectorAll( '[' + dataAttr + ']' ); var jsDashElems = document.querySelectorAll( '.js-' + dashedNamespace ); var elems = utils.makeArray( dataAttrElems ) .concat( utils.makeArray( jsDashElems ) ); var dataOptionsAttr = dataAttr + '-options'; var jQuery = window.jQuery; elems.forEach( function( elem ) { var attr = elem.getAttribute( dataAttr ) || elem.getAttribute( dataOptionsAttr ); var options; try { options = attr && JSON.parse( attr ); } catch ( error ) { // log error, do not initialize if ( console ) { console.error( 'Error parsing ' + dataAttr + ' on ' + elem.className + ': ' + error ); } return; } // initialize var instance = new WidgetClass( elem, options ); // make available via $().data('namespace') if ( jQuery ) { jQuery.data( elem, namespace, instance ); } }); }); }; // ----- ----- // return utils; })); /***/ }), /***/ "./node_modules/fslightbox/index.js": /*!******************************************!*\ !*** ./node_modules/fslightbox/index.js ***! \******************************************/ /***/ ((module) => { !function(e,t){if(true)module.exports=t();else { var o, n; }}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var i=t[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(o,i,function(t){return e[t]}.bind(null,i));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";n.r(t);var o,i="fslightbox-",r="".concat(i,"styles"),s="".concat(i,"cursor-grabbing"),a="".concat(i,"full-dimension"),c="".concat(i,"flex-centered"),l="".concat(i,"open"),u="".concat(i,"transform-transition"),d="".concat(i,"absoluted"),f="".concat(i,"slide-btn"),p="".concat(f,"-container"),h="".concat(i,"fade-in"),m="".concat(i,"fade-out"),g=h+"-strong",v=m+"-strong",b="".concat(i,"opacity-"),x="".concat(b,"1"),y="".concat(i,"source");function w(e){return(w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function S(e){var t=e.stageIndexes,n=e.core.stageManager,o=e.props.sources.length-1;n.getPreviousSlideIndex=function(){return 0===t.current?o:t.current-1},n.getNextSlideIndex=function(){return t.current===o?0:t.current+1},n.updateStageIndexes=0===o?function(){}:1===o?function(){0===t.current?(t.next=1,delete t.previous):(t.previous=0,delete t.next)}:function(){t.previous=n.getPreviousSlideIndex(),t.next=n.getNextSlideIndex()},n.i=o<=2?function(){return!0}:function(e){var n=t.current;if(0===n&&e===o||n===o&&0===e)return!0;var i=n-e;return-1===i||0===i||1===i}}"object"===("undefined"==typeof document?"undefined":w(document))&&((o=document.createElement("style")).className=r,o.appendChild(document.createTextNode(".fslightbox-absoluted{position:absolute;top:0;left:0}.fslightbox-fade-in{animation:fslightbox-fade-in .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out{animation:fslightbox-fade-out .3s ease}.fslightbox-fade-in-strong{animation:fslightbox-fade-in-strong .3s cubic-bezier(0,0,.7,1)}.fslightbox-fade-out-strong{animation:fslightbox-fade-out-strong .3s ease}@keyframes fslightbox-fade-in{from{opacity:.65}to{opacity:1}}@keyframes fslightbox-fade-out{from{opacity:.35}to{opacity:0}}@keyframes fslightbox-fade-in-strong{from{opacity:.3}to{opacity:1}}@keyframes fslightbox-fade-out-strong{from{opacity:1}to{opacity:0}}.fslightbox-cursor-grabbing{cursor:grabbing}.fslightbox-full-dimension{width:100%;height:100%}.fslightbox-open{overflow:hidden;height:100%}.fslightbox-flex-centered{display:flex;justify-content:center;align-items:center}.fslightbox-opacity-0{opacity:0!important}.fslightbox-opacity-1{opacity:1!important}.fslightbox-scrollbarfix{padding-right:17px}.fslightbox-transform-transition{transition:transform .3s}.fslightbox-container{font-family:Arial,sans-serif;position:fixed;top:0;left:0;background:linear-gradient(rgba(30,30,30,.9),#000 1810%);touch-action:pinch-zoom;z-index:1000000000;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-tap-highlight-color:transparent}.fslightbox-container *{box-sizing:border-box}.fslightbox-svg-path{transition:fill .15s ease;fill:#ddd}.fslightbox-nav{height:45px;width:100%;position:absolute;top:0;left:0}.fslightbox-slide-number-container{display:flex;justify-content:center;align-items:center;position:relative;height:100%;font-size:15px;color:#d7d7d7;z-index:0;max-width:55px;text-align:left}.fslightbox-slide-number-container .fslightbox-flex-centered{height:100%}.fslightbox-slash{display:block;margin:0 5px;width:1px;height:12px;transform:rotate(15deg);background:#fff}.fslightbox-toolbar{position:absolute;z-index:3;right:0;top:0;height:100%;display:flex;background:rgba(35,35,35,.65)}.fslightbox-toolbar-button{height:100%;width:45px;cursor:pointer}.fslightbox-toolbar-button:hover .fslightbox-svg-path{fill:#fff}.fslightbox-slide-btn-container{display:flex;align-items:center;padding:12px 12px 12px 6px;position:absolute;top:50%;cursor:pointer;z-index:3;transform:translateY(-50%)}@media (min-width:476px){.fslightbox-slide-btn-container{padding:22px 22px 22px 6px}}@media (min-width:768px){.fslightbox-slide-btn-container{padding:30px 30px 30px 6px}}.fslightbox-slide-btn-container:hover .fslightbox-svg-path{fill:#f1f1f1}.fslightbox-slide-btn{padding:9px;font-size:26px;background:rgba(35,35,35,.65)}@media (min-width:768px){.fslightbox-slide-btn{padding:10px}}@media (min-width:1600px){.fslightbox-slide-btn{padding:11px}}.fslightbox-slide-btn-container-previous{left:0}@media (max-width:475.99px){.fslightbox-slide-btn-container-previous{padding-left:3px}}.fslightbox-slide-btn-container-next{right:0;padding-left:12px;padding-right:3px}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-left:22px}}@media (min-width:768px){.fslightbox-slide-btn-container-next{padding-left:30px}}@media (min-width:476px){.fslightbox-slide-btn-container-next{padding-right:6px}}.fslightbox-down-event-detector{position:absolute;z-index:1}.fslightbox-slide-swiping-hoverer{z-index:4}.fslightbox-invalid-file-wrapper{font-size:22px;color:#eaebeb;margin:auto}.fslightbox-video{object-fit:cover}.fslightbox-youtube-iframe{border:0}.fslightboxl{display:block;margin:auto;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:67px;height:67px}.fslightboxl div{box-sizing:border-box;display:block;position:absolute;width:54px;height:54px;margin:6px;border:5px solid;border-color:#999 transparent transparent transparent;border-radius:50%;animation:fslightboxl 1.2s cubic-bezier(.5,0,.5,1) infinite}.fslightboxl div:nth-child(1){animation-delay:-.45s}.fslightboxl div:nth-child(2){animation-delay:-.3s}.fslightboxl div:nth-child(3){animation-delay:-.15s}@keyframes fslightboxl{0%{transform:rotate(0)}100%{transform:rotate(360deg)}}.fslightbox-source{position:relative;z-index:2;opacity:0}")),document.head.appendChild(o));function L(e){var t,n=e.props,o=0,i={};this.getSourceTypeFromLocalStorageByUrl=function(e){return t[e]?t[e]:r(e)},this.handleReceivedSourceTypeForUrl=function(e,n){if(!1===i[n]&&(o--,"invalid"!==e?i[n]=e:delete i[n],0===o)){!function(e,t){for(var n in t)e[n]=t[n]}(t,i);try{localStorage.setItem("fslightbox-types",JSON.stringify(t))}catch(e){}}};var r=function(e){o++,i[e]=!1};if(n.disableLocalStorage)this.getSourceTypeFromLocalStorageByUrl=function(){},this.handleReceivedSourceTypeForUrl=function(){};else{try{t=JSON.parse(localStorage.getItem("fslightbox-types"))}catch(e){}t||(t={},this.getSourceTypeFromLocalStorageByUrl=r)}}function A(e,t,n,o){var i=e.data,r=e.elements.sources,s=n/o,a=0;this.adjustSize=function(){if((a=i.maxSourceWidth/s)<i.maxSourceHeight)return n<i.maxSourceWidth&&(a=o),c();a=o>i.maxSourceHeight?i.maxSourceHeight:o,c()};var c=function(){r[t].style.width=a*s+"px",r[t].style.height=a+"px"}}function C(e,t){var n=this,o=e.collections.sourceSizers,i=e.elements,r=i.sourceAnimationWrappers,s=i.sources,a=e.isl,c=e.resolve;function l(e,n){o[t]=c(A,[t,e,n]),o[t].adjustSize()}this.runActions=function(e,o){a[t]=!0,s[t].classList.add(x),r[t].classList.add(g),r[t].removeChild(r[t].firstChild),l(e,o),n.runActions=l}}function E(e,t){var n,o=this,i=e.elements.sources,r=e.props,s=(0,e.resolve)(C,[t]);this.handleImageLoad=function(e){var t=e.target,n=t.naturalWidth,o=t.naturalHeight;s.runActions(n,o)},this.handleVideoLoad=function(e){var t=e.target,o=t.videoWidth,i=t.videoHeight;n=!0,s.runActions(o,i)},this.handleNotMetaDatedVideoLoad=function(){n||o.handleYoutubeLoad()},this.handleYoutubeLoad=function(){var e=1920,t=1080;r.maxYoutubeDimensions&&(e=r.maxYoutubeDimensions.width,t=r.maxYoutubeDimensions.height),s.runActions(e,t)},this.handleCustomLoad=function(){var e=i[t],n=e.offsetWidth,r=e.offsetHeight;n&&r?s.runActions(n,r):setTimeout(o.handleCustomLoad)}}function F(e,t,n){var o=e.elements.sources,i=e.props.customClasses,r=i[t]?i[t]:"";o[t].className=n+" "+r}function I(e,t){var n=e.elements.sources,o=e.props.customAttributes;for(var i in o[t])n[t].setAttribute(i,o[t][i])}function T(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props.sources;i[t]=document.createElement("img"),F(e,t,y),i[t].src=s[t],i[t].onload=n[t].handleImageLoad,I(e,t),r[t].appendChild(i[t])}function N(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props,a=s.sources,c=s.videosPosters;i[t]=document.createElement("video"),F(e,t,y),i[t].src=a[t],i[t].onloadedmetadata=function(e){n[t].handleVideoLoad(e)},i[t].controls=!0,I(e,t),c[t]&&(i[t].poster=c[t]);var l=document.createElement("source");l.src=a[t],i[t].appendChild(l),setTimeout(n[t].handleNotMetaDatedVideoLoad,3e3),r[t].appendChild(i[t])}function z(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,r=o.sources,s=o.sourceAnimationWrappers,a=e.props.sources;r[t]=document.createElement("iframe"),F(e,t,"".concat(y," ").concat(i,"youtube-iframe"));var c=a[t],l=c.split("?")[1];r[t].src="https://www.youtube.com/embed/".concat(c.match(/^.*(youtu.be\/|v\/|u\/\w\/|embed\/|watch\?v=|\&v=)([^#\&\?]*).*/)[2],"?").concat(l||""),r[t].allowFullscreen=!0,I(e,t),s[t].appendChild(r[t]),n[t].handleYoutubeLoad()}function P(e,t){var n=e.collections.sourceLoadHandlers,o=e.elements,i=o.sources,r=o.sourceAnimationWrappers,s=e.props.sources;i[t]=s[t],F(e,t,"".concat(i[t].className," ").concat(y)),r[t].appendChild(i[t]),n[t].handleCustomLoad()}function k(e,t){var n=e.elements,o=n.sources,r=n.sourceAnimationWrappers;e.props.sources;o[t]=document.createElement("div"),o[t].className="".concat(i,"invalid-file-wrapper ").concat(c),o[t].innerHTML="Invalid source",r[t].classList.add(g),r[t].removeChild(r[t].firstChild),r[t].appendChild(o[t])}function H(e){var t=e.collections,n=t.sourceLoadHandlers,o=t.sourcesRenderFunctions,i=e.core.sourceDisplayFacade,r=e.resolve;this.runActionsForSourceTypeAndIndex=function(t,s){var a;switch("invalid"!==t&&(n[s]=r(E,[s])),t){case"image":a=T;break;case"video":a=N;break;case"youtube":a=z;break;case"custom":a=P;break;default:a=k}o[s]=function(){return a(e,s)},i.displaySourcesWhichShouldBeDisplayed()}}function W(){var e,t,n,o={isUrlYoutubeOne:function(e){var t=document.createElement("a");return t.href=e,"www.youtube.com"===t.hostname||"youtu.be"===t.hostname},getTypeFromResponseContentType:function(e){return e.slice(0,e.indexOf("/"))}};function i(){if(4!==n.readyState){if(2===n.readyState){var e;switch(o.getTypeFromResponseContentType(n.getResponseHeader("content-type"))){case"image":e="image";break;case"video":e="video";break;default:e="invalid"}n.onreadystatechange=null,n.abort(),t(e)}}else t("invalid")}this.setUrlToCheck=function(t){e=t},this.getSourceType=function(r){if(o.isUrlYoutubeOne(e))return r("youtube");t=r,(n=new XMLHttpRequest).onreadystatechange=i,n.open("GET",e,!0),n.send()}}function R(e,t,n){var o=e.props,i=o.types,r=o.type,s=o.sources,a=e.resolve;this.getTypeSetByClientForIndex=function(e){var t;return i&&i[e]?t=i[e]:r&&(t=r),t},this.retrieveTypeWithXhrForIndex=function(e){var o=a(W);o.setUrlToCheck(s[e]),o.getSourceType((function(o){t.handleReceivedSourceTypeForUrl(o,s[e]),n.runActionsForSourceTypeAndIndex(o,e)}))}}function D(e,t){var n=e.core.stageManager,o=e.elements,i=o.smw,r=o.sourceWrappersContainer,s=e.props,l=0,f=document.createElement("div");function p(e){f.style.transform="translateX(".concat(e+l,"px)"),l=0}function h(){return(1+s.slideDistance)*innerWidth}f.className="".concat(d," ").concat(a," ").concat(c),f.s=function(){f.style.display="flex"},f.h=function(){f.style.display="none"},f.a=function(){f.classList.add(u)},f.d=function(){f.classList.remove(u)},f.n=function(){f.style.removeProperty("transform")},f.v=function(e){return l=e,f},f.ne=function(){p(-h())},f.z=function(){p(0)},f.p=function(){p(h())},n.i(t)||f.h(),i[t]=f,r.appendChild(f),function(e,t){var n=e.elements,o=n.smw,i=n.sourceAnimationWrappers,r=document.createElement("div"),s=document.createElement("div");s.className="fslightboxl";for(var a=0;a<3;a++){var c=document.createElement("div");s.appendChild(c)}r.appendChild(s),o[t].appendChild(r),i[t]=r}(e,t)}function O(e,t,n,o){var r=document.createElementNS("http://www.w3.org/2000/svg","svg");r.setAttributeNS(null,"width",t),r.setAttributeNS(null,"height",t),r.setAttributeNS(null,"viewBox",n);var s=document.createElementNS("http://www.w3.org/2000/svg","path");return s.setAttributeNS(null,"class","".concat(i,"svg-path")),s.setAttributeNS(null,"d",o),r.appendChild(s),e.appendChild(r),r}function M(e,t){var n=document.createElement("div");return n.className="".concat(i,"toolbar-button ").concat(c),n.title=t,e.appendChild(n),n}function j(e,t){var n=document.createElement("div");n.className="".concat(i,"toolbar"),t.appendChild(n),function(e,t){var n=e.componentsServices,o=e.data,i=e.fs,r="M4.5 11H3v4h4v-1.5H4.5V11zM3 7h1.5V4.5H7V3H3v4zm10.5 6.5H11V15h4v-4h-1.5v2.5zM11 3v1.5h2.5V7H15V3h-4z",s=M(t);s.title="Enter fullscreen";var a=O(s,"20px","0 0 18 18",r);n.ofs=function(){o.ifs=!0,s.title="Exit fullscreen",a.setAttributeNS(null,"width","24px"),a.setAttributeNS(null,"height","24px"),a.setAttributeNS(null,"viewBox","0 0 950 1024"),a.firstChild.setAttributeNS(null,"d","M682 342h128v84h-212v-212h84v128zM598 810v-212h212v84h-128v128h-84zM342 342v-128h84v212h-212v-84h128zM214 682v-84h212v212h-84v-128h-128z")},n.xfs=function(){o.ifs=!1,s.title="Enter fullscreen",a.setAttributeNS(null,"width","20px"),a.setAttributeNS(null,"height","20px"),a.setAttributeNS(null,"viewBox","0 0 18 18"),a.firstChild.setAttributeNS(null,"d",r)},s.onclick=i.t}(e,n),function(e,t){var n=M(t,"Close");n.onclick=e.core.lightboxCloser.closeLightbox,O(n,"20px","0 0 24 24","M 4.7070312 3.2929688 L 3.2929688 4.7070312 L 10.585938 12 L 3.2929688 19.292969 L 4.7070312 20.707031 L 12 13.414062 L 19.292969 20.707031 L 20.707031 19.292969 L 13.414062 12 L 20.707031 4.7070312 L 19.292969 3.2929688 L 12 10.585938 L 4.7070312 3.2929688 z")}(e,n)}function X(e){var t=e.props.sources,n=e.elements.container,o=document.createElement("div");o.className="".concat(i,"nav"),n.appendChild(o),j(e,o),t.length>1&&function(e,t){var n=e.componentsServices,o=e.props.sources,r=(e.stageIndexes,document.createElement("div"));r.className="".concat(i,"slide-number-container");var s=document.createElement("div");s.className=c;var a=document.createElement("span");n.setSlideNumber=function(e){return a.innerHTML=e};var l=document.createElement("span");l.className="".concat(i,"slash");var u=document.createElement("div");u.innerHTML=o.length,r.appendChild(s),s.appendChild(a),s.appendChild(l),s.appendChild(u),t.appendChild(r),setTimeout((function(){s.offsetWidth>55&&(r.style.justifyContent="flex-start")}))}(e,o)}function B(e,t,n,o){var i=e.elements.container,r=n.charAt(0).toUpperCase()+n.slice(1),s=document.createElement("div");s.className="".concat(p," ").concat(p,"-").concat(n),s.title="".concat(r," slide"),s.onclick=t,function(e,t){var n=document.createElement("div");n.className="".concat(f," ").concat(c),O(n,"20px","0 0 20 20",t),e.appendChild(n)}(s,o),i.appendChild(s)}function U(e){var t=e.core,n=t.lightboxCloser,o=t.slideChangeFacade,i=e.fs;this.listener=function(e){switch(e.key){case"Escape":n.closeLightbox();break;case"ArrowLeft":o.changeToPrevious();break;case"ArrowRight":o.changeToNext();break;case"F11":e.preventDefault(),i.t()}}}function q(e){var t=e.elements,n=e.sourcePointerProps,o=e.stageIndexes;function i(e,o){t.smw[e].v(n.swipedX)[o]()}this.runActionsForEvent=function(e){var r,a,c;t.container.contains(t.slideSwipingHoverer)||t.container.appendChild(t.slideSwipingHoverer),r=t.container,a=s,(c=r.classList).contains(a)||c.add(a),n.swipedX=e.screenX-n.downScreenX;var l=o.previous,u=o.next;i(o.current,"z"),void 0!==l&&n.swipedX>0?i(l,"ne"):void 0!==u&&n.swipedX<0&&i(u,"p")}}function V(e){var t=e.props.sources,n=e.resolve,o=e.sourcePointerProps,i=n(q);1===t.length?this.listener=function(){o.swipedX=1}:this.listener=function(e){o.isPointering&&i.runActionsForEvent(e)}}function _(e){var t=e.core.slideIndexChanger,n=e.elements.smw,o=e.stageIndexes,i=e.sws;function r(e){var t=n[o.current];t.a(),t[e]()}function s(e,t){void 0!==e&&(n[e].s(),n[e][t]())}this.runPositiveSwipedXActions=function(){var e=o.previous;if(void 0===e)r("z");else{r("p");var n=o.next;t.changeTo(e);var a=o.previous;i.d(a),i.b(n),r("z"),s(a,"ne")}},this.runNegativeSwipedXActions=function(){var e=o.next;if(void 0===e)r("z");else{r("ne");var n=o.previous;t.changeTo(e);var a=o.next;i.d(a),i.b(n),r("z"),s(a,"p")}}}function Y(e,t){e.contains(t)&&e.removeChild(t)}function J(e){var t=e.core.lightboxCloser,n=e.elements,o=e.resolve,i=e.sourcePointerProps,r=o(_);this.runNoSwipeActions=function(){Y(n.container,n.slideSwipingHoverer),i.isSourceDownEventTarget||t.closeLightbox(),i.isPointering=!1},this.runActions=function(){i.swipedX>0?r.runPositiveSwipedXActions():r.runNegativeSwipedXActions(),Y(n.container,n.slideSwipingHoverer),n.container.classList.remove(s),i.isPointering=!1}}function G(e){var t=e.resolve,n=e.sourcePointerProps,o=t(J);this.listener=function(){n.isPointering&&(n.swipedX?o.runActions():o.runNoSwipeActions())}}function $(e){var t=this,n=e.core,o=n.eventsDispatcher,i=n.globalEventsController,r=n.scrollbarRecompensor,s=e.data,a=e.elements,c=e.fs,u=e.props,d=e.sourcePointerProps;this.isLightboxFadingOut=!1,this.runActions=function(){t.isLightboxFadingOut=!0,a.container.classList.add(v),i.removeListeners(),u.exitFullscreenOnClose&&s.ifs&&c.x(),setTimeout((function(){t.isLightboxFadingOut=!1,d.isPointering=!1,a.container.classList.remove(v),document.documentElement.classList.remove(l),r.removeRecompense(),document.body.removeChild(a.container),o.dispatch("onClose")}),270)}}function K(e,t){var n=e.classList;n.contains(t)&&n.remove(t)}function Q(e){var t,n,o;n=(t=e).core.eventsDispatcher,o=t.props,n.dispatch=function(e){o[e]&&o[e]()},function(e){var t=e.componentsServices,n=e.data,o=e.fs,i=["fullscreenchange","webkitfullscreenchange","mozfullscreenchange","MSFullscreenChange"];function r(e){for(var t=0;t<i.length;t++)document[e](i[t],s)}function s(){document.fullscreenElement||document.webkitIsFullScreen||document.mozFullScreen||document.msFullscreenElement?t.ofs():t.xfs()}o.o=function(){t.ofs();var e=document.documentElement;e.requestFullscreen?e.requestFullscreen():e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullscreen?e.webkitRequestFullscreen():e.msRequestFullscreen&&e.msRequestFullscreen()},o.x=function(){t.xfs(),document.exitFullscreen?document.exitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.msExitFullscreen&&document.msExitFullscreen()},o.t=function(){n.ifs?o.x():o.o()},o.l=function(){r("addEventListener")},o.q=function(){r("removeEventListener")}}(e),function(e){var t=e.core,n=t.globalEventsController,o=t.windowResizeActioner,i=e.fs,r=e.resolve,s=r(U),a=r(V),c=r(G);n.attachListeners=function(){document.addEventListener("pointermove",a.listener),document.addEventListener("pointerup",c.listener),addEventListener("resize",o.runActions),document.addEventListener("keydown",s.listener),i.l()},n.removeListeners=function(){document.removeEventListener("pointermove",a.listener),document.removeEventListener("pointerup",c.listener),removeEventListener("resize",o.runActions),document.removeEventListener("keydown",s.listener),i.q()}}(e),function(e){var t=e.core.lightboxCloser,n=(0,e.resolve)($);t.closeLightbox=function(){n.isLightboxFadingOut||n.runActions()}}(e),function(e){var t=e.data,n=e.core.scrollbarRecompensor;function o(){document.body.offsetHeight>innerHeight&&(document.body.style.marginRight=t.scrollbarWidth+"px")}n.addRecompense=function(){"complete"===document.readyState?o():addEventListener("load",(function(){o(),n.addRecompense=o}))},n.removeRecompense=function(){document.body.style.removeProperty("margin-right")}}(e),function(e){var t=e.core,n=t.slideChangeFacade,o=t.slideIndexChanger,i=t.stageManager;e.props.sources.length>1?(n.changeToPrevious=function(){o.jumpTo(i.getPreviousSlideIndex())},n.changeToNext=function(){o.jumpTo(i.getNextSlideIndex())}):(n.changeToPrevious=function(){},n.changeToNext=function(){})}(e),function(e){var t=e.componentsServices,n=e.core,o=n.slideIndexChanger,i=n.sourceDisplayFacade,r=n.stageManager,s=e.elements,a=s.smw,c=s.sourceAnimationWrappers,l=e.isl,u=e.stageIndexes,d=e.sws;o.changeTo=function(e){u.current=e,r.updateStageIndexes(),t.setSlideNumber(e+1),i.displaySourcesWhichShouldBeDisplayed()},o.jumpTo=function(e){var t=u.previous,n=u.current,i=u.next,s=l[n],f=l[e];o.changeTo(e);for(var p=0;p<a.length;p++)a[p].d();d.d(n),d.c(),requestAnimationFrame((function(){requestAnimationFrame((function(){var e=u.previous,o=u.next;function p(){r.i(n)?n===u.previous?a[n].ne():n===u.next&&a[n].p():(a[n].h(),a[n].n())}s&&c[n].classList.add(m),f&&c[u.current].classList.add(h),d.a(),void 0!==e&&e!==n&&a[e].ne(),a[u.current].n(),void 0!==o&&o!==n&&a[o].p(),d.b(t),d.b(i),l[n]?setTimeout(p,260):p()}))}))}}(e),function(e){var t=e.core.sourcesPointerDown,n=e.elements,o=n.smw,i=n.sources,r=e.sourcePointerProps,s=e.stageIndexes;t.listener=function(e){"VIDEO"!==e.target.tagName&&e.preventDefault(),r.isPointering=!0,r.downScreenX=e.screenX,r.swipedX=0;var t=i[s.current];t&&t.contains(e.target)?r.isSourceDownEventTarget=!0:r.isSourceDownEventTarget=!1;for(var n=0;n<o.length;n++)o[n].d()}}(e),function(e){var t=e.collections.sourcesRenderFunctions,n=e.core.sourceDisplayFacade,o=e.props,i=e.stageIndexes;function r(e){t[e]&&(t[e](),delete t[e])}n.displaySourcesWhichShouldBeDisplayed=function(){if(o.loadOnlyCurrentSource)r(i.current);else for(var e in i)r(i[e])}}(e),function(e){var t=e.core.stageManager,n=e.elements,o=n.smw,i=n.sourceAnimationWrappers,r=e.isl,s=e.stageIndexes,a=e.sws;a.a=function(){for(var e in s)o[s[e]].s()},a.b=function(e){void 0===e||t.i(e)||(o[e].h(),o[e].n())},a.c=function(){for(var e in s)a.d(s[e])},a.d=function(e){if(r[e]){var t=i[e];K(t,g),K(t,h),K(t,m)}}}(e),function(e){var t=e.collections.sourceSizers,n=e.core.windowResizeActioner,o=e.data,i=e.elements.smw,r=e.stageIndexes;n.runActions=function(){innerWidth<992?o.maxSourceWidth=innerWidth:o.maxSourceWidth=.9*innerWidth,o.maxSourceHeight=.9*innerHeight;for(var e=0;e<i.length;e++)i[e].d(),t[e]&&t[e].adjustSize();var n=r.previous,s=r.next;void 0!==n&&i[n].ne(),void 0!==s&&i[s].p()}}(e)}function Z(e){var t=e.componentsServices,n=e.core,o=n.eventsDispatcher,r=n.globalEventsController,s=n.scrollbarRecompensor,c=n.sourceDisplayFacade,u=n.stageManager,f=n.windowResizeActioner,p=e.data,h=e.elements,m=(e.props,e.stageIndexes),v=e.sws;function b(){var t,n;p.i=!0,p.scrollbarWidth=function(){var e=document.createElement("div"),t=e.style,n=document.createElement("div");t.visibility="hidden",t.width="100px",t.msOverflowStyle="scrollbar",t.overflow="scroll",n.style.width="100%",document.body.appendChild(e);var o=e.offsetWidth;e.appendChild(n);var i=n.offsetWidth;return document.body.removeChild(e),o-i}(),Q(e),h.container=document.createElement("div"),h.container.className="".concat(i,"container ").concat(a," ").concat(g),function(e){var t=e.elements;t.slideSwipingHoverer=document.createElement("div"),t.slideSwipingHoverer.className="".concat(i,"slide-swiping-hoverer ").concat(a," ").concat(d)}(e),X(e),function(e){var t=e.core.sourcesPointerDown,n=e.elements,o=e.props.sources,i=document.createElement("div");i.className="".concat(d," ").concat(a),n.container.appendChild(i),i.addEventListener("pointerdown",t.listener),n.sourceWrappersContainer=i;for(var r=0;r<o.length;r++)D(e,r)}(e),e.props.sources.length>1&&(n=(t=e).core.slideChangeFacade,B(t,n.changeToPrevious,"previous","M18.271,9.212H3.615l4.184-4.184c0.306-0.306,0.306-0.801,0-1.107c-0.306-0.306-0.801-0.306-1.107,0L1.21,9.403C1.194,9.417,1.174,9.421,1.158,9.437c-0.181,0.181-0.242,0.425-0.209,0.66c0.005,0.038,0.012,0.071,0.022,0.109c0.028,0.098,0.075,0.188,0.142,0.271c0.021,0.026,0.021,0.061,0.045,0.085c0.015,0.016,0.034,0.02,0.05,0.033l5.484,5.483c0.306,0.307,0.801,0.307,1.107,0c0.306-0.305,0.306-0.801,0-1.105l-4.184-4.185h14.656c0.436,0,0.788-0.353,0.788-0.788S18.707,9.212,18.271,9.212z"),B(t,n.changeToNext,"next","M1.729,9.212h14.656l-4.184-4.184c-0.307-0.306-0.307-0.801,0-1.107c0.305-0.306,0.801-0.306,1.106,0l5.481,5.482c0.018,0.014,0.037,0.019,0.053,0.034c0.181,0.181,0.242,0.425,0.209,0.66c-0.004,0.038-0.012,0.071-0.021,0.109c-0.028,0.098-0.075,0.188-0.143,0.271c-0.021,0.026-0.021,0.061-0.045,0.085c-0.015,0.016-0.034,0.02-0.051,0.033l-5.483,5.483c-0.306,0.307-0.802,0.307-1.106,0c-0.307-0.305-0.307-0.801,0-1.105l4.184-4.185H1.729c-0.436,0-0.788-0.353-0.788-0.788S1.293,9.212,1.729,9.212z")),function(e){for(var t=e.props.sources,n=e.resolve,o=n(L),i=n(H),r=n(R,[o,i]),s=0;s<t.length;s++)if("string"==typeof t[s]){var a=r.getTypeSetByClientForIndex(s);if(a)i.runActionsForSourceTypeAndIndex(a,s);else{var c=o.getSourceTypeFromLocalStorageByUrl(t[s]);c?i.runActionsForSourceTypeAndIndex(c,s):r.retrieveTypeWithXhrForIndex(s)}}else i.runActionsForSourceTypeAndIndex("custom",s)}(e),o.dispatch("onInit")}e.open=function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,i=m.previous,a=m.current,d=m.next;m.current=n,p.i||S(e),u.updateStageIndexes(),p.i?(v.c(),v.a(),v.b(i),v.b(a),v.b(d),o.dispatch("onShow")):b(),c.displaySourcesWhichShouldBeDisplayed(),t.setSlideNumber(n+1),document.body.appendChild(h.container),document.documentElement.classList.add(l),s.addRecompense(),r.attachListeners(),f.runActions(),h.smw[m.current].n(),o.dispatch("onOpen")}}function ee(e,t,n){return(ee=te()?Reflect.construct.bind():function(e,t,n){var o=[null];o.push.apply(o,t);var i=new(Function.bind.apply(e,o));return n&&ne(i,n.prototype),i}).apply(null,arguments)}function te(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function ne(e,t){return(ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function oe(e){return function(e){if(Array.isArray(e))return ie(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(!e)return;if("string"==typeof e)return ie(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ie(e,t)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ie(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function re(){for(var e=document.getElementsByTagName("a"),t=function(t){if(!e[t].hasAttribute("data-fslightbox"))return"continue";var n=e[t].hasAttribute("data-href")?e[t].getAttribute("data-href"):e[t].getAttribute("href");if(!n)return console.warn('The "data-fslightbox" attribute was set without the "href" attribute.'),"continue";var o=e[t].getAttribute("data-fslightbox");fsLightboxInstances[o]||(fsLightboxInstances[o]=new FsLightbox);var i=null;"#"===n.charAt(0)?(i=document.getElementById(n.substring(1)).cloneNode(!0)).removeAttribute("id"):i=n,fsLightboxInstances[o].props.sources.push(i),fsLightboxInstances[o].elements.a.push(e[t]);var r=fsLightboxInstances[o].props.sources.length-1;e[t].onclick=function(e){e.preventDefault(),fsLightboxInstances[o].open(r)},d("types","data-type"),d("videosPosters","data-video-poster"),d("customClasses","data-class"),d("customClasses","data-custom-class");for(var s=["href","data-fslightbox","data-href","data-type","data-video-poster","data-class","data-custom-class"],a=e[t].attributes,c=fsLightboxInstances[o].props.customAttributes,l=0;l<a.length;l++)if(-1===s.indexOf(a[l].name)&&"data-"===a[l].name.substr(0,5)){c[r]||(c[r]={});var u=a[l].name.substr(5);c[r][u]=a[l].value}function d(n,i){e[t].hasAttribute(i)&&(fsLightboxInstances[o].props[n][r]=e[t].getAttribute(i))}},n=0;n<e.length;n++)t(n);var o=Object.keys(fsLightboxInstances);window.fsLightbox=fsLightboxInstances[o[o.length-1]]}window.FsLightbox=function(){var e=this;this.props={sources:[],customAttributes:[],customClasses:[],types:[],videosPosters:[],slideDistance:.3},this.data={isFullscreenOpen:!1,maxSourceWidth:0,maxSourceHeight:0,scrollbarWidth:0},this.isl=[],this.sourcePointerProps={downScreenX:null,isPointering:!1,isSourceDownEventTarget:!1,swipedX:0},this.stageIndexes={},this.elements={a:[],container:null,slideSwipingHoverer:null,smw:[],sourceWrappersContainer:null,sources:[],sourceAnimationWrappers:[]},this.componentsServices={setSlideNumber:function(){}},this.resolve=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return n.unshift(e),ee(t,oe(n))},this.collections={sourceLoadHandlers:[],sourcesRenderFunctions:[],sourceSizers:[]},this.core={eventsDispatcher:{},globalEventsController:{},lightboxCloser:{},lightboxUpdater:{},scrollbarRecompensor:{},slideChangeFacade:{},slideIndexChanger:{},sourcesPointerDown:{},sourceDisplayFacade:{},stageManager:{},windowResizeActioner:{}},this.fs={},this.sws={},Z(this),this.close=function(){return e.core.lightboxCloser.closeLightbox()}},window.fsLightboxInstances={},re(),window.refreshFsLightbox=function(){for(var e in fsLightboxInstances){var t=fsLightboxInstances[e].props;fsLightboxInstances[e]=new FsLightbox,fsLightboxInstances[e].props=t,fsLightboxInstances[e].props.sources=[],fsLightboxInstances[e].elements.a=[]}re()}}])})); /***/ }), /***/ "./node_modules/get-size/get-size.js": /*!*******************************************!*\ !*** ./node_modules/get-size/get-size.js ***! \*******************************************/ /***/ ((module, exports, __webpack_require__) => { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * getSize v2.0.3 * measure size of elements * MIT license */ /* jshint browser: true, strict: true, undef: true, unused: true */ /* globals console: false */ ( function( window, factory ) { /* jshint strict: false */ /* globals define, module */ if ( true ) { // AMD !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} })( window, function factory() { 'use strict'; // -------------------------- helpers -------------------------- // // get a number from a string, not a percentage function getStyleSize( value ) { var num = parseFloat( value ); // not a percent like '100%', and a number var isValid = value.indexOf('%') == -1 && !isNaN( num ); return isValid && num; } function noop() {} var logError = typeof console == 'undefined' ? noop : function( message ) { console.error( message ); }; // -------------------------- measurements -------------------------- // var measurements = [ 'paddingLeft', 'paddingRight', 'paddingTop', 'paddingBottom', 'marginLeft', 'marginRight', 'marginTop', 'marginBottom', 'borderLeftWidth', 'borderRightWidth', 'borderTopWidth', 'borderBottomWidth' ]; var measurementsLength = measurements.length; function getZeroSize() { var size = { width: 0, height: 0, innerWidth: 0, innerHeight: 0, outerWidth: 0, outerHeight: 0 }; for ( var i=0; i < measurementsLength; i++ ) { var measurement = measurements[i]; size[ measurement ] = 0; } return size; } // -------------------------- getStyle -------------------------- // /** * getStyle, get style of element, check for Firefox bug * https://bugzilla.mozilla.org/show_bug.cgi?id=548397 */ function getStyle( elem ) { var style = getComputedStyle( elem ); if ( !style ) { logError( 'Style returned ' + style + '. Are you running this code in a hidden iframe on Firefox? ' + 'See https://bit.ly/getsizebug1' ); } return style; } // -------------------------- setup -------------------------- // var isSetup = false; var isBoxSizeOuter; /** * setup * check isBoxSizerOuter * do on first getSize() rather than on page load for Firefox bug */ function setup() { // setup once if ( isSetup ) { return; } isSetup = true; // -------------------------- box sizing -------------------------- // /** * Chrome & Safari measure the outer-width on style.width on border-box elems * IE11 & Firefox<29 measures the inner-width */ var div = document.createElement('div'); div.style.width = '200px'; div.style.padding = '1px 2px 3px 4px'; div.style.borderStyle = 'solid'; div.style.borderWidth = '1px 2px 3px 4px'; div.style.boxSizing = 'border-box'; var body = document.body || document.documentElement; body.appendChild( div ); var style = getStyle( div ); // round value for browser zoom. desandro/masonry#928 isBoxSizeOuter = Math.round( getStyleSize( style.width ) ) == 200; getSize.isBoxSizeOuter = isBoxSizeOuter; body.removeChild( div ); } // -------------------------- getSize -------------------------- // function getSize( elem ) { setup(); // use querySeletor if elem is string if ( typeof elem == 'string' ) { elem = document.querySelector( elem ); } // do not proceed on non-objects if ( !elem || typeof elem != 'object' || !elem.nodeType ) { return; } var style = getStyle( elem ); // if hidden, everything is 0 if ( style.display == 'none' ) { return getZeroSize(); } var size = {}; size.width = elem.offsetWidth; size.height = elem.offsetHeight; var isBorderBox = size.isBorderBox = style.boxSizing == 'border-box'; // get all measurements for ( var i=0; i < measurementsLength; i++ ) { var measurement = measurements[i]; var value = style[ measurement ]; var num = parseFloat( value ); // any 'auto', 'medium' value will be 0 size[ measurement ] = !isNaN( num ) ? num : 0; } var paddingWidth = size.paddingLeft + size.paddingRight; var paddingHeight = size.paddingTop + size.paddingBottom; var marginWidth = size.marginLeft + size.marginRight; var marginHeight = size.marginTop + size.marginBottom; var borderWidth = size.borderLeftWidth + size.borderRightWidth; var borderHeight = size.borderTopWidth + size.borderBottomWidth; var isBorderBoxSizeOuter = isBorderBox && isBoxSizeOuter; // overwrite width and height if we can get it from style var styleWidth = getStyleSize( style.width ); if ( styleWidth !== false ) { size.width = styleWidth + // add padding and border unless it's already including it ( isBorderBoxSizeOuter ? 0 : paddingWidth + borderWidth ); } var styleHeight = getStyleSize( style.height ); if ( styleHeight !== false ) { size.height = styleHeight + // add padding and border unless it's already including it ( isBorderBoxSizeOuter ? 0 : paddingHeight + borderHeight ); } size.innerWidth = size.width - ( paddingWidth + borderWidth ); size.innerHeight = size.height - ( paddingHeight + borderHeight ); size.outerWidth = size.width + marginWidth; size.outerHeight = size.height + marginHeight; return size; } return getSize; }); /***/ }), /***/ "./node_modules/html-to-image/es/apply-style.js": /*!******************************************************!*\ !*** ./node_modules/html-to-image/es/apply-style.js ***! \******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ applyStyle: () => (/* binding */ applyStyle) /* harmony export */ }); function applyStyle(node, options) { const { style } = node; if (options.backgroundColor) { style.backgroundColor = options.backgroundColor; } if (options.width) { style.width = `${options.width}px`; } if (options.height) { style.height = `${options.height}px`; } const manual = options.style; if (manual != null) { Object.keys(manual).forEach((key) => { style[key] = manual[key]; }); } return node; } //# sourceMappingURL=apply-style.js.map /***/ }), /***/ "./node_modules/html-to-image/es/clone-node.js": /*!*****************************************************!*\ !*** ./node_modules/html-to-image/es/clone-node.js ***! \*****************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ cloneNode: () => (/* binding */ cloneNode) /* harmony export */ }); /* harmony import */ var _clone_pseudos__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clone-pseudos */ "./node_modules/html-to-image/es/clone-pseudos.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ "./node_modules/html-to-image/es/util.js"); /* harmony import */ var _mimes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./mimes */ "./node_modules/html-to-image/es/mimes.js"); /* harmony import */ var _dataurl__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./dataurl */ "./node_modules/html-to-image/es/dataurl.js"); async function cloneCanvasElement(canvas) { const dataURL = canvas.toDataURL(); if (dataURL === 'data:,') { return canvas.cloneNode(false); } return (0,_util__WEBPACK_IMPORTED_MODULE_1__.createImage)(dataURL); } async function cloneVideoElement(video, options) { if (video.currentSrc) { const canvas = document.createElement('canvas'); const ctx = canvas.getContext('2d'); canvas.width = video.clientWidth; canvas.height = video.clientHeight; ctx === null || ctx === void 0 ? void 0 : ctx.drawImage(video, 0, 0, canvas.width, canvas.height); const dataURL = canvas.toDataURL(); return (0,_util__WEBPACK_IMPORTED_MODULE_1__.createImage)(dataURL); } const poster = video.poster; const contentType = (0,_mimes__WEBPACK_IMPORTED_MODULE_2__.getMimeType)(poster); const dataURL = await (0,_dataurl__WEBPACK_IMPORTED_MODULE_3__.resourceToDataURL)(poster, contentType, options); return (0,_util__WEBPACK_IMPORTED_MODULE_1__.createImage)(dataURL); } async function cloneIFrameElement(iframe) { var _a; try { if ((_a = iframe === null || iframe === void 0 ? void 0 : iframe.contentDocument) === null || _a === void 0 ? void 0 : _a.body) { return (await cloneNode(iframe.contentDocument.body, {}, true)); } } catch (_b) { // Failed to clone iframe } return iframe.cloneNode(false); } async function cloneSingleNode(node, options) { if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(node, HTMLCanvasElement)) { return cloneCanvasElement(node); } if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(node, HTMLVideoElement)) { return cloneVideoElement(node, options); } if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(node, HTMLIFrameElement)) { return cloneIFrameElement(node); } return node.cloneNode(false); } const isSlotElement = (node) => node.tagName != null && node.tagName.toUpperCase() === 'SLOT'; async function cloneChildren(nativeNode, clonedNode, options) { var _a, _b; let children = []; if (isSlotElement(nativeNode) && nativeNode.assignedNodes) { children = (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(nativeNode.assignedNodes()); } else if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(nativeNode, HTMLIFrameElement) && ((_a = nativeNode.contentDocument) === null || _a === void 0 ? void 0 : _a.body)) { children = (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(nativeNode.contentDocument.body.childNodes); } else { children = (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(((_b = nativeNode.shadowRoot) !== null && _b !== void 0 ? _b : nativeNode).childNodes); } if (children.length === 0 || (0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(nativeNode, HTMLVideoElement)) { return clonedNode; } await children.reduce((deferred, child) => deferred .then(() => cloneNode(child, options)) .then((clonedChild) => { if (clonedChild) { clonedNode.appendChild(clonedChild); } }), Promise.resolve()); return clonedNode; } function cloneCSSStyle(nativeNode, clonedNode) { const targetStyle = clonedNode.style; if (!targetStyle) { return; } const sourceStyle = window.getComputedStyle(nativeNode); if (sourceStyle.cssText) { targetStyle.cssText = sourceStyle.cssText; targetStyle.transformOrigin = sourceStyle.transformOrigin; } else { (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(sourceStyle).forEach((name) => { let value = sourceStyle.getPropertyValue(name); if (name === 'font-size' && value.endsWith('px')) { const reducedFont = Math.floor(parseFloat(value.substring(0, value.length - 2))) - 0.1; value = `${reducedFont}px`; } if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(nativeNode, HTMLIFrameElement) && name === 'display' && value === 'inline') { value = 'block'; } if (name === 'd' && clonedNode.getAttribute('d')) { value = `path(${clonedNode.getAttribute('d')})`; } targetStyle.setProperty(name, value, sourceStyle.getPropertyPriority(name)); }); } } function cloneInputValue(nativeNode, clonedNode) { if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(nativeNode, HTMLTextAreaElement)) { clonedNode.innerHTML = nativeNode.value; } if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(nativeNode, HTMLInputElement)) { clonedNode.setAttribute('value', nativeNode.value); } } function cloneSelectValue(nativeNode, clonedNode) { if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(nativeNode, HTMLSelectElement)) { const clonedSelect = clonedNode; const selectedOption = Array.from(clonedSelect.children).find((child) => nativeNode.value === child.getAttribute('value')); if (selectedOption) { selectedOption.setAttribute('selected', ''); } } } function decorate(nativeNode, clonedNode) { if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(clonedNode, Element)) { cloneCSSStyle(nativeNode, clonedNode); (0,_clone_pseudos__WEBPACK_IMPORTED_MODULE_0__.clonePseudoElements)(nativeNode, clonedNode); cloneInputValue(nativeNode, clonedNode); cloneSelectValue(nativeNode, clonedNode); } return clonedNode; } async function ensureSVGSymbols(clone, options) { const uses = clone.querySelectorAll ? clone.querySelectorAll('use') : []; if (uses.length === 0) { return clone; } const processedDefs = {}; for (let i = 0; i < uses.length; i++) { const use = uses[i]; const id = use.getAttribute('xlink:href'); if (id) { const exist = clone.querySelector(id); const definition = document.querySelector(id); if (!exist && definition && !processedDefs[id]) { // eslint-disable-next-line no-await-in-loop processedDefs[id] = (await cloneNode(definition, options, true)); } } } const nodes = Object.values(processedDefs); if (nodes.length) { const ns = 'http://www.w3.org/1999/xhtml'; const svg = document.createElementNS(ns, 'svg'); svg.setAttribute('xmlns', ns); svg.style.position = 'absolute'; svg.style.width = '0'; svg.style.height = '0'; svg.style.overflow = 'hidden'; svg.style.display = 'none'; const defs = document.createElementNS(ns, 'defs'); svg.appendChild(defs); for (let i = 0; i < nodes.length; i++) { defs.appendChild(nodes[i]); } clone.appendChild(svg); } return clone; } async function cloneNode(node, options, isRoot) { if (!isRoot && options.filter && !options.filter(node)) { return null; } return Promise.resolve(node) .then((clonedNode) => cloneSingleNode(clonedNode, options)) .then((clonedNode) => cloneChildren(node, clonedNode, options)) .then((clonedNode) => decorate(node, clonedNode)) .then((clonedNode) => ensureSVGSymbols(clonedNode, options)); } //# sourceMappingURL=clone-node.js.map /***/ }), /***/ "./node_modules/html-to-image/es/clone-pseudos.js": /*!********************************************************!*\ !*** ./node_modules/html-to-image/es/clone-pseudos.js ***! \********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ clonePseudoElements: () => (/* binding */ clonePseudoElements) /* harmony export */ }); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/html-to-image/es/util.js"); function formatCSSText(style) { const content = style.getPropertyValue('content'); return `${style.cssText} content: '${content.replace(/'|"/g, '')}';`; } function formatCSSProperties(style) { return (0,_util__WEBPACK_IMPORTED_MODULE_0__.toArray)(style) .map((name) => { const value = style.getPropertyValue(name); const priority = style.getPropertyPriority(name); return `${name}: ${value}${priority ? ' !important' : ''};`; }) .join(' '); } function getPseudoElementStyle(className, pseudo, style) { const selector = `.${className}:${pseudo}`; const cssText = style.cssText ? formatCSSText(style) : formatCSSProperties(style); return document.createTextNode(`${selector}{${cssText}}`); } function clonePseudoElement(nativeNode, clonedNode, pseudo) { const style = window.getComputedStyle(nativeNode, pseudo); const content = style.getPropertyValue('content'); if (content === '' || content === 'none') { return; } const className = (0,_util__WEBPACK_IMPORTED_MODULE_0__.uuid)(); try { clonedNode.className = `${clonedNode.className} ${className}`; } catch (err) { return; } const styleElement = document.createElement('style'); styleElement.appendChild(getPseudoElementStyle(className, pseudo, style)); clonedNode.appendChild(styleElement); } function clonePseudoElements(nativeNode, clonedNode) { clonePseudoElement(nativeNode, clonedNode, ':before'); clonePseudoElement(nativeNode, clonedNode, ':after'); } //# sourceMappingURL=clone-pseudos.js.map /***/ }), /***/ "./node_modules/html-to-image/es/dataurl.js": /*!**************************************************!*\ !*** ./node_modules/html-to-image/es/dataurl.js ***! \**************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ fetchAsDataURL: () => (/* binding */ fetchAsDataURL), /* harmony export */ isDataUrl: () => (/* binding */ isDataUrl), /* harmony export */ makeDataUrl: () => (/* binding */ makeDataUrl), /* harmony export */ resourceToDataURL: () => (/* binding */ resourceToDataURL) /* harmony export */ }); function getContentFromDataUrl(dataURL) { return dataURL.split(/,/)[1]; } function isDataUrl(url) { return url.search(/^(data:)/) !== -1; } function makeDataUrl(content, mimeType) { return `data:${mimeType};base64,${content}`; } async function fetchAsDataURL(url, init, process) { const res = await fetch(url, init); if (res.status === 404) { throw new Error(`Resource "${res.url}" not found`); } const blob = await res.blob(); return new Promise((resolve, reject) => { const reader = new FileReader(); reader.onerror = reject; reader.onloadend = () => { try { resolve(process({ res, result: reader.result })); } catch (error) { reject(error); } }; reader.readAsDataURL(blob); }); } const cache = {}; function getCacheKey(url, contentType, includeQueryParams) { let key = url.replace(/\?.*/, ''); if (includeQueryParams) { key = url; } // font resource if (/ttf|otf|eot|woff2?/i.test(key)) { key = key.replace(/.*\//, ''); } return contentType ? `[${contentType}]${key}` : key; } async function resourceToDataURL(resourceUrl, contentType, options) { const cacheKey = getCacheKey(resourceUrl, contentType, options.includeQueryParams); if (cache[cacheKey] != null) { return cache[cacheKey]; } // ref: https://developer.mozilla.org/en/docs/Web/API/XMLHttpRequest/Using_XMLHttpRequest#Bypassing_the_cache if (options.cacheBust) { // eslint-disable-next-line no-param-reassign resourceUrl += (/\?/.test(resourceUrl) ? '&' : '?') + new Date().getTime(); } let dataURL; try { const content = await fetchAsDataURL(resourceUrl, options.fetchRequestInit, ({ res, result }) => { if (!contentType) { // eslint-disable-next-line no-param-reassign contentType = res.headers.get('Content-Type') || ''; } return getContentFromDataUrl(result); }); dataURL = makeDataUrl(content, contentType); } catch (error) { dataURL = options.imagePlaceholder || ''; let msg = `Failed to fetch resource: ${resourceUrl}`; if (error) { msg = typeof error === 'string' ? error : error.message; } if (msg) { console.warn(msg); } } cache[cacheKey] = dataURL; return dataURL; } //# sourceMappingURL=dataurl.js.map /***/ }), /***/ "./node_modules/html-to-image/es/embed-images.js": /*!*******************************************************!*\ !*** ./node_modules/html-to-image/es/embed-images.js ***! \*******************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ embedImages: () => (/* binding */ embedImages) /* harmony export */ }); /* harmony import */ var _embed_resources__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./embed-resources */ "./node_modules/html-to-image/es/embed-resources.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./util */ "./node_modules/html-to-image/es/util.js"); /* harmony import */ var _dataurl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dataurl */ "./node_modules/html-to-image/es/dataurl.js"); /* harmony import */ var _mimes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./mimes */ "./node_modules/html-to-image/es/mimes.js"); async function embedProp(propName, node, options) { var _a; const propValue = (_a = node.style) === null || _a === void 0 ? void 0 : _a.getPropertyValue(propName); if (propValue) { const cssString = await (0,_embed_resources__WEBPACK_IMPORTED_MODULE_0__.embedResources)(propValue, null, options); node.style.setProperty(propName, cssString, node.style.getPropertyPriority(propName)); return true; } return false; } async function embedBackground(clonedNode, options) { if (!(await embedProp('background', clonedNode, options))) { await embedProp('background-image', clonedNode, options); } if (!(await embedProp('mask', clonedNode, options))) { await embedProp('mask-image', clonedNode, options); } } async function embedImageNode(clonedNode, options) { const isImageElement = (0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(clonedNode, HTMLImageElement); if (!(isImageElement && !(0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.isDataUrl)(clonedNode.src)) && !((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(clonedNode, SVGImageElement) && !(0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.isDataUrl)(clonedNode.href.baseVal))) { return; } const url = isImageElement ? clonedNode.src : clonedNode.href.baseVal; const dataURL = await (0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.resourceToDataURL)(url, (0,_mimes__WEBPACK_IMPORTED_MODULE_3__.getMimeType)(url), options); await new Promise((resolve, reject) => { clonedNode.onload = resolve; clonedNode.onerror = reject; const image = clonedNode; if (image.decode) { image.decode = resolve; } if (image.loading === 'lazy') { image.loading = 'eager'; } if (isImageElement) { clonedNode.srcset = ''; clonedNode.src = dataURL; } else { clonedNode.href.baseVal = dataURL; } }); } async function embedChildren(clonedNode, options) { const children = (0,_util__WEBPACK_IMPORTED_MODULE_1__.toArray)(clonedNode.childNodes); const deferreds = children.map((child) => embedImages(child, options)); await Promise.all(deferreds).then(() => clonedNode); } async function embedImages(clonedNode, options) { if ((0,_util__WEBPACK_IMPORTED_MODULE_1__.isInstanceOfElement)(clonedNode, Element)) { await embedBackground(clonedNode, options); await embedImageNode(clonedNode, options); await embedChildren(clonedNode, options); } } //# sourceMappingURL=embed-images.js.map /***/ }), /***/ "./node_modules/html-to-image/es/embed-resources.js": /*!**********************************************************!*\ !*** ./node_modules/html-to-image/es/embed-resources.js ***! \**********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ embed: () => (/* binding */ embed), /* harmony export */ embedResources: () => (/* binding */ embedResources), /* harmony export */ parseURLs: () => (/* binding */ parseURLs), /* harmony export */ shouldEmbed: () => (/* binding */ shouldEmbed) /* harmony export */ }); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/html-to-image/es/util.js"); /* harmony import */ var _mimes__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./mimes */ "./node_modules/html-to-image/es/mimes.js"); /* harmony import */ var _dataurl__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./dataurl */ "./node_modules/html-to-image/es/dataurl.js"); const URL_REGEX = /url\((['"]?)([^'"]+?)\1\)/g; const URL_WITH_FORMAT_REGEX = /url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g; const FONT_SRC_REGEX = /src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g; function toRegex(url) { // eslint-disable-next-line no-useless-escape const escaped = url.replace(/([.*+?^${}()|\[\]\/\\])/g, '\\$1'); return new RegExp(`(url\\(['"]?)(${escaped})(['"]?\\))`, 'g'); } function parseURLs(cssText) { const urls = []; cssText.replace(URL_REGEX, (raw, quotation, url) => { urls.push(url); return raw; }); return urls.filter((url) => !(0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.isDataUrl)(url)); } async function embed(cssText, resourceURL, baseURL, options, getContentFromUrl) { try { const resolvedURL = baseURL ? (0,_util__WEBPACK_IMPORTED_MODULE_0__.resolveUrl)(resourceURL, baseURL) : resourceURL; const contentType = (0,_mimes__WEBPACK_IMPORTED_MODULE_1__.getMimeType)(resourceURL); let dataURL; if (getContentFromUrl) { const content = await getContentFromUrl(resolvedURL); dataURL = (0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.makeDataUrl)(content, contentType); } else { dataURL = await (0,_dataurl__WEBPACK_IMPORTED_MODULE_2__.resourceToDataURL)(resolvedURL, contentType, options); } return cssText.replace(toRegex(resourceURL), `$1${dataURL}$3`); } catch (error) { // pass } return cssText; } function filterPreferredFontFormat(str, { preferredFontFormat }) { return !preferredFontFormat ? str : str.replace(FONT_SRC_REGEX, (match) => { // eslint-disable-next-line no-constant-condition while (true) { const [src, , format] = URL_WITH_FORMAT_REGEX.exec(match) || []; if (!format) { return ''; } if (format === preferredFontFormat) { return `src: ${src};`; } } }); } function shouldEmbed(url) { return url.search(URL_REGEX) !== -1; } async function embedResources(cssText, baseUrl, options) { if (!shouldEmbed(cssText)) { return cssText; } const filteredCSSText = filterPreferredFontFormat(cssText, options); const urls = parseURLs(filteredCSSText); return urls.reduce((deferred, url) => deferred.then((css) => embed(css, url, baseUrl, options)), Promise.resolve(filteredCSSText)); } //# sourceMappingURL=embed-resources.js.map /***/ }), /***/ "./node_modules/html-to-image/es/embed-webfonts.js": /*!*********************************************************!*\ !*** ./node_modules/html-to-image/es/embed-webfonts.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ embedWebFonts: () => (/* binding */ embedWebFonts), /* harmony export */ getWebFontCSS: () => (/* binding */ getWebFontCSS) /* harmony export */ }); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./util */ "./node_modules/html-to-image/es/util.js"); /* harmony import */ var _dataurl__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./dataurl */ "./node_modules/html-to-image/es/dataurl.js"); /* harmony import */ var _embed_resources__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./embed-resources */ "./node_modules/html-to-image/es/embed-resources.js"); const cssFetchCache = {}; async function fetchCSS(url) { let cache = cssFetchCache[url]; if (cache != null) { return cache; } const res = await fetch(url); const cssText = await res.text(); cache = { url, cssText }; cssFetchCache[url] = cache; return cache; } async function embedFonts(data, options) { let cssText = data.cssText; const regexUrl = /url\(["']?([^"')]+)["']?\)/g; const fontLocs = cssText.match(/url\([^)]+\)/g) || []; const loadFonts = fontLocs.map(async (loc) => { let url = loc.replace(regexUrl, '$1'); if (!url.startsWith('https://')) { url = new URL(url, data.url).href; } return (0,_dataurl__WEBPACK_IMPORTED_MODULE_1__.fetchAsDataURL)(url, options.fetchRequestInit, ({ result }) => { cssText = cssText.replace(loc, `url(${result})`); return [loc, result]; }); }); return Promise.all(loadFonts).then(() => cssText); } function parseCSS(source) { if (source == null) { return []; } const result = []; const commentsRegex = /(\/\*[\s\S]*?\*\/)/gi; // strip out comments let cssText = source.replace(commentsRegex, ''); // eslint-disable-next-line prefer-regex-literals const keyframesRegex = new RegExp('((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})', 'gi'); // eslint-disable-next-line no-constant-condition while (true) { const matches = keyframesRegex.exec(cssText); if (matches === null) { break; } result.push(matches[0]); } cssText = cssText.replace(keyframesRegex, ''); const importRegex = /@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi; // to match css & media queries together const combinedCSSRegex = '((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]' + '*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})'; // unified regex const unifiedRegex = new RegExp(combinedCSSRegex, 'gi'); // eslint-disable-next-line no-constant-condition while (true) { let matches = importRegex.exec(cssText); if (matches === null) { matches = unifiedRegex.exec(cssText); if (matches === null) { break; } else { importRegex.lastIndex = unifiedRegex.lastIndex; } } else { unifiedRegex.lastIndex = importRegex.lastIndex; } result.push(matches[0]); } return result; } async function getCSSRules(styleSheets, options) { const ret = []; const deferreds = []; // First loop inlines imports styleSheets.forEach((sheet) => { if ('cssRules' in sheet) { try { (0,_util__WEBPACK_IMPORTED_MODULE_0__.toArray)(sheet.cssRules || []).forEach((item, index) => { if (item.type === CSSRule.IMPORT_RULE) { let importIndex = index + 1; const url = item.href; const deferred = fetchCSS(url) .then((metadata) => embedFonts(metadata, options)) .then((cssText) => parseCSS(cssText).forEach((rule) => { try { sheet.insertRule(rule, rule.startsWith('@import') ? (importIndex += 1) : sheet.cssRules.length); } catch (error) { console.error('Error inserting rule from remote css', { rule, error, }); } })) .catch((e) => { console.error('Error loading remote css', e.toString()); }); deferreds.push(deferred); } }); } catch (e) { const inline = styleSheets.find((a) => a.href == null) || document.styleSheets[0]; if (sheet.href != null) { deferreds.push(fetchCSS(sheet.href) .then((metadata) => embedFonts(metadata, options)) .then((cssText) => parseCSS(cssText).forEach((rule) => { inline.insertRule(rule, sheet.cssRules.length); })) .catch((err) => { console.error('Error loading remote stylesheet', err); })); } console.error('Error inlining remote css file', e); } } }); return Promise.all(deferreds).then(() => { // Second loop parses rules styleSheets.forEach((sheet) => { if ('cssRules' in sheet) { try { (0,_util__WEBPACK_IMPORTED_MODULE_0__.toArray)(sheet.cssRules || []).forEach((item) => { ret.push(item); }); } catch (e) { console.error(`Error while reading CSS rules from ${sheet.href}`, e); } } }); return ret; }); } function getWebFontRules(cssRules) { return cssRules .filter((rule) => rule.type === CSSRule.FONT_FACE_RULE) .filter((rule) => (0,_embed_resources__WEBPACK_IMPORTED_MODULE_2__.shouldEmbed)(rule.style.getPropertyValue('src'))); } async function parseWebFontRules(node, options) { if (node.ownerDocument == null) { throw new Error('Provided element is not within a Document'); } const styleSheets = (0,_util__WEBPACK_IMPORTED_MODULE_0__.toArray)(node.ownerDocument.styleSheets); const cssRules = await getCSSRules(styleSheets, options); return getWebFontRules(cssRules); } async function getWebFontCSS(node, options) { const rules = await parseWebFontRules(node, options); const cssTexts = await Promise.all(rules.map((rule) => { const baseUrl = rule.parentStyleSheet ? rule.parentStyleSheet.href : null; return (0,_embed_resources__WEBPACK_IMPORTED_MODULE_2__.embedResources)(rule.cssText, baseUrl, options); })); return cssTexts.join('\n'); } async function embedWebFonts(clonedNode, options) { const cssText = options.fontEmbedCSS != null ? options.fontEmbedCSS : options.skipFonts ? null : await getWebFontCSS(clonedNode, options); if (cssText) { const styleNode = document.createElement('style'); const sytleContent = document.createTextNode(cssText); styleNode.appendChild(sytleContent); if (clonedNode.firstChild) { clonedNode.insertBefore(styleNode, clonedNode.firstChild); } else { clonedNode.appendChild(styleNode); } } } //# sourceMappingURL=embed-webfonts.js.map /***/ }), /***/ "./node_modules/html-to-image/es/index.js": /*!************************************************!*\ !*** ./node_modules/html-to-image/es/index.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getFontEmbedCSS: () => (/* binding */ getFontEmbedCSS), /* harmony export */ toBlob: () => (/* binding */ toBlob), /* harmony export */ toCanvas: () => (/* binding */ toCanvas), /* harmony export */ toJpeg: () => (/* binding */ toJpeg), /* harmony export */ toPixelData: () => (/* binding */ toPixelData), /* harmony export */ toPng: () => (/* binding */ toPng), /* harmony export */ toSvg: () => (/* binding */ toSvg) /* harmony export */ }); /* harmony import */ var _clone_node__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./clone-node */ "./node_modules/html-to-image/es/clone-node.js"); /* harmony import */ var _embed_images__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./embed-images */ "./node_modules/html-to-image/es/embed-images.js"); /* harmony import */ var _apply_style__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./apply-style */ "./node_modules/html-to-image/es/apply-style.js"); /* harmony import */ var _embed_webfonts__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./embed-webfonts */ "./node_modules/html-to-image/es/embed-webfonts.js"); /* harmony import */ var _util__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./util */ "./node_modules/html-to-image/es/util.js"); async function toSvg(node, options = {}) { const { width, height } = (0,_util__WEBPACK_IMPORTED_MODULE_4__.getImageSize)(node, options); const clonedNode = (await (0,_clone_node__WEBPACK_IMPORTED_MODULE_0__.cloneNode)(node, options, true)); await (0,_embed_webfonts__WEBPACK_IMPORTED_MODULE_3__.embedWebFonts)(clonedNode, options); await (0,_embed_images__WEBPACK_IMPORTED_MODULE_1__.embedImages)(clonedNode, options); (0,_apply_style__WEBPACK_IMPORTED_MODULE_2__.applyStyle)(clonedNode, options); const datauri = await (0,_util__WEBPACK_IMPORTED_MODULE_4__.nodeToDataURL)(clonedNode, width, height); return datauri; } async function toCanvas(node, options = {}) { const { width, height } = (0,_util__WEBPACK_IMPORTED_MODULE_4__.getImageSize)(node, options); const svg = await toSvg(node, options); const img = await (0,_util__WEBPACK_IMPORTED_MODULE_4__.createImage)(svg); const canvas = document.createElement('canvas'); const context = canvas.getContext('2d'); const ratio = options.pixelRatio || (0,_util__WEBPACK_IMPORTED_MODULE_4__.getPixelRatio)(); const canvasWidth = options.canvasWidth || width; const canvasHeight = options.canvasHeight || height; canvas.width = canvasWidth * ratio; canvas.height = canvasHeight * ratio; if (!options.skipAutoScale) { (0,_util__WEBPACK_IMPORTED_MODULE_4__.checkCanvasDimensions)(canvas); } canvas.style.width = `${canvasWidth}`; canvas.style.height = `${canvasHeight}`; if (options.backgroundColor) { context.fillStyle = options.backgroundColor; context.fillRect(0, 0, canvas.width, canvas.height); } context.drawImage(img, 0, 0, canvas.width, canvas.height); return canvas; } async function toPixelData(node, options = {}) { const { width, height } = (0,_util__WEBPACK_IMPORTED_MODULE_4__.getImageSize)(node, options); const canvas = await toCanvas(node, options); const ctx = canvas.getContext('2d'); return ctx.getImageData(0, 0, width, height).data; } async function toPng(node, options = {}) { const canvas = await toCanvas(node, options); return canvas.toDataURL(); } async function toJpeg(node, options = {}) { const canvas = await toCanvas(node, options); return canvas.toDataURL('image/jpeg', options.quality || 1); } async function toBlob(node, options = {}) { const canvas = await toCanvas(node, options); const blob = await (0,_util__WEBPACK_IMPORTED_MODULE_4__.canvasToBlob)(canvas); return blob; } async function getFontEmbedCSS(node, options = {}) { return (0,_embed_webfonts__WEBPACK_IMPORTED_MODULE_3__.getWebFontCSS)(node, options); } //# sourceMappingURL=index.js.map /***/ }), /***/ "./node_modules/html-to-image/es/mimes.js": /*!************************************************!*\ !*** ./node_modules/html-to-image/es/mimes.js ***! \************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getMimeType: () => (/* binding */ getMimeType) /* harmony export */ }); const WOFF = 'application/font-woff'; const JPEG = 'image/jpeg'; const mimes = { woff: WOFF, woff2: WOFF, ttf: 'application/font-truetype', eot: 'application/vnd.ms-fontobject', png: 'image/png', jpg: JPEG, jpeg: JPEG, gif: 'image/gif', tiff: 'image/tiff', svg: 'image/svg+xml', webp: 'image/webp', }; function getExtension(url) { const match = /\.([^./]*?)$/g.exec(url); return match ? match[1] : ''; } function getMimeType(url) { const extension = getExtension(url).toLowerCase(); return mimes[extension] || ''; } //# sourceMappingURL=mimes.js.map /***/ }), /***/ "./node_modules/html-to-image/es/util.js": /*!***********************************************!*\ !*** ./node_modules/html-to-image/es/util.js ***! \***********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ canvasToBlob: () => (/* binding */ canvasToBlob), /* harmony export */ checkCanvasDimensions: () => (/* binding */ checkCanvasDimensions), /* harmony export */ createImage: () => (/* binding */ createImage), /* harmony export */ delay: () => (/* binding */ delay), /* harmony export */ getImageSize: () => (/* binding */ getImageSize), /* harmony export */ getPixelRatio: () => (/* binding */ getPixelRatio), /* harmony export */ isInstanceOfElement: () => (/* binding */ isInstanceOfElement), /* harmony export */ nodeToDataURL: () => (/* binding */ nodeToDataURL), /* harmony export */ resolveUrl: () => (/* binding */ resolveUrl), /* harmony export */ svgToDataURL: () => (/* binding */ svgToDataURL), /* harmony export */ toArray: () => (/* binding */ toArray), /* harmony export */ uuid: () => (/* binding */ uuid) /* harmony export */ }); function resolveUrl(url, baseUrl) { // url is absolute already if (url.match(/^[a-z]+:\/\//i)) { return url; } // url is absolute already, without protocol if (url.match(/^\/\//)) { return window.location.protocol + url; } // dataURI, mailto:, tel:, etc. if (url.match(/^[a-z]+:/i)) { return url; } const doc = document.implementation.createHTMLDocument(); const base = doc.createElement('base'); const a = doc.createElement('a'); doc.head.appendChild(base); doc.body.appendChild(a); if (baseUrl) { base.href = baseUrl; } a.href = url; return a.href; } const uuid = (() => { // generate uuid for className of pseudo elements. // We should not use GUIDs, otherwise pseudo elements sometimes cannot be captured. let counter = 0; // ref: http://stackoverflow.com/a/6248722/2519373 const random = () => // eslint-disable-next-line no-bitwise `0000${((Math.random() * 36 ** 4) << 0).toString(36)}`.slice(-4); return () => { counter += 1; return `u${random()}${counter}`; }; })(); function delay(ms) { return (args) => new Promise((resolve) => { setTimeout(() => resolve(args), ms); }); } function toArray(arrayLike) { const arr = []; for (let i = 0, l = arrayLike.length; i < l; i++) { arr.push(arrayLike[i]); } return arr; } function px(node, styleProperty) { const win = node.ownerDocument.defaultView || window; const val = win.getComputedStyle(node).getPropertyValue(styleProperty); return val ? parseFloat(val.replace('px', '')) : 0; } function getNodeWidth(node) { const leftBorder = px(node, 'border-left-width'); const rightBorder = px(node, 'border-right-width'); return node.clientWidth + leftBorder + rightBorder; } function getNodeHeight(node) { const topBorder = px(node, 'border-top-width'); const bottomBorder = px(node, 'border-bottom-width'); return node.clientHeight + topBorder + bottomBorder; } function getImageSize(targetNode, options = {}) { const width = options.width || getNodeWidth(targetNode); const height = options.height || getNodeHeight(targetNode); return { width, height }; } function getPixelRatio() { let ratio; let FINAL_PROCESS; try { FINAL_PROCESS = process; } catch (e) { // pass } const val = FINAL_PROCESS && FINAL_PROCESS.env ? FINAL_PROCESS.env.devicePixelRatio : null; if (val) { ratio = parseInt(val, 10); if (Number.isNaN(ratio)) { ratio = 1; } } return ratio || window.devicePixelRatio || 1; } // @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/canvas#maximum_canvas_size const canvasDimensionLimit = 16384; function checkCanvasDimensions(canvas) { if (canvas.width > canvasDimensionLimit || canvas.height > canvasDimensionLimit) { if (canvas.width > canvasDimensionLimit && canvas.height > canvasDimensionLimit) { if (canvas.width > canvas.height) { canvas.height *= canvasDimensionLimit / canvas.width; canvas.width = canvasDimensionLimit; } else { canvas.width *= canvasDimensionLimit / canvas.height; canvas.height = canvasDimensionLimit; } } else if (canvas.width > canvasDimensionLimit) { canvas.height *= canvasDimensionLimit / canvas.width; canvas.width = canvasDimensionLimit; } else { canvas.width *= canvasDimensionLimit / canvas.height; canvas.height = canvasDimensionLimit; } } } function canvasToBlob(canvas, options = {}) { if (canvas.toBlob) { return new Promise((resolve) => { canvas.toBlob(resolve, options.type ? options.type : 'image/png', options.quality ? options.quality : 1); }); } return new Promise((resolve) => { const binaryString = window.atob(canvas .toDataURL(options.type ? options.type : undefined, options.quality ? options.quality : undefined) .split(',')[1]); const len = binaryString.length; const binaryArray = new Uint8Array(len); for (let i = 0; i < len; i += 1) { binaryArray[i] = binaryString.charCodeAt(i); } resolve(new Blob([binaryArray], { type: options.type ? options.type : 'image/png', })); }); } function createImage(url) { return new Promise((resolve, reject) => { const img = new Image(); img.decode = () => resolve(img); img.onload = () => resolve(img); img.onerror = reject; img.crossOrigin = 'anonymous'; img.decoding = 'async'; img.src = url; }); } async function svgToDataURL(svg) { return Promise.resolve() .then(() => new XMLSerializer().serializeToString(svg)) .then(encodeURIComponent) .then((html) => `data:image/svg+xml;charset=utf-8,${html}`); } async function nodeToDataURL(node, width, height) { const xmlns = 'http://www.w3.org/2000/svg'; const svg = document.createElementNS(xmlns, 'svg'); const foreignObject = document.createElementNS(xmlns, 'foreignObject'); svg.setAttribute('width', `${width}`); svg.setAttribute('height', `${height}`); svg.setAttribute('viewBox', `0 0 ${width} ${height}`); foreignObject.setAttribute('width', '100%'); foreignObject.setAttribute('height', '100%'); foreignObject.setAttribute('x', '0'); foreignObject.setAttribute('y', '0'); foreignObject.setAttribute('externalResourcesRequired', 'true'); svg.appendChild(foreignObject); foreignObject.appendChild(node); return svgToDataURL(svg); } const isInstanceOfElement = (node, instance) => { if (node instanceof instance) return true; const nodePrototype = Object.getPrototypeOf(node); if (nodePrototype === null) return false; return (nodePrototype.constructor.name === instance.name || isInstanceOfElement(nodePrototype, instance)); }; //# sourceMappingURL=util.js.map /***/ }), /***/ "./node_modules/imagesloaded/imagesloaded.js": /*!***************************************************!*\ !*** ./node_modules/imagesloaded/imagesloaded.js ***! \***************************************************/ /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /*! * imagesLoaded v5.0.0 * JavaScript is all like "You images are done yet or what?" * MIT License */ ( function( window, factory ) { // universal module definition if ( true && module.exports ) { // CommonJS module.exports = factory( window, __webpack_require__(/*! ev-emitter */ "./node_modules/ev-emitter/ev-emitter.js") ); } else { // browser global window.imagesLoaded = factory( window, window.EvEmitter ); } } )( typeof window !== 'undefined' ? window : this, function factory( window, EvEmitter ) { let $ = window.jQuery; let console = window.console; // -------------------------- helpers -------------------------- // // turn element or nodeList into an array function makeArray( obj ) { // use object if already an array if ( Array.isArray( obj ) ) return obj; let isArrayLike = typeof obj == 'object' && typeof obj.length == 'number'; // convert nodeList to array if ( isArrayLike ) return [ ...obj ]; // array of single index return [ obj ]; } // -------------------------- imagesLoaded -------------------------- // /** * @param {[Array, Element, NodeList, String]} elem * @param {[Object, Function]} options - if function, use as callback * @param {Function} onAlways - callback function * @returns {ImagesLoaded} */ function ImagesLoaded( elem, options, onAlways ) { // coerce ImagesLoaded() without new, to be new ImagesLoaded() if ( !( this instanceof ImagesLoaded ) ) { return new ImagesLoaded( elem, options, onAlways ); } // use elem as selector string let queryElem = elem; if ( typeof elem == 'string' ) { queryElem = document.querySelectorAll( elem ); } // bail if bad element if ( !queryElem ) { console.error(`Bad element for imagesLoaded ${queryElem || elem}`); return; } this.elements = makeArray( queryElem ); this.options = {}; // shift arguments if no options set if ( typeof options == 'function' ) { onAlways = options; } else { Object.assign( this.options, options ); } if ( onAlways ) this.on( 'always', onAlways ); this.getImages(); // add jQuery Deferred object if ( $ ) this.jqDeferred = new $.Deferred(); // HACK check async to allow time to bind listeners setTimeout( this.check.bind( this ) ); } ImagesLoaded.prototype = Object.create( EvEmitter.prototype ); ImagesLoaded.prototype.getImages = function() { this.images = []; // filter & find items if we have an item selector this.elements.forEach( this.addElementImages, this ); }; const elementNodeTypes = [ 1, 9, 11 ]; /** * @param {Node} elem */ ImagesLoaded.prototype.addElementImages = function( elem ) { // filter siblings if ( elem.nodeName === 'IMG' ) { this.addImage( elem ); } // get background image on element if ( this.options.background === true ) { this.addElementBackgroundImages( elem ); } // find children // no non-element nodes, #143 let { nodeType } = elem; if ( !nodeType || !elementNodeTypes.includes( nodeType ) ) return; let childImgs = elem.querySelectorAll('img'); // concat childElems to filterFound array for ( let img of childImgs ) { this.addImage( img ); } // get child background images if ( typeof this.options.background == 'string' ) { let children = elem.querySelectorAll( this.options.background ); for ( let child of children ) { this.addElementBackgroundImages( child ); } } }; const reURL = /url\((['"])?(.*?)\1\)/gi; ImagesLoaded.prototype.addElementBackgroundImages = function( elem ) { let style = getComputedStyle( elem ); // Firefox returns null if in a hidden iframe https://bugzil.la/548397 if ( !style ) return; // get url inside url("...") let matches = reURL.exec( style.backgroundImage ); while ( matches !== null ) { let url = matches && matches[2]; if ( url ) { this.addBackground( url, elem ); } matches = reURL.exec( style.backgroundImage ); } }; /** * @param {Image} img */ ImagesLoaded.prototype.addImage = function( img ) { let loadingImage = new LoadingImage( img ); this.images.push( loadingImage ); }; ImagesLoaded.prototype.addBackground = function( url, elem ) { let background = new Background( url, elem ); this.images.push( background ); }; ImagesLoaded.prototype.check = function() { this.progressedCount = 0; this.hasAnyBroken = false; // complete if no images if ( !this.images.length ) { this.complete(); return; } /* eslint-disable-next-line func-style */ let onProgress = ( image, elem, message ) => { // HACK - Chrome triggers event before object properties have changed. #83 setTimeout( () => { this.progress( image, elem, message ); } ); }; this.images.forEach( function( loadingImage ) { loadingImage.once( 'progress', onProgress ); loadingImage.check(); } ); }; ImagesLoaded.prototype.progress = function( image, elem, message ) { this.progressedCount++; this.hasAnyBroken = this.hasAnyBroken || !image.isLoaded; // progress event this.emitEvent( 'progress', [ this, image, elem ] ); if ( this.jqDeferred && this.jqDeferred.notify ) { this.jqDeferred.notify( this, image ); } // check if completed if ( this.progressedCount === this.images.length ) { this.complete(); } if ( this.options.debug && console ) { console.log( `progress: ${message}`, image, elem ); } }; ImagesLoaded.prototype.complete = function() { let eventName = this.hasAnyBroken ? 'fail' : 'done'; this.isComplete = true; this.emitEvent( eventName, [ this ] ); this.emitEvent( 'always', [ this ] ); if ( this.jqDeferred ) { let jqMethod = this.hasAnyBroken ? 'reject' : 'resolve'; this.jqDeferred[ jqMethod ]( this ); } }; // -------------------------- -------------------------- // function LoadingImage( img ) { this.img = img; } LoadingImage.prototype = Object.create( EvEmitter.prototype ); LoadingImage.prototype.check = function() { // If complete is true and browser supports natural sizes, // try to check for image status manually. let isComplete = this.getIsImageComplete(); if ( isComplete ) { // report based on naturalWidth this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); return; } // If none of the checks above matched, simulate loading on detached element. this.proxyImage = new Image(); // add crossOrigin attribute. #204 if ( this.img.crossOrigin ) { this.proxyImage.crossOrigin = this.img.crossOrigin; } this.proxyImage.addEventListener( 'load', this ); this.proxyImage.addEventListener( 'error', this ); // bind to image as well for Firefox. #191 this.img.addEventListener( 'load', this ); this.img.addEventListener( 'error', this ); this.proxyImage.src = this.img.currentSrc || this.img.src; }; LoadingImage.prototype.getIsImageComplete = function() { // check for non-zero, non-undefined naturalWidth // fixes Safari+InfiniteScroll+Masonry bug infinite-scroll#671 return this.img.complete && this.img.naturalWidth; }; LoadingImage.prototype.confirm = function( isLoaded, message ) { this.isLoaded = isLoaded; let { parentNode } = this.img; // emit progress with parent <picture> or self <img> let elem = parentNode.nodeName === 'PICTURE' ? parentNode : this.img; this.emitEvent( 'progress', [ this, elem, message ] ); }; // ----- events ----- // // trigger specified handler for event type LoadingImage.prototype.handleEvent = function( event ) { let method = 'on' + event.type; if ( this[ method ] ) { this[ method ]( event ); } }; LoadingImage.prototype.onload = function() { this.confirm( true, 'onload' ); this.unbindEvents(); }; LoadingImage.prototype.onerror = function() { this.confirm( false, 'onerror' ); this.unbindEvents(); }; LoadingImage.prototype.unbindEvents = function() { this.proxyImage.removeEventListener( 'load', this ); this.proxyImage.removeEventListener( 'error', this ); this.img.removeEventListener( 'load', this ); this.img.removeEventListener( 'error', this ); }; // -------------------------- Background -------------------------- // function Background( url, element ) { this.url = url; this.element = element; this.img = new Image(); } // inherit LoadingImage prototype Background.prototype = Object.create( LoadingImage.prototype ); Background.prototype.check = function() { this.img.addEventListener( 'load', this ); this.img.addEventListener( 'error', this ); this.img.src = this.url; // check if image is already complete let isComplete = this.getIsImageComplete(); if ( isComplete ) { this.confirm( this.img.naturalWidth !== 0, 'naturalWidth' ); this.unbindEvents(); } }; Background.prototype.unbindEvents = function() { this.img.removeEventListener( 'load', this ); this.img.removeEventListener( 'error', this ); }; Background.prototype.confirm = function( isLoaded, message ) { this.isLoaded = isLoaded; this.emitEvent( 'progress', [ this, this.element, message ] ); }; // -------------------------- jQuery -------------------------- // ImagesLoaded.makeJQueryPlugin = function( jQuery ) { jQuery = jQuery || window.jQuery; if ( !jQuery ) return; // set local variable $ = jQuery; // $().imagesLoaded() $.fn.imagesLoaded = function( options, onAlways ) { let instance = new ImagesLoaded( this, options, onAlways ); return instance.jqDeferred.promise( $( this ) ); }; }; // try making plugin ImagesLoaded.makeJQueryPlugin(); // -------------------------- -------------------------- // return ImagesLoaded; } ); /***/ }), /***/ "./node_modules/masonry-layout/masonry.js": /*!************************************************!*\ !*** ./node_modules/masonry-layout/masonry.js ***! \************************************************/ /***/ ((module, exports, __webpack_require__) => { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * Masonry v4.2.2 * Cascading grid layout library * https://masonry.desandro.com * MIT License * by David DeSandro */ ( function( window, factory ) { // universal module definition /* jshint strict: false */ /*globals define, module, require */ if ( true ) { // AMD !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! outlayer/outlayer */ "./node_modules/outlayer/outlayer.js"), __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }( window, function factory( Outlayer, getSize ) { 'use strict'; // -------------------------- masonryDefinition -------------------------- // // create an Outlayer layout class var Masonry = Outlayer.create('masonry'); // isFitWidth -> fitWidth Masonry.compatOptions.fitWidth = 'isFitWidth'; var proto = Masonry.prototype; proto._resetLayout = function() { this.getSize(); this._getMeasurement( 'columnWidth', 'outerWidth' ); this._getMeasurement( 'gutter', 'outerWidth' ); this.measureColumns(); // reset column Y this.colYs = []; for ( var i=0; i < this.cols; i++ ) { this.colYs.push( 0 ); } this.maxY = 0; this.horizontalColIndex = 0; }; proto.measureColumns = function() { this.getContainerWidth(); // if columnWidth is 0, default to outerWidth of first item if ( !this.columnWidth ) { var firstItem = this.items[0]; var firstItemElem = firstItem && firstItem.element; // columnWidth fall back to item of first element this.columnWidth = firstItemElem && getSize( firstItemElem ).outerWidth || // if first elem has no width, default to size of container this.containerWidth; } var columnWidth = this.columnWidth += this.gutter; // calculate columns var containerWidth = this.containerWidth + this.gutter; var cols = containerWidth / columnWidth; // fix rounding errors, typically with gutters var excess = columnWidth - containerWidth % columnWidth; // if overshoot is less than a pixel, round up, otherwise floor it var mathMethod = excess && excess < 1 ? 'round' : 'floor'; cols = Math[ mathMethod ]( cols ); this.cols = Math.max( cols, 1 ); }; proto.getContainerWidth = function() { // container is parent if fit width var isFitWidth = this._getOption('fitWidth'); var container = isFitWidth ? this.element.parentNode : this.element; // check that this.size and size are there // IE8 triggers resize on body size change, so they might not be var size = getSize( container ); this.containerWidth = size && size.innerWidth; }; proto._getItemLayoutPosition = function( item ) { item.getSize(); // how many columns does this brick span var remainder = item.size.outerWidth % this.columnWidth; var mathMethod = remainder && remainder < 1 ? 'round' : 'ceil'; // round if off by 1 pixel, otherwise use ceil var colSpan = Math[ mathMethod ]( item.size.outerWidth / this.columnWidth ); colSpan = Math.min( colSpan, this.cols ); // use horizontal or top column position var colPosMethod = this.options.horizontalOrder ? '_getHorizontalColPosition' : '_getTopColPosition'; var colPosition = this[ colPosMethod ]( colSpan, item ); // position the brick var position = { x: this.columnWidth * colPosition.col, y: colPosition.y }; // apply setHeight to necessary columns var setHeight = colPosition.y + item.size.outerHeight; var setMax = colSpan + colPosition.col; for ( var i = colPosition.col; i < setMax; i++ ) { this.colYs[i] = setHeight; } return position; }; proto._getTopColPosition = function( colSpan ) { var colGroup = this._getTopColGroup( colSpan ); // get the minimum Y value from the columns var minimumY = Math.min.apply( Math, colGroup ); return { col: colGroup.indexOf( minimumY ), y: minimumY, }; }; /** * @param {Number} colSpan - number of columns the element spans * @returns {Array} colGroup */ proto._getTopColGroup = function( colSpan ) { if ( colSpan < 2 ) { // if brick spans only one column, use all the column Ys return this.colYs; } var colGroup = []; // how many different places could this brick fit horizontally var groupCount = this.cols + 1 - colSpan; // for each group potential horizontal position for ( var i = 0; i < groupCount; i++ ) { colGroup[i] = this._getColGroupY( i, colSpan ); } return colGroup; }; proto._getColGroupY = function( col, colSpan ) { if ( colSpan < 2 ) { return this.colYs[ col ]; } // make an array of colY values for that one group var groupColYs = this.colYs.slice( col, col + colSpan ); // and get the max value of the array return Math.max.apply( Math, groupColYs ); }; // get column position based on horizontal index. #873 proto._getHorizontalColPosition = function( colSpan, item ) { var col = this.horizontalColIndex % this.cols; var isOver = colSpan > 1 && col + colSpan > this.cols; // shift to next row if item can't fit on current row col = isOver ? 0 : col; // don't let zero-size items take up space var hasSize = item.size.outerWidth && item.size.outerHeight; this.horizontalColIndex = hasSize ? col + colSpan : this.horizontalColIndex; return { col: col, y: this._getColGroupY( col, colSpan ), }; }; proto._manageStamp = function( stamp ) { var stampSize = getSize( stamp ); var offset = this._getElementOffset( stamp ); // get the columns that this stamp affects var isOriginLeft = this._getOption('originLeft'); var firstX = isOriginLeft ? offset.left : offset.right; var lastX = firstX + stampSize.outerWidth; var firstCol = Math.floor( firstX / this.columnWidth ); firstCol = Math.max( 0, firstCol ); var lastCol = Math.floor( lastX / this.columnWidth ); // lastCol should not go over if multiple of columnWidth #425 lastCol -= lastX % this.columnWidth ? 0 : 1; lastCol = Math.min( this.cols - 1, lastCol ); // set colYs to bottom of the stamp var isOriginTop = this._getOption('originTop'); var stampMaxY = ( isOriginTop ? offset.top : offset.bottom ) + stampSize.outerHeight; for ( var i = firstCol; i <= lastCol; i++ ) { this.colYs[i] = Math.max( stampMaxY, this.colYs[i] ); } }; proto._getContainerSize = function() { this.maxY = Math.max.apply( Math, this.colYs ); var size = { height: this.maxY }; if ( this._getOption('fitWidth') ) { size.width = this._getContainerFitWidth(); } return size; }; proto._getContainerFitWidth = function() { var unusedCols = 0; // count unused columns var i = this.cols; while ( --i ) { if ( this.colYs[i] !== 0 ) { break; } unusedCols++; } // fit container to columns that have been used return ( this.cols - unusedCols ) * this.columnWidth - this.gutter; }; proto.needsResizeLayout = function() { var previousWidth = this.containerWidth; this.getContainerWidth(); return previousWidth != this.containerWidth; }; return Masonry; })); /***/ }), /***/ "./node_modules/@splidejs/splide/dist/css/splide-core.min.css": /*!********************************************************************!*\ !*** ./node_modules/@splidejs/splide/dist/css/splide-core.min.css ***! \********************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin /***/ }), /***/ "./node_modules/animate.css/animate.css": /*!**********************************************!*\ !*** ./node_modules/animate.css/animate.css ***! \**********************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); // extracted by mini-css-extract-plugin /***/ }), /***/ "./node_modules/outlayer/item.js": /*!***************************************!*\ !*** ./node_modules/outlayer/item.js ***! \***************************************/ /***/ ((module, exports, __webpack_require__) => { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/** * Outlayer Item */ ( function( window, factory ) { // universal module definition /* jshint strict: false */ /* globals define, module, require */ if ( true ) { // AMD - RequireJS !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js") ], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }( window, function factory( EvEmitter, getSize ) { 'use strict'; // ----- helpers ----- // function isEmptyObj( obj ) { for ( var prop in obj ) { return false; } prop = null; return true; } // -------------------------- CSS3 support -------------------------- // var docElemStyle = document.documentElement.style; var transitionProperty = typeof docElemStyle.transition == 'string' ? 'transition' : 'WebkitTransition'; var transformProperty = typeof docElemStyle.transform == 'string' ? 'transform' : 'WebkitTransform'; var transitionEndEvent = { WebkitTransition: 'webkitTransitionEnd', transition: 'transitionend' }[ transitionProperty ]; // cache all vendor properties that could have vendor prefix var vendorProperties = { transform: transformProperty, transition: transitionProperty, transitionDuration: transitionProperty + 'Duration', transitionProperty: transitionProperty + 'Property', transitionDelay: transitionProperty + 'Delay' }; // -------------------------- Item -------------------------- // function Item( element, layout ) { if ( !element ) { return; } this.element = element; // parent layout class, i.e. Masonry, Isotope, or Packery this.layout = layout; this.position = { x: 0, y: 0 }; this._create(); } // inherit EvEmitter var proto = Item.prototype = Object.create( EvEmitter.prototype ); proto.constructor = Item; proto._create = function() { // transition objects this._transn = { ingProperties: {}, clean: {}, onEnd: {} }; this.css({ position: 'absolute' }); }; // trigger specified handler for event type proto.handleEvent = function( event ) { var method = 'on' + event.type; if ( this[ method ] ) { this[ method ]( event ); } }; proto.getSize = function() { this.size = getSize( this.element ); }; /** * apply CSS styles to element * @param {Object} style */ proto.css = function( style ) { var elemStyle = this.element.style; for ( var prop in style ) { // use vendor property if available var supportedProp = vendorProperties[ prop ] || prop; elemStyle[ supportedProp ] = style[ prop ]; } }; // measure position, and sets it proto.getPosition = function() { var style = getComputedStyle( this.element ); var isOriginLeft = this.layout._getOption('originLeft'); var isOriginTop = this.layout._getOption('originTop'); var xValue = style[ isOriginLeft ? 'left' : 'right' ]; var yValue = style[ isOriginTop ? 'top' : 'bottom' ]; var x = parseFloat( xValue ); var y = parseFloat( yValue ); // convert percent to pixels var layoutSize = this.layout.size; if ( xValue.indexOf('%') != -1 ) { x = ( x / 100 ) * layoutSize.width; } if ( yValue.indexOf('%') != -1 ) { y = ( y / 100 ) * layoutSize.height; } // clean up 'auto' or other non-integer values x = isNaN( x ) ? 0 : x; y = isNaN( y ) ? 0 : y; // remove padding from measurement x -= isOriginLeft ? layoutSize.paddingLeft : layoutSize.paddingRight; y -= isOriginTop ? layoutSize.paddingTop : layoutSize.paddingBottom; this.position.x = x; this.position.y = y; }; // set settled position, apply padding proto.layoutPosition = function() { var layoutSize = this.layout.size; var style = {}; var isOriginLeft = this.layout._getOption('originLeft'); var isOriginTop = this.layout._getOption('originTop'); // x var xPadding = isOriginLeft ? 'paddingLeft' : 'paddingRight'; var xProperty = isOriginLeft ? 'left' : 'right'; var xResetProperty = isOriginLeft ? 'right' : 'left'; var x = this.position.x + layoutSize[ xPadding ]; // set in percentage or pixels style[ xProperty ] = this.getXValue( x ); // reset other property style[ xResetProperty ] = ''; // y var yPadding = isOriginTop ? 'paddingTop' : 'paddingBottom'; var yProperty = isOriginTop ? 'top' : 'bottom'; var yResetProperty = isOriginTop ? 'bottom' : 'top'; var y = this.position.y + layoutSize[ yPadding ]; // set in percentage or pixels style[ yProperty ] = this.getYValue( y ); // reset other property style[ yResetProperty ] = ''; this.css( style ); this.emitEvent( 'layout', [ this ] ); }; proto.getXValue = function( x ) { var isHorizontal = this.layout._getOption('horizontal'); return this.layout.options.percentPosition && !isHorizontal ? ( ( x / this.layout.size.width ) * 100 ) + '%' : x + 'px'; }; proto.getYValue = function( y ) { var isHorizontal = this.layout._getOption('horizontal'); return this.layout.options.percentPosition && isHorizontal ? ( ( y / this.layout.size.height ) * 100 ) + '%' : y + 'px'; }; proto._transitionTo = function( x, y ) { this.getPosition(); // get current x & y from top/left var curX = this.position.x; var curY = this.position.y; var didNotMove = x == this.position.x && y == this.position.y; // save end position this.setPosition( x, y ); // if did not move and not transitioning, just go to layout if ( didNotMove && !this.isTransitioning ) { this.layoutPosition(); return; } var transX = x - curX; var transY = y - curY; var transitionStyle = {}; transitionStyle.transform = this.getTranslate( transX, transY ); this.transition({ to: transitionStyle, onTransitionEnd: { transform: this.layoutPosition }, isCleaning: true }); }; proto.getTranslate = function( x, y ) { // flip cooridinates if origin on right or bottom var isOriginLeft = this.layout._getOption('originLeft'); var isOriginTop = this.layout._getOption('originTop'); x = isOriginLeft ? x : -x; y = isOriginTop ? y : -y; return 'translate3d(' + x + 'px, ' + y + 'px, 0)'; }; // non transition + transform support proto.goTo = function( x, y ) { this.setPosition( x, y ); this.layoutPosition(); }; proto.moveTo = proto._transitionTo; proto.setPosition = function( x, y ) { this.position.x = parseFloat( x ); this.position.y = parseFloat( y ); }; // ----- transition ----- // /** * @param {Object} style - CSS * @param {Function} onTransitionEnd */ // non transition, just trigger callback proto._nonTransition = function( args ) { this.css( args.to ); if ( args.isCleaning ) { this._removeStyles( args.to ); } for ( var prop in args.onTransitionEnd ) { args.onTransitionEnd[ prop ].call( this ); } }; /** * proper transition * @param {Object} args - arguments * @param {Object} to - style to transition to * @param {Object} from - style to start transition from * @param {Boolean} isCleaning - removes transition styles after transition * @param {Function} onTransitionEnd - callback */ proto.transition = function( args ) { // redirect to nonTransition if no transition duration if ( !parseFloat( this.layout.options.transitionDuration ) ) { this._nonTransition( args ); return; } var _transition = this._transn; // keep track of onTransitionEnd callback by css property for ( var prop in args.onTransitionEnd ) { _transition.onEnd[ prop ] = args.onTransitionEnd[ prop ]; } // keep track of properties that are transitioning for ( prop in args.to ) { _transition.ingProperties[ prop ] = true; // keep track of properties to clean up when transition is done if ( args.isCleaning ) { _transition.clean[ prop ] = true; } } // set from styles if ( args.from ) { this.css( args.from ); // force redraw. http://blog.alexmaccaw.com/css-transitions var h = this.element.offsetHeight; // hack for JSHint to hush about unused var h = null; } // enable transition this.enableTransition( args.to ); // set styles that are transitioning this.css( args.to ); this.isTransitioning = true; }; // dash before all cap letters, including first for // WebkitTransform => -webkit-transform function toDashedAll( str ) { return str.replace( /([A-Z])/g, function( $1 ) { return '-' + $1.toLowerCase(); }); } var transitionProps = 'opacity,' + toDashedAll( transformProperty ); proto.enableTransition = function(/* style */) { // HACK changing transitionProperty during a transition // will cause transition to jump if ( this.isTransitioning ) { return; } // make `transition: foo, bar, baz` from style object // HACK un-comment this when enableTransition can work // while a transition is happening // var transitionValues = []; // for ( var prop in style ) { // // dash-ify camelCased properties like WebkitTransition // prop = vendorProperties[ prop ] || prop; // transitionValues.push( toDashedAll( prop ) ); // } // munge number to millisecond, to match stagger var duration = this.layout.options.transitionDuration; duration = typeof duration == 'number' ? duration + 'ms' : duration; // enable transition styles this.css({ transitionProperty: transitionProps, transitionDuration: duration, transitionDelay: this.staggerDelay || 0 }); // listen for transition end event this.element.addEventListener( transitionEndEvent, this, false ); }; // ----- events ----- // proto.onwebkitTransitionEnd = function( event ) { this.ontransitionend( event ); }; proto.onotransitionend = function( event ) { this.ontransitionend( event ); }; // properties that I munge to make my life easier var dashedVendorProperties = { '-webkit-transform': 'transform' }; proto.ontransitionend = function( event ) { // disregard bubbled events from children if ( event.target !== this.element ) { return; } var _transition = this._transn; // get property name of transitioned property, convert to prefix-free var propertyName = dashedVendorProperties[ event.propertyName ] || event.propertyName; // remove property that has completed transitioning delete _transition.ingProperties[ propertyName ]; // check if any properties are still transitioning if ( isEmptyObj( _transition.ingProperties ) ) { // all properties have completed transitioning this.disableTransition(); } // clean style if ( propertyName in _transition.clean ) { // clean up style this.element.style[ event.propertyName ] = ''; delete _transition.clean[ propertyName ]; } // trigger onTransitionEnd callback if ( propertyName in _transition.onEnd ) { var onTransitionEnd = _transition.onEnd[ propertyName ]; onTransitionEnd.call( this ); delete _transition.onEnd[ propertyName ]; } this.emitEvent( 'transitionEnd', [ this ] ); }; proto.disableTransition = function() { this.removeTransitionStyles(); this.element.removeEventListener( transitionEndEvent, this, false ); this.isTransitioning = false; }; /** * removes style property from element * @param {Object} style **/ proto._removeStyles = function( style ) { // clean up transition styles var cleanStyle = {}; for ( var prop in style ) { cleanStyle[ prop ] = ''; } this.css( cleanStyle ); }; var cleanTransitionStyle = { transitionProperty: '', transitionDuration: '', transitionDelay: '' }; proto.removeTransitionStyles = function() { // remove transition this.css( cleanTransitionStyle ); }; // ----- stagger ----- // proto.stagger = function( delay ) { delay = isNaN( delay ) ? 0 : delay; this.staggerDelay = delay + 'ms'; }; // ----- show/hide/remove ----- // // remove element from DOM proto.removeElem = function() { this.element.parentNode.removeChild( this.element ); // remove display: none this.css({ display: '' }); this.emitEvent( 'remove', [ this ] ); }; proto.remove = function() { // just remove element if no transition support or no transition if ( !transitionProperty || !parseFloat( this.layout.options.transitionDuration ) ) { this.removeElem(); return; } // start transition this.once( 'transitionEnd', function() { this.removeElem(); }); this.hide(); }; proto.reveal = function() { delete this.isHidden; // remove display: none this.css({ display: '' }); var options = this.layout.options; var onTransitionEnd = {}; var transitionEndProperty = this.getHideRevealTransitionEndProperty('visibleStyle'); onTransitionEnd[ transitionEndProperty ] = this.onRevealTransitionEnd; this.transition({ from: options.hiddenStyle, to: options.visibleStyle, isCleaning: true, onTransitionEnd: onTransitionEnd }); }; proto.onRevealTransitionEnd = function() { // check if still visible // during transition, item may have been hidden if ( !this.isHidden ) { this.emitEvent('reveal'); } }; /** * get style property use for hide/reveal transition end * @param {String} styleProperty - hiddenStyle/visibleStyle * @returns {String} */ proto.getHideRevealTransitionEndProperty = function( styleProperty ) { var optionStyle = this.layout.options[ styleProperty ]; // use opacity if ( optionStyle.opacity ) { return 'opacity'; } // get first property for ( var prop in optionStyle ) { return prop; } }; proto.hide = function() { // set flag this.isHidden = true; // remove display: none this.css({ display: '' }); var options = this.layout.options; var onTransitionEnd = {}; var transitionEndProperty = this.getHideRevealTransitionEndProperty('hiddenStyle'); onTransitionEnd[ transitionEndProperty ] = this.onHideTransitionEnd; this.transition({ from: options.visibleStyle, to: options.hiddenStyle, // keep hidden stuff hidden isCleaning: true, onTransitionEnd: onTransitionEnd }); }; proto.onHideTransitionEnd = function() { // check if still hidden // during transition, item may have been un-hidden if ( this.isHidden ) { this.css({ display: 'none' }); this.emitEvent('hide'); } }; proto.destroy = function() { this.css({ position: '', left: '', right: '', top: '', bottom: '', transition: '', transform: '' }); }; return Item; })); /***/ }), /***/ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js": /*!*********************************************************************!*\ !*** ./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js ***! \*********************************************************************/ /***/ (function(module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__;/** * EvEmitter v1.1.0 * Lil' event emitter * MIT License */ /* jshint unused: true, undef: true, strict: true */ ( function( global, factory ) { // universal module definition /* jshint strict: false */ /* globals define, module, window */ if ( true ) { // AMD - RequireJS !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }( typeof window != 'undefined' ? window : this, function() { "use strict"; function EvEmitter() {} var proto = EvEmitter.prototype; proto.on = function( eventName, listener ) { if ( !eventName || !listener ) { return; } // set events hash var events = this._events = this._events || {}; // set listeners array var listeners = events[ eventName ] = events[ eventName ] || []; // only add once if ( listeners.indexOf( listener ) == -1 ) { listeners.push( listener ); } return this; }; proto.once = function( eventName, listener ) { if ( !eventName || !listener ) { return; } // add event this.on( eventName, listener ); // set once flag // set onceEvents hash var onceEvents = this._onceEvents = this._onceEvents || {}; // set onceListeners object var onceListeners = onceEvents[ eventName ] = onceEvents[ eventName ] || {}; // set flag onceListeners[ listener ] = true; return this; }; proto.off = function( eventName, listener ) { var listeners = this._events && this._events[ eventName ]; if ( !listeners || !listeners.length ) { return; } var index = listeners.indexOf( listener ); if ( index != -1 ) { listeners.splice( index, 1 ); } return this; }; proto.emitEvent = function( eventName, args ) { var listeners = this._events && this._events[ eventName ]; if ( !listeners || !listeners.length ) { return; } // copy over to avoid interference if .off() in listener listeners = listeners.slice(0); args = args || []; // once stuff var onceListeners = this._onceEvents && this._onceEvents[ eventName ]; for ( var i=0; i < listeners.length; i++ ) { var listener = listeners[i] var isOnce = onceListeners && onceListeners[ listener ]; if ( isOnce ) { // remove listener // remove before trigger to prevent recursion this.off( eventName, listener ); // unset once flag delete onceListeners[ listener ]; } // trigger listener listener.apply( this, args ); } return this; }; proto.allOff = function() { delete this._events; delete this._onceEvents; }; return EvEmitter; })); /***/ }), /***/ "./node_modules/outlayer/outlayer.js": /*!*******************************************!*\ !*** ./node_modules/outlayer/outlayer.js ***! \*******************************************/ /***/ ((module, exports, __webpack_require__) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! * Outlayer v2.1.1 * the brains and guts of a layout library * MIT license */ ( function( window, factory ) { 'use strict'; // universal module definition /* jshint strict: false */ /* globals define, module, require */ if ( true ) { // AMD - RequireJS !(__WEBPACK_AMD_DEFINE_ARRAY__ = [ __webpack_require__(/*! ev-emitter/ev-emitter */ "./node_modules/outlayer/node_modules/ev-emitter/ev-emitter.js"), __webpack_require__(/*! get-size/get-size */ "./node_modules/get-size/get-size.js"), __webpack_require__(/*! fizzy-ui-utils/utils */ "./node_modules/fizzy-ui-utils/utils.js"), __webpack_require__(/*! ./item */ "./node_modules/outlayer/item.js") ], __WEBPACK_AMD_DEFINE_RESULT__ = (function( EvEmitter, getSize, utils, Item ) { return factory( window, EvEmitter, getSize, utils, Item); }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }( window, function factory( window, EvEmitter, getSize, utils, Item ) { 'use strict'; // ----- vars ----- // var console = window.console; var jQuery = window.jQuery; var noop = function() {}; // -------------------------- Outlayer -------------------------- // // globally unique identifiers var GUID = 0; // internal store of all Outlayer intances var instances = {}; /** * @param {Element, String} element * @param {Object} options * @constructor */ function Outlayer( element, options ) { var queryElement = utils.getQueryElement( element ); if ( !queryElement ) { if ( console ) { console.error( 'Bad element for ' + this.constructor.namespace + ': ' + ( queryElement || element ) ); } return; } this.element = queryElement; // add jQuery if ( jQuery ) { this.$element = jQuery( this.element ); } // options this.options = utils.extend( {}, this.constructor.defaults ); this.option( options ); // add id for Outlayer.getFromElement var id = ++GUID; this.element.outlayerGUID = id; // expando instances[ id ] = this; // associate via id // kick it off this._create(); var isInitLayout = this._getOption('initLayout'); if ( isInitLayout ) { this.layout(); } } // settings are for internal use only Outlayer.namespace = 'outlayer'; Outlayer.Item = Item; // default options Outlayer.defaults = { containerStyle: { position: 'relative' }, initLayout: true, originLeft: true, originTop: true, resize: true, resizeContainer: true, // item options transitionDuration: '0.4s', hiddenStyle: { opacity: 0, transform: 'scale(0.001)' }, visibleStyle: { opacity: 1, transform: 'scale(1)' } }; var proto = Outlayer.prototype; // inherit EvEmitter utils.extend( proto, EvEmitter.prototype ); /** * set options * @param {Object} opts */ proto.option = function( opts ) { utils.extend( this.options, opts ); }; /** * get backwards compatible option value, check old name */ proto._getOption = function( option ) { var oldOption = this.constructor.compatOptions[ option ]; return oldOption && this.options[ oldOption ] !== undefined ? this.options[ oldOption ] : this.options[ option ]; }; Outlayer.compatOptions = { // currentName: oldName initLayout: 'isInitLayout', horizontal: 'isHorizontal', layoutInstant: 'isLayoutInstant', originLeft: 'isOriginLeft', originTop: 'isOriginTop', resize: 'isResizeBound', resizeContainer: 'isResizingContainer' }; proto._create = function() { // get items from children this.reloadItems(); // elements that affect layout, but are not laid out this.stamps = []; this.stamp( this.options.stamp ); // set container style utils.extend( this.element.style, this.options.containerStyle ); // bind resize method var canBindResize = this._getOption('resize'); if ( canBindResize ) { this.bindResize(); } }; // goes through all children again and gets bricks in proper order proto.reloadItems = function() { // collection of item elements this.items = this._itemize( this.element.children ); }; /** * turn elements into Outlayer.Items to be used in layout * @param {Array or NodeList or HTMLElement} elems * @returns {Array} items - collection of new Outlayer Items */ proto._itemize = function( elems ) { var itemElems = this._filterFindItemElements( elems ); var Item = this.constructor.Item; // create new Outlayer Items for collection var items = []; for ( var i=0; i < itemElems.length; i++ ) { var elem = itemElems[i]; var item = new Item( elem, this ); items.push( item ); } return items; }; /** * get item elements to be used in layout * @param {Array or NodeList or HTMLElement} elems * @returns {Array} items - item elements */ proto._filterFindItemElements = function( elems ) { return utils.filterFindElements( elems, this.options.itemSelector ); }; /** * getter method for getting item elements * @returns {Array} elems - collection of item elements */ proto.getItemElements = function() { return this.items.map( function( item ) { return item.element; }); }; // ----- init & layout ----- // /** * lays out all items */ proto.layout = function() { this._resetLayout(); this._manageStamps(); // don't animate first layout var layoutInstant = this._getOption('layoutInstant'); var isInstant = layoutInstant !== undefined ? layoutInstant : !this._isLayoutInited; this.layoutItems( this.items, isInstant ); // flag for initalized this._isLayoutInited = true; }; // _init is alias for layout proto._init = proto.layout; /** * logic before any new layout */ proto._resetLayout = function() { this.getSize(); }; proto.getSize = function() { this.size = getSize( this.element ); }; /** * get measurement from option, for columnWidth, rowHeight, gutter * if option is String -> get element from selector string, & get size of element * if option is Element -> get size of element * else use option as a number * * @param {String} measurement * @param {String} size - width or height * @private */ proto._getMeasurement = function( measurement, size ) { var option = this.options[ measurement ]; var elem; if ( !option ) { // default to 0 this[ measurement ] = 0; } else { // use option as an element if ( typeof option == 'string' ) { elem = this.element.querySelector( option ); } else if ( option instanceof HTMLElement ) { elem = option; } // use size of element, if element this[ measurement ] = elem ? getSize( elem )[ size ] : option; } }; /** * layout a collection of item elements * @api public */ proto.layoutItems = function( items, isInstant ) { items = this._getItemsForLayout( items ); this._layoutItems( items, isInstant ); this._postLayout(); }; /** * get the items to be laid out * you may want to skip over some items * @param {Array} items * @returns {Array} items */ proto._getItemsForLayout = function( items ) { return items.filter( function( item ) { return !item.isIgnored; }); }; /** * layout items * @param {Array} items * @param {Boolean} isInstant */ proto._layoutItems = function( items, isInstant ) { this._emitCompleteOnItems( 'layout', items ); if ( !items || !items.length ) { // no items, emit event with empty array return; } var queue = []; items.forEach( function( item ) { // get x/y object from method var position = this._getItemLayoutPosition( item ); // enqueue position.item = item; position.isInstant = isInstant || item.isLayoutInstant; queue.push( position ); }, this ); this._processLayoutQueue( queue ); }; /** * get item layout position * @param {Outlayer.Item} item * @returns {Object} x and y position */ proto._getItemLayoutPosition = function( /* item */ ) { return { x: 0, y: 0 }; }; /** * iterate over array and position each item * Reason being - separating this logic prevents 'layout invalidation' * thx @paul_irish * @param {Array} queue */ proto._processLayoutQueue = function( queue ) { this.updateStagger(); queue.forEach( function( obj, i ) { this._positionItem( obj.item, obj.x, obj.y, obj.isInstant, i ); }, this ); }; // set stagger from option in milliseconds number proto.updateStagger = function() { var stagger = this.options.stagger; if ( stagger === null || stagger === undefined ) { this.stagger = 0; return; } this.stagger = getMilliseconds( stagger ); return this.stagger; }; /** * Sets position of item in DOM * @param {Outlayer.Item} item * @param {Number} x - horizontal position * @param {Number} y - vertical position * @param {Boolean} isInstant - disables transitions */ proto._positionItem = function( item, x, y, isInstant, i ) { if ( isInstant ) { // if not transition, just set CSS item.goTo( x, y ); } else { item.stagger( i * this.stagger ); item.moveTo( x, y ); } }; /** * Any logic you want to do after each layout, * i.e. size the container */ proto._postLayout = function() { this.resizeContainer(); }; proto.resizeContainer = function() { var isResizingContainer = this._getOption('resizeContainer'); if ( !isResizingContainer ) { return; } var size = this._getContainerSize(); if ( size ) { this._setContainerMeasure( size.width, true ); this._setContainerMeasure( size.height, false ); } }; /** * Sets width or height of container if returned * @returns {Object} size * @param {Number} width * @param {Number} height */ proto._getContainerSize = noop; /** * @param {Number} measure - size of width or height * @param {Boolean} isWidth */ proto._setContainerMeasure = function( measure, isWidth ) { if ( measure === undefined ) { return; } var elemSize = this.size; // add padding and border width if border box if ( elemSize.isBorderBox ) { measure += isWidth ? elemSize.paddingLeft + elemSize.paddingRight + elemSize.borderLeftWidth + elemSize.borderRightWidth : elemSize.paddingBottom + elemSize.paddingTop + elemSize.borderTopWidth + elemSize.borderBottomWidth; } measure = Math.max( measure, 0 ); this.element.style[ isWidth ? 'width' : 'height' ] = measure + 'px'; }; /** * emit eventComplete on a collection of items events * @param {String} eventName * @param {Array} items - Outlayer.Items */ proto._emitCompleteOnItems = function( eventName, items ) { var _this = this; function onComplete() { _this.dispatchEvent( eventName + 'Complete', null, [ items ] ); } var count = items.length; if ( !items || !count ) { onComplete(); return; } var doneCount = 0; function tick() { doneCount++; if ( doneCount == count ) { onComplete(); } } // bind callback items.forEach( function( item ) { item.once( eventName, tick ); }); }; /** * emits events via EvEmitter and jQuery events * @param {String} type - name of event * @param {Event} event - original event * @param {Array} args - extra arguments */ proto.dispatchEvent = function( type, event, args ) { // add original event to arguments var emitArgs = event ? [ event ].concat( args ) : args; this.emitEvent( type, emitArgs ); if ( jQuery ) { // set this.$element this.$element = this.$element || jQuery( this.element ); if ( event ) { // create jQuery event var $event = jQuery.Event( event ); $event.type = type; this.$element.trigger( $event, args ); } else { // just trigger with type if no event available this.$element.trigger( type, args ); } } }; // -------------------------- ignore & stamps -------------------------- // /** * keep item in collection, but do not lay it out * ignored items do not get skipped in layout * @param {Element} elem */ proto.ignore = function( elem ) { var item = this.getItem( elem ); if ( item ) { item.isIgnored = true; } }; /** * return item to layout collection * @param {Element} elem */ proto.unignore = function( elem ) { var item = this.getItem( elem ); if ( item ) { delete item.isIgnored; } }; /** * adds elements to stamps * @param {NodeList, Array, Element, or String} elems */ proto.stamp = function( elems ) { elems = this._find( elems ); if ( !elems ) { return; } this.stamps = this.stamps.concat( elems ); // ignore elems.forEach( this.ignore, this ); }; /** * removes elements to stamps * @param {NodeList, Array, or Element} elems */ proto.unstamp = function( elems ) { elems = this._find( elems ); if ( !elems ){ return; } elems.forEach( function( elem ) { // filter out removed stamp elements utils.removeFrom( this.stamps, elem ); this.unignore( elem ); }, this ); }; /** * finds child elements * @param {NodeList, Array, Element, or String} elems * @returns {Array} elems */ proto._find = function( elems ) { if ( !elems ) { return; } // if string, use argument as selector string if ( typeof elems == 'string' ) { elems = this.element.querySelectorAll( elems ); } elems = utils.makeArray( elems ); return elems; }; proto._manageStamps = function() { if ( !this.stamps || !this.stamps.length ) { return; } this._getBoundingRect(); this.stamps.forEach( this._manageStamp, this ); }; // update boundingLeft / Top proto._getBoundingRect = function() { // get bounding rect for container element var boundingRect = this.element.getBoundingClientRect(); var size = this.size; this._boundingRect = { left: boundingRect.left + size.paddingLeft + size.borderLeftWidth, top: boundingRect.top + size.paddingTop + size.borderTopWidth, right: boundingRect.right - ( size.paddingRight + size.borderRightWidth ), bottom: boundingRect.bottom - ( size.paddingBottom + size.borderBottomWidth ) }; }; /** * @param {Element} stamp **/ proto._manageStamp = noop; /** * get x/y position of element relative to container element * @param {Element} elem * @returns {Object} offset - has left, top, right, bottom */ proto._getElementOffset = function( elem ) { var boundingRect = elem.getBoundingClientRect(); var thisRect = this._boundingRect; var size = getSize( elem ); var offset = { left: boundingRect.left - thisRect.left - size.marginLeft, top: boundingRect.top - thisRect.top - size.marginTop, right: thisRect.right - boundingRect.right - size.marginRight, bottom: thisRect.bottom - boundingRect.bottom - size.marginBottom }; return offset; }; // -------------------------- resize -------------------------- // // enable event handlers for listeners // i.e. resize -> onresize proto.handleEvent = utils.handleEvent; /** * Bind layout to window resizing */ proto.bindResize = function() { window.addEventListener( 'resize', this ); this.isResizeBound = true; }; /** * Unbind layout to window resizing */ proto.unbindResize = function() { window.removeEventListener( 'resize', this ); this.isResizeBound = false; }; proto.onresize = function() { this.resize(); }; utils.debounceMethod( Outlayer, 'onresize', 100 ); proto.resize = function() { // don't trigger if size did not change // or if resize was unbound. See #9 if ( !this.isResizeBound || !this.needsResizeLayout() ) { return; } this.layout(); }; /** * check if layout is needed post layout * @returns Boolean */ proto.needsResizeLayout = function() { var size = getSize( this.element ); // check that this.size and size are there // IE8 triggers resize on body size change, so they might not be var hasSizes = this.size && size; return hasSizes && size.innerWidth !== this.size.innerWidth; }; // -------------------------- methods -------------------------- // /** * add items to Outlayer instance * @param {Array or NodeList or Element} elems * @returns {Array} items - Outlayer.Items **/ proto.addItems = function( elems ) { var items = this._itemize( elems ); // add items to collection if ( items.length ) { this.items = this.items.concat( items ); } return items; }; /** * Layout newly-appended item elements * @param {Array or NodeList or Element} elems */ proto.appended = function( elems ) { var items = this.addItems( elems ); if ( !items.length ) { return; } // layout and reveal just the new items this.layoutItems( items, true ); this.reveal( items ); }; /** * Layout prepended elements * @param {Array or NodeList or Element} elems */ proto.prepended = function( elems ) { var items = this._itemize( elems ); if ( !items.length ) { return; } // add items to beginning of collection var previousItems = this.items.slice(0); this.items = items.concat( previousItems ); // start new layout this._resetLayout(); this._manageStamps(); // layout new stuff without transition this.layoutItems( items, true ); this.reveal( items ); // layout previous items this.layoutItems( previousItems ); }; /** * reveal a collection of items * @param {Array of Outlayer.Items} items */ proto.reveal = function( items ) { this._emitCompleteOnItems( 'reveal', items ); if ( !items || !items.length ) { return; } var stagger = this.updateStagger(); items.forEach( function( item, i ) { item.stagger( i * stagger ); item.reveal(); }); }; /** * hide a collection of items * @param {Array of Outlayer.Items} items */ proto.hide = function( items ) { this._emitCompleteOnItems( 'hide', items ); if ( !items || !items.length ) { return; } var stagger = this.updateStagger(); items.forEach( function( item, i ) { item.stagger( i * stagger ); item.hide(); }); }; /** * reveal item elements * @param {Array}, {Element}, {NodeList} items */ proto.revealItemElements = function( elems ) { var items = this.getItems( elems ); this.reveal( items ); }; /** * hide item elements * @param {Array}, {Element}, {NodeList} items */ proto.hideItemElements = function( elems ) { var items = this.getItems( elems ); this.hide( items ); }; /** * get Outlayer.Item, given an Element * @param {Element} elem * @param {Function} callback * @returns {Outlayer.Item} item */ proto.getItem = function( elem ) { // loop through items to get the one that matches for ( var i=0; i < this.items.length; i++ ) { var item = this.items[i]; if ( item.element == elem ) { // return item return item; } } }; /** * get collection of Outlayer.Items, given Elements * @param {Array} elems * @returns {Array} items - Outlayer.Items */ proto.getItems = function( elems ) { elems = utils.makeArray( elems ); var items = []; elems.forEach( function( elem ) { var item = this.getItem( elem ); if ( item ) { items.push( item ); } }, this ); return items; }; /** * remove element(s) from instance and DOM * @param {Array or NodeList or Element} elems */ proto.remove = function( elems ) { var removeItems = this.getItems( elems ); this._emitCompleteOnItems( 'remove', removeItems ); // bail if no items to remove if ( !removeItems || !removeItems.length ) { return; } removeItems.forEach( function( item ) { item.remove(); // remove item from collection utils.removeFrom( this.items, item ); }, this ); }; // ----- destroy ----- // // remove and disable Outlayer instance proto.destroy = function() { // clean up dynamic styles var style = this.element.style; style.height = ''; style.position = ''; style.width = ''; // destroy items this.items.forEach( function( item ) { item.destroy(); }); this.unbindResize(); var id = this.element.outlayerGUID; delete instances[ id ]; // remove reference to instance by id delete this.element.outlayerGUID; // remove data for jQuery if ( jQuery ) { jQuery.removeData( this.element, this.constructor.namespace ); } }; // -------------------------- data -------------------------- // /** * get Outlayer instance from element * @param {Element} elem * @returns {Outlayer} */ Outlayer.data = function( elem ) { elem = utils.getQueryElement( elem ); var id = elem && elem.outlayerGUID; return id && instances[ id ]; }; // -------------------------- create Outlayer class -------------------------- // /** * create a layout class * @param {String} namespace */ Outlayer.create = function( namespace, options ) { // sub-class Outlayer var Layout = subclass( Outlayer ); // apply new options and compatOptions Layout.defaults = utils.extend( {}, Outlayer.defaults ); utils.extend( Layout.defaults, options ); Layout.compatOptions = utils.extend( {}, Outlayer.compatOptions ); Layout.namespace = namespace; Layout.data = Outlayer.data; // sub-class Item Layout.Item = subclass( Item ); // -------------------------- declarative -------------------------- // utils.htmlInit( Layout, namespace ); // -------------------------- jQuery bridge -------------------------- // // make into jQuery plugin if ( jQuery && jQuery.bridget ) { jQuery.bridget( namespace, Layout ); } return Layout; }; function subclass( Parent ) { function SubClass() { Parent.apply( this, arguments ); } SubClass.prototype = Object.create( Parent.prototype ); SubClass.prototype.constructor = SubClass; return SubClass; } // ----- helpers ----- // // how many milliseconds are in each unit var msUnits = { ms: 1, s: 1000 }; // munge time-like parameter into millisecond number // '0.4s' -> 40 function getMilliseconds( time ) { if ( typeof time == 'number' ) { return time; } var matches = time.match( /(^\d*\.?\d*)(\w*)/ ); var num = matches && matches[1]; var unit = matches && matches[2]; if ( !num.length ) { return 0; } num = parseFloat( num ); var mult = msUnits[ unit ] || 1; return num * mult; } // ----- fin ----- // // back in global Outlayer.Item = Item; return Outlayer; })); /***/ }), /***/ "./node_modules/react-sortablejs/dist/index.js": /*!*****************************************************!*\ !*** ./node_modules/react-sortablejs/dist/index.js ***! \*****************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { var $8zHUo$sortablejs = __webpack_require__(/*! sortablejs */ "./node_modules/sortablejs/modular/sortable.esm.js"); var $8zHUo$classnames = __webpack_require__(/*! classnames */ "./node_modules/react-sortablejs/node_modules/classnames/index.js"); var $8zHUo$react = __webpack_require__(/*! react */ "react"); var $8zHUo$tinyinvariant = __webpack_require__(/*! tiny-invariant */ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js"); function $parcel$interopDefault(a) { return a && a.__esModule ? a.default : a; } function $parcel$export(e, n, v, s) { Object.defineProperty(e, n, {get: v, set: s, enumerable: true, configurable: true}); } function $parcel$exportWildcard(dest, source) { Object.keys(source).forEach(function(key) { if (key === 'default' || key === '__esModule' || dest.hasOwnProperty(key)) { return; } Object.defineProperty(dest, key, { enumerable: true, get: function get() { return source[key]; } }); }); return dest; } $parcel$export(module.exports, "Sortable", () => $882b6d93070905b3$re_export$Sortable); $parcel$export(module.exports, "Direction", () => $882b6d93070905b3$re_export$Direction); $parcel$export(module.exports, "DOMRect", () => $882b6d93070905b3$re_export$DOMRect); $parcel$export(module.exports, "GroupOptions", () => $882b6d93070905b3$re_export$GroupOptions); $parcel$export(module.exports, "MoveEvent", () => $882b6d93070905b3$re_export$MoveEvent); $parcel$export(module.exports, "Options", () => $882b6d93070905b3$re_export$Options); $parcel$export(module.exports, "PullResult", () => $882b6d93070905b3$re_export$PullResult); $parcel$export(module.exports, "PutResult", () => $882b6d93070905b3$re_export$PutResult); $parcel$export(module.exports, "SortableEvent", () => $882b6d93070905b3$re_export$SortableEvent); $parcel$export(module.exports, "SortableOptions", () => $882b6d93070905b3$re_export$SortableOptions); $parcel$export(module.exports, "Utils", () => $882b6d93070905b3$re_export$Utils); $parcel$export(module.exports, "ReactSortable", () => $7fe8e3ea572bda7a$export$11bbed9ee0012c13); function $eb03e74f8f7db1f3$export$1d0aa160432dfea5(node) { if (node.parentElement !== null) node.parentElement.removeChild(node); } function $eb03e74f8f7db1f3$export$6d240faa51aa562f(parent, newChild, index) { const refChild = parent.children[index] || null; parent.insertBefore(newChild, refChild); } function $eb03e74f8f7db1f3$export$d7d742816c28cf91(customs) { $eb03e74f8f7db1f3$export$77f49a256021c8de(customs); $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs); } function $eb03e74f8f7db1f3$export$77f49a256021c8de(customs) { customs.forEach((curr)=>$eb03e74f8f7db1f3$export$1d0aa160432dfea5(curr.element)); } function $eb03e74f8f7db1f3$export$a6177d5829f70ebc(customs) { customs.forEach((curr)=>{ $eb03e74f8f7db1f3$export$6d240faa51aa562f(curr.parentElement, curr.element, curr.oldIndex); }); } function $eb03e74f8f7db1f3$export$4655efe700f887a(evt, list) { const mode = $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt); const parentElement = { parentElement: evt.from }; let custom = []; switch(mode){ case "normal": /* eslint-disable */ const item = { element: evt.item, newIndex: evt.newIndex, oldIndex: evt.oldIndex, parentElement: evt.from }; custom = [ item ]; break; case "swap": const drag = { element: evt.item, oldIndex: evt.oldIndex, newIndex: evt.newIndex, ...parentElement }; const swap = { element: evt.swapItem, oldIndex: evt.newIndex, newIndex: evt.oldIndex, ...parentElement }; custom = [ drag, swap ]; break; case "multidrag": custom = evt.oldIndicies.map((curr, index)=>({ element: curr.multiDragElement, oldIndex: curr.index, newIndex: evt.newIndicies[index].index, ...parentElement })); break; } /* eslint-enable */ const customs = $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(custom, list); return customs; } function $eb03e74f8f7db1f3$export$c25cf8080bd305ec(normalized, list) { const a = $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list); const b = $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, a); return b; } function $eb03e74f8f7db1f3$export$be2da95e6167b0bd(normalized, list) { const newList = [ ...list ]; normalized.concat().reverse().forEach((curr)=>newList.splice(curr.oldIndex, 1)); return newList; } function $eb03e74f8f7db1f3$export$eca851ee65ae17e4(normalized, list, evt, clone) { const newList = [ ...list ]; normalized.forEach((curr)=>{ const newItem = clone && evt && clone(curr.item, evt); newList.splice(curr.newIndex, 0, newItem || curr.item); }); return newList; } function $eb03e74f8f7db1f3$export$1fc0f6205829e19c(evt) { if (evt.oldIndicies && evt.oldIndicies.length > 0) return "multidrag"; if (evt.swapItem) return "swap"; return "normal"; } function $eb03e74f8f7db1f3$export$bc06a3af7dc65f53(inputs, list) { const normalized = inputs.map((curr)=>({ ...curr, item: list[curr.oldIndex] })).sort((a, b)=>a.oldIndex - b.oldIndex); return normalized; } function $eb03e74f8f7db1f3$export$7553c81e62e31b7e(props) { /* eslint-disable */ const { list: // react sortable props list , setList: setList , children: children , tag: tag , style: style , className: className , clone: clone , onAdd: // sortable options that have methods we want to overwrite onAdd , onChange: onChange , onChoose: onChoose , onClone: onClone , onEnd: onEnd , onFilter: onFilter , onRemove: onRemove , onSort: onSort , onStart: onStart , onUnchoose: onUnchoose , onUpdate: onUpdate , onMove: onMove , onSpill: onSpill , onSelect: onSelect , onDeselect: onDeselect , ...options } = props; /* eslint-enable */ return options; } /** Holds a global reference for which react element is being dragged */ // @todo - use context to manage this. How does one use 2 different providers? const $7fe8e3ea572bda7a$var$store = { dragging: null }; class $7fe8e3ea572bda7a$export$11bbed9ee0012c13 extends (0, $8zHUo$react.Component) { /* eslint-disable-next-line */ static defaultProps = { clone: (item)=>item }; constructor(props){ super(props); // @todo forward ref this component this.ref = /*#__PURE__*/ (0, $8zHUo$react.createRef)(); // make all state false because we can't change sortable unless a mouse gesture is made. const newList = [ ...props.list ].map((item)=>Object.assign(item, { chosen: false, selected: false })); props.setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); (0, ($parcel$interopDefault($8zHUo$tinyinvariant)))(//@ts-expect-error: Doesn't exist. Will deprecate soon. !props.plugins, ` Plugins prop is no longer supported. Instead, mount it with "Sortable.mount(new MultiDrag())" Please read the updated README.md at https://github.com/SortableJS/react-sortablejs. `); } componentDidMount() { if (this.ref.current === null) return; const newOptions = this.makeOptions(); (0, ($parcel$interopDefault($8zHUo$sortablejs))).create(this.ref.current, newOptions); } componentDidUpdate(prevProps) { if (prevProps.disabled !== this.props.disabled && this.sortable) this.sortable.option("disabled", this.props.disabled); } render() { const { tag: tag , style: style , className: className , id: id } = this.props; const classicProps = { style: style, className: className, id: id }; // if no tag, default to a `div` element. const newTag = !tag || tag === null ? "div" : tag; return /*#__PURE__*/ (0, $8zHUo$react.createElement)(newTag, { // @todo - find a way (perhaps with the callback) to allow AntD components to work ref: this.ref, ...classicProps }, this.getChildren()); } getChildren() { const { children: children , dataIdAttr: dataIdAttr , selectedClass: selectedClass = "sortable-selected" , chosenClass: chosenClass = "sortable-chosen" , dragClass: /* eslint-disable */ dragClass = "sortable-drag" , fallbackClass: fallbackClass = "sortable-falback" , ghostClass: ghostClass = "sortable-ghost" , swapClass: swapClass = "sortable-swap-highlight" , filter: /* eslint-enable */ filter = "sortable-filter" , list: list , } = this.props; // if no children, don't do anything. if (!children || children == null) return null; const dataid = dataIdAttr || "data-id"; /* eslint-disable-next-line */ return (0, $8zHUo$react.Children).map(children, (child, index)=>{ if (child === undefined) return undefined; const item = list[index] || {}; const { className: prevClassName } = child.props; // @todo - handle the function if avalable. I don't think anyone will be doing this soon. const filtered = typeof filter === "string" && { [filter.replace(".", "")]: !!item.filtered }; const className = (0, ($parcel$interopDefault($8zHUo$classnames)))(prevClassName, { [selectedClass]: item.selected, [chosenClass]: item.chosen, ...filtered }); return /*#__PURE__*/ (0, $8zHUo$react.cloneElement)(child, { [dataid]: child.key, className: className }); }); } /** Appends the `sortable` property to this component */ get sortable() { const el = this.ref.current; if (el === null) return null; const key = Object.keys(el).find((k)=>k.includes("Sortable")); if (!key) return null; //@ts-expect-error: fix me. return el[key]; } /** Converts all the props from `ReactSortable` into the `options` object that `Sortable.create(el, [options])` can use. */ makeOptions() { const DOMHandlers = [ "onAdd", "onChoose", "onDeselect", "onEnd", "onRemove", "onSelect", "onSpill", "onStart", "onUnchoose", "onUpdate", ]; const NonDOMHandlers = [ "onChange", "onClone", "onFilter", "onSort", ]; const newOptions = (0, $eb03e74f8f7db1f3$export$7553c81e62e31b7e)(this.props); DOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerPropAndDOM(name)); NonDOMHandlers.forEach((name)=>newOptions[name] = this.prepareOnHandlerProp(name)); /** onMove has 2 arguments and needs to be handled seperately. */ const onMove1 = (evt, originalEvt)=>{ const { onMove: onMove } = this.props; const defaultValue = evt.willInsertAfter || -1; if (!onMove) return defaultValue; const result = onMove(evt, originalEvt, this.sortable, $7fe8e3ea572bda7a$var$store); if (typeof result === "undefined") return false; return result; }; return { ...newOptions, onMove: onMove1 }; } /** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop & an `on[Handler]` ReactSortable method. */ prepareOnHandlerPropAndDOM(evtName) { return (evt)=>{ // call the component prop this.callOnHandlerProp(evt, evtName); // calls state change //@ts-expect-error: until @types multidrag item is in this[evtName](evt); }; } /** Prepares a method that will be used in the sortable options to call an `on[Handler]` prop */ prepareOnHandlerProp(evtName) { return (evt)=>{ // call the component prop this.callOnHandlerProp(evt, evtName); }; } /** Calls the `props.on[Handler]` function */ callOnHandlerProp(evt, evtName) { const propEvent = this.props[evtName]; if (propEvent) propEvent(evt, this.sortable, $7fe8e3ea572bda7a$var$store); } // SORTABLE DOM HANDLING onAdd(evt) { const { list: list , setList: setList , clone: clone } = this.props; /* eslint-disable-next-line */ const otherList = [ ...$7fe8e3ea572bda7a$var$store.dragging.props.list ]; const customs = (0, $eb03e74f8f7db1f3$export$4655efe700f887a)(evt, otherList); (0, $eb03e74f8f7db1f3$export$77f49a256021c8de)(customs); const newList = (0, $eb03e74f8f7db1f3$export$eca851ee65ae17e4)(customs, list, evt, clone).map((item)=>Object.assign(item, { selected: false })); setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } onRemove(evt) { const { list: list , setList: setList } = this.props; const mode = (0, $eb03e74f8f7db1f3$export$1fc0f6205829e19c)(evt); const customs = (0, $eb03e74f8f7db1f3$export$4655efe700f887a)(evt, list); (0, $eb03e74f8f7db1f3$export$a6177d5829f70ebc)(customs); let newList = [ ...list ]; // remove state if not in clone mode. otherwise, keep. if (evt.pullMode !== "clone") newList = (0, $eb03e74f8f7db1f3$export$be2da95e6167b0bd)(customs, newList); else { // switch used to get the clone let customClones = customs; switch(mode){ case "multidrag": customClones = customs.map((item, index)=>({ ...item, element: evt.clones[index] })); break; case "normal": customClones = customs.map((item)=>({ ...item, element: evt.clone })); break; case "swap": default: (0, ($parcel$interopDefault($8zHUo$tinyinvariant)))(true, `mode "${mode}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${mode}" plugin`); } (0, $eb03e74f8f7db1f3$export$77f49a256021c8de)(customClones); // replace selected items with cloned items customs.forEach((curr)=>{ const index = curr.oldIndex; /* eslint-disable-next-line */ const newItem = this.props.clone(curr.item, evt); newList.splice(index, 1, newItem); }); } // remove item.selected from list newList = newList.map((item)=>Object.assign(item, { selected: false })); setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } onUpdate(evt) { const { list: list , setList: setList } = this.props; const customs = (0, $eb03e74f8f7db1f3$export$4655efe700f887a)(evt, list); (0, $eb03e74f8f7db1f3$export$77f49a256021c8de)(customs); (0, $eb03e74f8f7db1f3$export$a6177d5829f70ebc)(customs); const newList = (0, $eb03e74f8f7db1f3$export$c25cf8080bd305ec)(customs, list); return setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } onStart() { $7fe8e3ea572bda7a$var$store.dragging = this; } onEnd() { $7fe8e3ea572bda7a$var$store.dragging = null; } onChoose(evt) { const { list: list , setList: setList } = this.props; const newList = list.map((item, index)=>{ let newItem = item; if (index === evt.oldIndex) newItem = Object.assign(item, { chosen: true }); return newItem; }); setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } onUnchoose(evt) { const { list: list , setList: setList } = this.props; const newList = list.map((item, index)=>{ let newItem = item; if (index === evt.oldIndex) newItem = Object.assign(newItem, { chosen: false }); return newItem; }); setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } onSpill(evt) { const { removeOnSpill: removeOnSpill , revertOnSpill: revertOnSpill } = this.props; if (removeOnSpill && !revertOnSpill) (0, $eb03e74f8f7db1f3$export$1d0aa160432dfea5)(evt.item); } onSelect(evt) { const { list: list , setList: setList } = this.props; const newList = list.map((item)=>Object.assign(item, { selected: false })); evt.newIndicies.forEach((curr)=>{ const index = curr.index; if (index === -1) { console.log(`"${evt.type}" had indice of "${curr.index}", which is probably -1 and doesn't usually happen here.`); console.log(evt); return; } newList[index].selected = true; }); setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } onDeselect(evt) { const { list: list , setList: setList } = this.props; const newList = list.map((item)=>Object.assign(item, { selected: false })); evt.newIndicies.forEach((curr)=>{ const index = curr.index; if (index === -1) return; newList[index].selected = true; }); setList(newList, this.sortable, $7fe8e3ea572bda7a$var$store); } } var $faefaad95e5fcca0$exports = {}; $parcel$exportWildcard(module.exports, $faefaad95e5fcca0$exports); //# sourceMappingURL=index.js.map /***/ }), /***/ "./node_modules/react-sortablejs/node_modules/classnames/index.js": /*!************************************************************************!*\ !*** ./node_modules/react-sortablejs/node_modules/classnames/index.js ***! \************************************************************************/ /***/ ((module, exports) => { var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ /* global define */ (function () { 'use strict'; var hasOwn = {}.hasOwnProperty; function classNames() { var classes = []; for (var i = 0; i < arguments.length; i++) { var arg = arguments[i]; if (!arg) continue; var argType = typeof arg; if (argType === 'string' || argType === 'number') { classes.push(arg); } else if (Array.isArray(arg)) { if (arg.length) { var inner = classNames.apply(null, arg); if (inner) { classes.push(inner); } } } else if (argType === 'object') { if (arg.toString === Object.prototype.toString) { for (var key in arg) { if (hasOwn.call(arg, key) && arg[key]) { classes.push(key); } } } else { classes.push(arg.toString()); } } } return classes.join(' '); } if ( true && module.exports) { classNames.default = classNames; module.exports = classNames; } else if (true) { // register as 'classnames', consistent with npm package name !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () { return classNames; }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else {} }()); /***/ }), /***/ "./node_modules/sortablejs/modular/sortable.esm.js": /*!*********************************************************!*\ !*** ./node_modules/sortablejs/modular/sortable.esm.js ***! \*********************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ MultiDrag: () => (/* binding */ MultiDragPlugin), /* harmony export */ Sortable: () => (/* binding */ Sortable), /* harmony export */ Swap: () => (/* binding */ SwapPlugin), /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) /* harmony export */ }); /**! * Sortable 1.15.0 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */ 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 _objectSpread2(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) { _defineProperty(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 _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function (obj) { return typeof obj; }; } else { _typeof = function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } 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; } function _extends() { _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); } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); } 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); } 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; } 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."); } var version = "1.15.0"; function userAgent(pattern) { if (typeof window !== 'undefined' && window.navigator) { return !! /*@__PURE__*/navigator.userAgent.match(pattern); } } var IE11OrLess = userAgent(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i); var Edge = userAgent(/Edge/i); var FireFox = userAgent(/firefox/i); var Safari = userAgent(/safari/i) && !userAgent(/chrome/i) && !userAgent(/android/i); var IOS = userAgent(/iP(ad|od|hone)/i); var ChromeForAndroid = userAgent(/chrome/i) && userAgent(/android/i); var captureMode = { capture: false, passive: false }; function on(el, event, fn) { el.addEventListener(event, fn, !IE11OrLess && captureMode); } function off(el, event, fn) { el.removeEventListener(event, fn, !IE11OrLess && captureMode); } function matches( /**HTMLElement*/ el, /**String*/ selector) { if (!selector) return; selector[0] === '>' && (selector = selector.substring(1)); if (el) { try { if (el.matches) { return el.matches(selector); } else if (el.msMatchesSelector) { return el.msMatchesSelector(selector); } else if (el.webkitMatchesSelector) { return el.webkitMatchesSelector(selector); } } catch (_) { return false; } } return false; } function getParentOrHost(el) { return el.host && el !== document && el.host.nodeType ? el.host : el.parentNode; } function closest( /**HTMLElement*/ el, /**String*/ selector, /**HTMLElement*/ ctx, includeCTX) { if (el) { ctx = ctx || document; do { if (selector != null && (selector[0] === '>' ? el.parentNode === ctx && matches(el, selector) : matches(el, selector)) || includeCTX && el === ctx) { return el; } if (el === ctx) break; /* jshint boss:true */ } while (el = getParentOrHost(el)); } return null; } var R_SPACE = /\s+/g; function toggleClass(el, name, state) { if (el && name) { if (el.classList) { el.classList[state ? 'add' : 'remove'](name); } else { var className = (' ' + el.className + ' ').replace(R_SPACE, ' ').replace(' ' + name + ' ', ' '); el.className = (className + (state ? ' ' + name : '')).replace(R_SPACE, ' '); } } } function css(el, prop, val) { var style = el && el.style; if (style) { if (val === void 0) { if (document.defaultView && document.defaultView.getComputedStyle) { val = document.defaultView.getComputedStyle(el, ''); } else if (el.currentStyle) { val = el.currentStyle; } return prop === void 0 ? val : val[prop]; } else { if (!(prop in style) && prop.indexOf('webkit') === -1) { prop = '-webkit-' + prop; } style[prop] = val + (typeof val === 'string' ? '' : 'px'); } } } function matrix(el, selfOnly) { var appliedTransforms = ''; if (typeof el === 'string') { appliedTransforms = el; } else { do { var transform = css(el, 'transform'); if (transform && transform !== 'none') { appliedTransforms = transform + ' ' + appliedTransforms; } /* jshint boss:true */ } while (!selfOnly && (el = el.parentNode)); } var matrixFn = window.DOMMatrix || window.WebKitCSSMatrix || window.CSSMatrix || window.MSCSSMatrix; /*jshint -W056 */ return matrixFn && new matrixFn(appliedTransforms); } function find(ctx, tagName, iterator) { if (ctx) { var list = ctx.getElementsByTagName(tagName), i = 0, n = list.length; if (iterator) { for (; i < n; i++) { iterator(list[i], i); } } return list; } return []; } function getWindowScrollingElement() { var scrollingElement = document.scrollingElement; if (scrollingElement) { return scrollingElement; } else { return document.documentElement; } } /** * Returns the "bounding client rect" of given element * @param {HTMLElement} el The element whose boundingClientRect is wanted * @param {[Boolean]} relativeToContainingBlock Whether the rect should be relative to the containing block of (including) the container * @param {[Boolean]} relativeToNonStaticParent Whether the rect should be relative to the relative parent of (including) the contaienr * @param {[Boolean]} undoScale Whether the container's scale() should be undone * @param {[HTMLElement]} container The parent the element will be placed in * @return {Object} The boundingClientRect of el, with specified adjustments */ function getRect(el, relativeToContainingBlock, relativeToNonStaticParent, undoScale, container) { if (!el.getBoundingClientRect && el !== window) return; var elRect, top, left, bottom, right, height, width; if (el !== window && el.parentNode && el !== getWindowScrollingElement()) { elRect = el.getBoundingClientRect(); top = elRect.top; left = elRect.left; bottom = elRect.bottom; right = elRect.right; height = elRect.height; width = elRect.width; } else { top = 0; left = 0; bottom = window.innerHeight; right = window.innerWidth; height = window.innerHeight; width = window.innerWidth; } if ((relativeToContainingBlock || relativeToNonStaticParent) && el !== window) { // Adjust for translate() container = container || el.parentNode; // solves #1123 (see: https://stackoverflow.com/a/37953806/6088312) // Not needed on <= IE11 if (!IE11OrLess) { do { if (container && container.getBoundingClientRect && (css(container, 'transform') !== 'none' || relativeToNonStaticParent && css(container, 'position') !== 'static')) { var containerRect = container.getBoundingClientRect(); // Set relative to edges of padding box of container top -= containerRect.top + parseInt(css(container, 'border-top-width')); left -= containerRect.left + parseInt(css(container, 'border-left-width')); bottom = top + elRect.height; right = left + elRect.width; break; } /* jshint boss:true */ } while (container = container.parentNode); } } if (undoScale && el !== window) { // Adjust for scale() var elMatrix = matrix(container || el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d; if (elMatrix) { top /= scaleY; left /= scaleX; width /= scaleX; height /= scaleY; bottom = top + height; right = left + width; } } return { top: top, left: left, bottom: bottom, right: right, width: width, height: height }; } /** * Checks if a side of an element is scrolled past a side of its parents * @param {HTMLElement} el The element who's side being scrolled out of view is in question * @param {String} elSide Side of the element in question ('top', 'left', 'right', 'bottom') * @param {String} parentSide Side of the parent in question ('top', 'left', 'right', 'bottom') * @return {HTMLElement} The parent scroll element that the el's side is scrolled past, or null if there is no such element */ function isScrolledPast(el, elSide, parentSide) { var parent = getParentAutoScrollElement(el, true), elSideVal = getRect(el)[elSide]; /* jshint boss:true */ while (parent) { var parentSideVal = getRect(parent)[parentSide], visible = void 0; if (parentSide === 'top' || parentSide === 'left') { visible = elSideVal >= parentSideVal; } else { visible = elSideVal <= parentSideVal; } if (!visible) return parent; if (parent === getWindowScrollingElement()) break; parent = getParentAutoScrollElement(parent, false); } return false; } /** * Gets nth child of el, ignoring hidden children, sortable's elements (does not ignore clone if it's visible) * and non-draggable elements * @param {HTMLElement} el The parent element * @param {Number} childNum The index of the child * @param {Object} options Parent Sortable's options * @return {HTMLElement} The child at index childNum, or null if not found */ function getChild(el, childNum, options, includeDragEl) { var currentChild = 0, i = 0, children = el.children; while (i < children.length) { if (children[i].style.display !== 'none' && children[i] !== Sortable.ghost && (includeDragEl || children[i] !== Sortable.dragged) && closest(children[i], options.draggable, el, false)) { if (currentChild === childNum) { return children[i]; } currentChild++; } i++; } return null; } /** * Gets the last child in the el, ignoring ghostEl or invisible elements (clones) * @param {HTMLElement} el Parent element * @param {selector} selector Any other elements that should be ignored * @return {HTMLElement} The last child, ignoring ghostEl */ function lastChild(el, selector) { var last = el.lastElementChild; while (last && (last === Sortable.ghost || css(last, 'display') === 'none' || selector && !matches(last, selector))) { last = last.previousElementSibling; } return last || null; } /** * Returns the index of an element within its parent for a selected set of * elements * @param {HTMLElement} el * @param {selector} selector * @return {number} */ function index(el, selector) { var index = 0; if (!el || !el.parentNode) { return -1; } /* jshint boss:true */ while (el = el.previousElementSibling) { if (el.nodeName.toUpperCase() !== 'TEMPLATE' && el !== Sortable.clone && (!selector || matches(el, selector))) { index++; } } return index; } /** * Returns the scroll offset of the given element, added with all the scroll offsets of parent elements. * The value is returned in real pixels. * @param {HTMLElement} el * @return {Array} Offsets in the format of [left, top] */ function getRelativeScrollOffset(el) { var offsetLeft = 0, offsetTop = 0, winScroller = getWindowScrollingElement(); if (el) { do { var elMatrix = matrix(el), scaleX = elMatrix.a, scaleY = elMatrix.d; offsetLeft += el.scrollLeft * scaleX; offsetTop += el.scrollTop * scaleY; } while (el !== winScroller && (el = el.parentNode)); } return [offsetLeft, offsetTop]; } /** * Returns the index of the object within the given array * @param {Array} arr Array that may or may not hold the object * @param {Object} obj An object that has a key-value pair unique to and identical to a key-value pair in the object you want to find * @return {Number} The index of the object in the array, or -1 */ function indexOfObject(arr, obj) { for (var i in arr) { if (!arr.hasOwnProperty(i)) continue; for (var key in obj) { if (obj.hasOwnProperty(key) && obj[key] === arr[i][key]) return Number(i); } } return -1; } function getParentAutoScrollElement(el, includeSelf) { // skip to window if (!el || !el.getBoundingClientRect) return getWindowScrollingElement(); var elem = el; var gotSelf = false; do { // we don't need to get elem css if it isn't even overflowing in the first place (performance) if (elem.clientWidth < elem.scrollWidth || elem.clientHeight < elem.scrollHeight) { var elemCSS = css(elem); if (elem.clientWidth < elem.scrollWidth && (elemCSS.overflowX == 'auto' || elemCSS.overflowX == 'scroll') || elem.clientHeight < elem.scrollHeight && (elemCSS.overflowY == 'auto' || elemCSS.overflowY == 'scroll')) { if (!elem.getBoundingClientRect || elem === document.body) return getWindowScrollingElement(); if (gotSelf || includeSelf) return elem; gotSelf = true; } } /* jshint boss:true */ } while (elem = elem.parentNode); return getWindowScrollingElement(); } function extend(dst, src) { if (dst && src) { for (var key in src) { if (src.hasOwnProperty(key)) { dst[key] = src[key]; } } } return dst; } function isRectEqual(rect1, rect2) { return Math.round(rect1.top) === Math.round(rect2.top) && Math.round(rect1.left) === Math.round(rect2.left) && Math.round(rect1.height) === Math.round(rect2.height) && Math.round(rect1.width) === Math.round(rect2.width); } var _throttleTimeout; function throttle(callback, ms) { return function () { if (!_throttleTimeout) { var args = arguments, _this = this; if (args.length === 1) { callback.call(_this, args[0]); } else { callback.apply(_this, args); } _throttleTimeout = setTimeout(function () { _throttleTimeout = void 0; }, ms); } }; } function cancelThrottle() { clearTimeout(_throttleTimeout); _throttleTimeout = void 0; } function scrollBy(el, x, y) { el.scrollLeft += x; el.scrollTop += y; } function clone(el) { var Polymer = window.Polymer; var $ = window.jQuery || window.Zepto; if (Polymer && Polymer.dom) { return Polymer.dom(el).cloneNode(true); } else if ($) { return $(el).clone(true)[0]; } else { return el.cloneNode(true); } } function setRect(el, rect) { css(el, 'position', 'absolute'); css(el, 'top', rect.top); css(el, 'left', rect.left); css(el, 'width', rect.width); css(el, 'height', rect.height); } function unsetRect(el) { css(el, 'position', ''); css(el, 'top', ''); css(el, 'left', ''); css(el, 'width', ''); css(el, 'height', ''); } var expando = 'Sortable' + new Date().getTime(); function AnimationStateManager() { var animationStates = [], animationCallbackId; return { captureAnimationState: function captureAnimationState() { animationStates = []; if (!this.options.animation) return; var children = [].slice.call(this.el.children); children.forEach(function (child) { if (css(child, 'display') === 'none' || child === Sortable.ghost) return; animationStates.push({ target: child, rect: getRect(child) }); var fromRect = _objectSpread2({}, animationStates[animationStates.length - 1].rect); // If animating: compensate for current animation if (child.thisAnimationDuration) { var childMatrix = matrix(child, true); if (childMatrix) { fromRect.top -= childMatrix.f; fromRect.left -= childMatrix.e; } } child.fromRect = fromRect; }); }, addAnimationState: function addAnimationState(state) { animationStates.push(state); }, removeAnimationState: function removeAnimationState(target) { animationStates.splice(indexOfObject(animationStates, { target: target }), 1); }, animateAll: function animateAll(callback) { var _this = this; if (!this.options.animation) { clearTimeout(animationCallbackId); if (typeof callback === 'function') callback(); return; } var animating = false, animationTime = 0; animationStates.forEach(function (state) { var time = 0, target = state.target, fromRect = target.fromRect, toRect = getRect(target), prevFromRect = target.prevFromRect, prevToRect = target.prevToRect, animatingRect = state.rect, targetMatrix = matrix(target, true); if (targetMatrix) { // Compensate for current animation toRect.top -= targetMatrix.f; toRect.left -= targetMatrix.e; } target.toRect = toRect; if (target.thisAnimationDuration) { // Could also check if animatingRect is between fromRect and toRect if (isRectEqual(prevFromRect, toRect) && !isRectEqual(fromRect, toRect) && // Make sure animatingRect is on line between toRect & fromRect (animatingRect.top - toRect.top) / (animatingRect.left - toRect.left) === (fromRect.top - toRect.top) / (fromRect.left - toRect.left)) { // If returning to same place as started from animation and on same axis time = calculateRealTime(animatingRect, prevFromRect, prevToRect, _this.options); } } // if fromRect != toRect: animate if (!isRectEqual(toRect, fromRect)) { target.prevFromRect = fromRect; target.prevToRect = toRect; if (!time) { time = _this.options.animation; } _this.animate(target, animatingRect, toRect, time); } if (time) { animating = true; animationTime = Math.max(animationTime, time); clearTimeout(target.animationResetTimer); target.animationResetTimer = setTimeout(function () { target.animationTime = 0; target.prevFromRect = null; target.fromRect = null; target.prevToRect = null; target.thisAnimationDuration = null; }, time); target.thisAnimationDuration = time; } }); clearTimeout(animationCallbackId); if (!animating) { if (typeof callback === 'function') callback(); } else { animationCallbackId = setTimeout(function () { if (typeof callback === 'function') callback(); }, animationTime); } animationStates = []; }, animate: function animate(target, currentRect, toRect, duration) { if (duration) { css(target, 'transition', ''); css(target, 'transform', ''); var elMatrix = matrix(this.el), scaleX = elMatrix && elMatrix.a, scaleY = elMatrix && elMatrix.d, translateX = (currentRect.left - toRect.left) / (scaleX || 1), translateY = (currentRect.top - toRect.top) / (scaleY || 1); target.animatingX = !!translateX; target.animatingY = !!translateY; css(target, 'transform', 'translate3d(' + translateX + 'px,' + translateY + 'px,0)'); this.forRepaintDummy = repaint(target); // repaint css(target, 'transition', 'transform ' + duration + 'ms' + (this.options.easing ? ' ' + this.options.easing : '')); css(target, 'transform', 'translate3d(0,0,0)'); typeof target.animated === 'number' && clearTimeout(target.animated); target.animated = setTimeout(function () { css(target, 'transition', ''); css(target, 'transform', ''); target.animated = false; target.animatingX = false; target.animatingY = false; }, duration); } } }; } function repaint(target) { return target.offsetWidth; } function calculateRealTime(animatingRect, fromRect, toRect, options) { return Math.sqrt(Math.pow(fromRect.top - animatingRect.top, 2) + Math.pow(fromRect.left - animatingRect.left, 2)) / Math.sqrt(Math.pow(fromRect.top - toRect.top, 2) + Math.pow(fromRect.left - toRect.left, 2)) * options.animation; } var plugins = []; var defaults = { initializeByDefault: true }; var PluginManager = { mount: function mount(plugin) { // Set default static properties for (var option in defaults) { if (defaults.hasOwnProperty(option) && !(option in plugin)) { plugin[option] = defaults[option]; } } plugins.forEach(function (p) { if (p.pluginName === plugin.pluginName) { throw "Sortable: Cannot mount plugin ".concat(plugin.pluginName, " more than once"); } }); plugins.push(plugin); }, pluginEvent: function pluginEvent(eventName, sortable, evt) { var _this = this; this.eventCanceled = false; evt.cancel = function () { _this.eventCanceled = true; }; var eventNameGlobal = eventName + 'Global'; plugins.forEach(function (plugin) { if (!sortable[plugin.pluginName]) return; // Fire global events if it exists in this sortable if (sortable[plugin.pluginName][eventNameGlobal]) { sortable[plugin.pluginName][eventNameGlobal](_objectSpread2({ sortable: sortable }, evt)); } // Only fire plugin event if plugin is enabled in this sortable, // and plugin has event defined if (sortable.options[plugin.pluginName] && sortable[plugin.pluginName][eventName]) { sortable[plugin.pluginName][eventName](_objectSpread2({ sortable: sortable }, evt)); } }); }, initializePlugins: function initializePlugins(sortable, el, defaults, options) { plugins.forEach(function (plugin) { var pluginName = plugin.pluginName; if (!sortable.options[pluginName] && !plugin.initializeByDefault) return; var initialized = new plugin(sortable, el, sortable.options); initialized.sortable = sortable; initialized.options = sortable.options; sortable[pluginName] = initialized; // Add default options from plugin _extends(defaults, initialized.defaults); }); for (var option in sortable.options) { if (!sortable.options.hasOwnProperty(option)) continue; var modified = this.modifyOption(sortable, option, sortable.options[option]); if (typeof modified !== 'undefined') { sortable.options[option] = modified; } } }, getEventProperties: function getEventProperties(name, sortable) { var eventProperties = {}; plugins.forEach(function (plugin) { if (typeof plugin.eventProperties !== 'function') return; _extends(eventProperties, plugin.eventProperties.call(sortable[plugin.pluginName], name)); }); return eventProperties; }, modifyOption: function modifyOption(sortable, name, value) { var modifiedValue; plugins.forEach(function (plugin) { // Plugin must exist on the Sortable if (!sortable[plugin.pluginName]) return; // If static option listener exists for this option, call in the context of the Sortable's instance of this plugin if (plugin.optionListeners && typeof plugin.optionListeners[name] === 'function') { modifiedValue = plugin.optionListeners[name].call(sortable[plugin.pluginName], value); } }); return modifiedValue; } }; function dispatchEvent(_ref) { var sortable = _ref.sortable, rootEl = _ref.rootEl, name = _ref.name, targetEl = _ref.targetEl, cloneEl = _ref.cloneEl, toEl = _ref.toEl, fromEl = _ref.fromEl, oldIndex = _ref.oldIndex, newIndex = _ref.newIndex, oldDraggableIndex = _ref.oldDraggableIndex, newDraggableIndex = _ref.newDraggableIndex, originalEvent = _ref.originalEvent, putSortable = _ref.putSortable, extraEventProperties = _ref.extraEventProperties; sortable = sortable || rootEl && rootEl[expando]; if (!sortable) return; var evt, options = sortable.options, onName = 'on' + name.charAt(0).toUpperCase() + name.substr(1); // Support for new CustomEvent feature if (window.CustomEvent && !IE11OrLess && !Edge) { evt = new CustomEvent(name, { bubbles: true, cancelable: true }); } else { evt = document.createEvent('Event'); evt.initEvent(name, true, true); } evt.to = toEl || rootEl; evt.from = fromEl || rootEl; evt.item = targetEl || rootEl; evt.clone = cloneEl; evt.oldIndex = oldIndex; evt.newIndex = newIndex; evt.oldDraggableIndex = oldDraggableIndex; evt.newDraggableIndex = newDraggableIndex; evt.originalEvent = originalEvent; evt.pullMode = putSortable ? putSortable.lastPutMode : undefined; var allEventProperties = _objectSpread2(_objectSpread2({}, extraEventProperties), PluginManager.getEventProperties(name, sortable)); for (var option in allEventProperties) { evt[option] = allEventProperties[option]; } if (rootEl) { rootEl.dispatchEvent(evt); } if (options[onName]) { options[onName].call(sortable, evt); } } var _excluded = ["evt"]; var pluginEvent = function pluginEvent(eventName, sortable) { var _ref = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}, originalEvent = _ref.evt, data = _objectWithoutProperties(_ref, _excluded); PluginManager.pluginEvent.bind(Sortable)(eventName, sortable, _objectSpread2({ dragEl: dragEl, parentEl: parentEl, ghostEl: ghostEl, rootEl: rootEl, nextEl: nextEl, lastDownEl: lastDownEl, cloneEl: cloneEl, cloneHidden: cloneHidden, dragStarted: moved, putSortable: putSortable, activeSortable: Sortable.active, originalEvent: originalEvent, oldIndex: oldIndex, oldDraggableIndex: oldDraggableIndex, newIndex: newIndex, newDraggableIndex: newDraggableIndex, hideGhostForTarget: _hideGhostForTarget, unhideGhostForTarget: _unhideGhostForTarget, cloneNowHidden: function cloneNowHidden() { cloneHidden = true; }, cloneNowShown: function cloneNowShown() { cloneHidden = false; }, dispatchSortableEvent: function dispatchSortableEvent(name) { _dispatchEvent({ sortable: sortable, name: name, originalEvent: originalEvent }); } }, data)); }; function _dispatchEvent(info) { dispatchEvent(_objectSpread2({ putSortable: putSortable, cloneEl: cloneEl, targetEl: dragEl, rootEl: rootEl, oldIndex: oldIndex, oldDraggableIndex: oldDraggableIndex, newIndex: newIndex, newDraggableIndex: newDraggableIndex }, info)); } var dragEl, parentEl, ghostEl, rootEl, nextEl, lastDownEl, cloneEl, cloneHidden, oldIndex, newIndex, oldDraggableIndex, newDraggableIndex, activeGroup, putSortable, awaitingDragStarted = false, ignoreNextClick = false, sortables = [], tapEvt, touchEvt, lastDx, lastDy, tapDistanceLeft, tapDistanceTop, moved, lastTarget, lastDirection, pastFirstInvertThresh = false, isCircumstantialInvert = false, targetMoveDistance, // For positioning ghost absolutely ghostRelativeParent, ghostRelativeParentInitialScroll = [], // (left, top) _silent = false, savedInputChecked = []; /** @const */ var documentExists = typeof document !== 'undefined', PositionGhostAbsolutely = IOS, CSSFloatProperty = Edge || IE11OrLess ? 'cssFloat' : 'float', // This will not pass for IE9, because IE9 DnD only works on anchors supportDraggable = documentExists && !ChromeForAndroid && !IOS && 'draggable' in document.createElement('div'), supportCssPointerEvents = function () { if (!documentExists) return; // false when <= IE11 if (IE11OrLess) { return false; } var el = document.createElement('x'); el.style.cssText = 'pointer-events:auto'; return el.style.pointerEvents === 'auto'; }(), _detectDirection = function _detectDirection(el, options) { var elCSS = css(el), elWidth = parseInt(elCSS.width) - parseInt(elCSS.paddingLeft) - parseInt(elCSS.paddingRight) - parseInt(elCSS.borderLeftWidth) - parseInt(elCSS.borderRightWidth), child1 = getChild(el, 0, options), child2 = getChild(el, 1, options), firstChildCSS = child1 && css(child1), secondChildCSS = child2 && css(child2), firstChildWidth = firstChildCSS && parseInt(firstChildCSS.marginLeft) + parseInt(firstChildCSS.marginRight) + getRect(child1).width, secondChildWidth = secondChildCSS && parseInt(secondChildCSS.marginLeft) + parseInt(secondChildCSS.marginRight) + getRect(child2).width; if (elCSS.display === 'flex') { return elCSS.flexDirection === 'column' || elCSS.flexDirection === 'column-reverse' ? 'vertical' : 'horizontal'; } if (elCSS.display === 'grid') { return elCSS.gridTemplateColumns.split(' ').length <= 1 ? 'vertical' : 'horizontal'; } if (child1 && firstChildCSS["float"] && firstChildCSS["float"] !== 'none') { var touchingSideChild2 = firstChildCSS["float"] === 'left' ? 'left' : 'right'; return child2 && (secondChildCSS.clear === 'both' || secondChildCSS.clear === touchingSideChild2) ? 'vertical' : 'horizontal'; } return child1 && (firstChildCSS.display === 'block' || firstChildCSS.display === 'flex' || firstChildCSS.display === 'table' || firstChildCSS.display === 'grid' || firstChildWidth >= elWidth && elCSS[CSSFloatProperty] === 'none' || child2 && elCSS[CSSFloatProperty] === 'none' && firstChildWidth + secondChildWidth > elWidth) ? 'vertical' : 'horizontal'; }, _dragElInRowColumn = function _dragElInRowColumn(dragRect, targetRect, vertical) { var dragElS1Opp = vertical ? dragRect.left : dragRect.top, dragElS2Opp = vertical ? dragRect.right : dragRect.bottom, dragElOppLength = vertical ? dragRect.width : dragRect.height, targetS1Opp = vertical ? targetRect.left : targetRect.top, targetS2Opp = vertical ? targetRect.right : targetRect.bottom, targetOppLength = vertical ? targetRect.width : targetRect.height; return dragElS1Opp === targetS1Opp || dragElS2Opp === targetS2Opp || dragElS1Opp + dragElOppLength / 2 === targetS1Opp + targetOppLength / 2; }, /** * Detects first nearest empty sortable to X and Y position using emptyInsertThreshold. * @param {Number} x X position * @param {Number} y Y position * @return {HTMLElement} Element of the first found nearest Sortable */ _detectNearestEmptySortable = function _detectNearestEmptySortable(x, y) { var ret; sortables.some(function (sortable) { var threshold = sortable[expando].options.emptyInsertThreshold; if (!threshold || lastChild(sortable)) return; var rect = getRect(sortable), insideHorizontally = x >= rect.left - threshold && x <= rect.right + threshold, insideVertically = y >= rect.top - threshold && y <= rect.bottom + threshold; if (insideHorizontally && insideVertically) { return ret = sortable; } }); return ret; }, _prepareGroup = function _prepareGroup(options) { function toFn(value, pull) { return function (to, from, dragEl, evt) { var sameGroup = to.options.group.name && from.options.group.name && to.options.group.name === from.options.group.name; if (value == null && (pull || sameGroup)) { // Default pull value // Default pull and put value if same group return true; } else if (value == null || value === false) { return false; } else if (pull && value === 'clone') { return value; } else if (typeof value === 'function') { return toFn(value(to, from, dragEl, evt), pull)(to, from, dragEl, evt); } else { var otherGroup = (pull ? to : from).options.group.name; return value === true || typeof value === 'string' && value === otherGroup || value.join && value.indexOf(otherGroup) > -1; } }; } var group = {}; var originalGroup = options.group; if (!originalGroup || _typeof(originalGroup) != 'object') { originalGroup = { name: originalGroup }; } group.name = originalGroup.name; group.checkPull = toFn(originalGroup.pull, true); group.checkPut = toFn(originalGroup.put); group.revertClone = originalGroup.revertClone; options.group = group; }, _hideGhostForTarget = function _hideGhostForTarget() { if (!supportCssPointerEvents && ghostEl) { css(ghostEl, 'display', 'none'); } }, _unhideGhostForTarget = function _unhideGhostForTarget() { if (!supportCssPointerEvents && ghostEl) { css(ghostEl, 'display', ''); } }; // #1184 fix - Prevent click event on fallback if dragged but item not changed position if (documentExists && !ChromeForAndroid) { document.addEventListener('click', function (evt) { if (ignoreNextClick) { evt.preventDefault(); evt.stopPropagation && evt.stopPropagation(); evt.stopImmediatePropagation && evt.stopImmediatePropagation(); ignoreNextClick = false; return false; } }, true); } var nearestEmptyInsertDetectEvent = function nearestEmptyInsertDetectEvent(evt) { if (dragEl) { evt = evt.touches ? evt.touches[0] : evt; var nearest = _detectNearestEmptySortable(evt.clientX, evt.clientY); if (nearest) { // Create imitation event var event = {}; for (var i in evt) { if (evt.hasOwnProperty(i)) { event[i] = evt[i]; } } event.target = event.rootEl = nearest; event.preventDefault = void 0; event.stopPropagation = void 0; nearest[expando]._onDragOver(event); } } }; var _checkOutsideTargetEl = function _checkOutsideTargetEl(evt) { if (dragEl) { dragEl.parentNode[expando]._isOutsideThisEl(evt.target); } }; /** * @class Sortable * @param {HTMLElement} el * @param {Object} [options] */ function Sortable(el, options) { if (!(el && el.nodeType && el.nodeType === 1)) { throw "Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(el)); } this.el = el; // root element this.options = options = _extends({}, options); // Export instance el[expando] = this; var defaults = { group: null, sort: true, disabled: false, store: null, handle: null, draggable: /^[uo]l$/i.test(el.nodeName) ? '>li' : '>*', swapThreshold: 1, // percentage; 0 <= x <= 1 invertSwap: false, // invert always invertedSwapThreshold: null, // will be set to same as swapThreshold if default removeCloneOnHide: true, direction: function direction() { return _detectDirection(el, this.options); }, ghostClass: 'sortable-ghost', chosenClass: 'sortable-chosen', dragClass: 'sortable-drag', ignore: 'a, img', filter: null, preventOnFilter: true, animation: 0, easing: null, setData: function setData(dataTransfer, dragEl) { dataTransfer.setData('Text', dragEl.textContent); }, dropBubble: false, dragoverBubble: false, dataIdAttr: 'data-id', delay: 0, delayOnTouchOnly: false, touchStartThreshold: (Number.parseInt ? Number : window).parseInt(window.devicePixelRatio, 10) || 1, forceFallback: false, fallbackClass: 'sortable-fallback', fallbackOnBody: false, fallbackTolerance: 0, fallbackOffset: { x: 0, y: 0 }, supportPointer: Sortable.supportPointer !== false && 'PointerEvent' in window && !Safari, emptyInsertThreshold: 5 }; PluginManager.initializePlugins(this, el, defaults); // Set default options for (var name in defaults) { !(name in options) && (options[name] = defaults[name]); } _prepareGroup(options); // Bind all private methods for (var fn in this) { if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { this[fn] = this[fn].bind(this); } } // Setup drag mode this.nativeDraggable = options.forceFallback ? false : supportDraggable; if (this.nativeDraggable) { // Touch start threshold cannot be greater than the native dragstart threshold this.options.touchStartThreshold = 1; } // Bind events if (options.supportPointer) { on(el, 'pointerdown', this._onTapStart); } else { on(el, 'mousedown', this._onTapStart); on(el, 'touchstart', this._onTapStart); } if (this.nativeDraggable) { on(el, 'dragover', this); on(el, 'dragenter', this); } sortables.push(this.el); // Restore sorting options.store && options.store.get && this.sort(options.store.get(this) || []); // Add animation state manager _extends(this, AnimationStateManager()); } Sortable.prototype = /** @lends Sortable.prototype */ { constructor: Sortable, _isOutsideThisEl: function _isOutsideThisEl(target) { if (!this.el.contains(target) && target !== this.el) { lastTarget = null; } }, _getDirection: function _getDirection(evt, target) { return typeof this.options.direction === 'function' ? this.options.direction.call(this, evt, target, dragEl) : this.options.direction; }, _onTapStart: function _onTapStart( /** Event|TouchEvent */ evt) { if (!evt.cancelable) return; var _this = this, el = this.el, options = this.options, preventOnFilter = options.preventOnFilter, type = evt.type, touch = evt.touches && evt.touches[0] || evt.pointerType && evt.pointerType === 'touch' && evt, target = (touch || evt).target, originalTarget = evt.target.shadowRoot && (evt.path && evt.path[0] || evt.composedPath && evt.composedPath()[0]) || target, filter = options.filter; _saveInputCheckedState(el); // Don't trigger start event when an element is been dragged, otherwise the evt.oldindex always wrong when set option.group. if (dragEl) { return; } if (/mousedown|pointerdown/.test(type) && evt.button !== 0 || options.disabled) { return; // only left button and enabled } // cancel dnd if original target is content editable if (originalTarget.isContentEditable) { return; } // Safari ignores further event handling after mousedown if (!this.nativeDraggable && Safari && target && target.tagName.toUpperCase() === 'SELECT') { return; } target = closest(target, options.draggable, el, false); if (target && target.animated) { return; } if (lastDownEl === target) { // Ignoring duplicate `down` return; } // Get the index of the dragged element within its parent oldIndex = index(target); oldDraggableIndex = index(target, options.draggable); // Check filter if (typeof filter === 'function') { if (filter.call(this, evt, target, this)) { _dispatchEvent({ sortable: _this, rootEl: originalTarget, name: 'filter', targetEl: target, toEl: el, fromEl: el }); pluginEvent('filter', _this, { evt: evt }); preventOnFilter && evt.cancelable && evt.preventDefault(); return; // cancel dnd } } else if (filter) { filter = filter.split(',').some(function (criteria) { criteria = closest(originalTarget, criteria.trim(), el, false); if (criteria) { _dispatchEvent({ sortable: _this, rootEl: criteria, name: 'filter', targetEl: target, fromEl: el, toEl: el }); pluginEvent('filter', _this, { evt: evt }); return true; } }); if (filter) { preventOnFilter && evt.cancelable && evt.preventDefault(); return; // cancel dnd } } if (options.handle && !closest(originalTarget, options.handle, el, false)) { return; } // Prepare `dragstart` this._prepareDragStart(evt, touch, target); }, _prepareDragStart: function _prepareDragStart( /** Event */ evt, /** Touch */ touch, /** HTMLElement */ target) { var _this = this, el = _this.el, options = _this.options, ownerDocument = el.ownerDocument, dragStartFn; if (target && !dragEl && target.parentNode === el) { var dragRect = getRect(target); rootEl = el; dragEl = target; parentEl = dragEl.parentNode; nextEl = dragEl.nextSibling; lastDownEl = target; activeGroup = options.group; Sortable.dragged = dragEl; tapEvt = { target: dragEl, clientX: (touch || evt).clientX, clientY: (touch || evt).clientY }; tapDistanceLeft = tapEvt.clientX - dragRect.left; tapDistanceTop = tapEvt.clientY - dragRect.top; this._lastX = (touch || evt).clientX; this._lastY = (touch || evt).clientY; dragEl.style['will-change'] = 'all'; dragStartFn = function dragStartFn() { pluginEvent('delayEnded', _this, { evt: evt }); if (Sortable.eventCanceled) { _this._onDrop(); return; } // Delayed drag has been triggered // we can re-enable the events: touchmove/mousemove _this._disableDelayedDragEvents(); if (!FireFox && _this.nativeDraggable) { dragEl.draggable = true; } // Bind the events: dragstart/dragend _this._triggerDragStart(evt, touch); // Drag start event _dispatchEvent({ sortable: _this, name: 'choose', originalEvent: evt }); // Chosen item toggleClass(dragEl, options.chosenClass, true); }; // Disable "draggable" options.ignore.split(',').forEach(function (criteria) { find(dragEl, criteria.trim(), _disableDraggable); }); on(ownerDocument, 'dragover', nearestEmptyInsertDetectEvent); on(ownerDocument, 'mousemove', nearestEmptyInsertDetectEvent); on(ownerDocument, 'touchmove', nearestEmptyInsertDetectEvent); on(ownerDocument, 'mouseup', _this._onDrop); on(ownerDocument, 'touchend', _this._onDrop); on(ownerDocument, 'touchcancel', _this._onDrop); // Make dragEl draggable (must be before delay for FireFox) if (FireFox && this.nativeDraggable) { this.options.touchStartThreshold = 4; dragEl.draggable = true; } pluginEvent('delayStart', this, { evt: evt }); // Delay is impossible for native DnD in Edge or IE if (options.delay && (!options.delayOnTouchOnly || touch) && (!this.nativeDraggable || !(Edge || IE11OrLess))) { if (Sortable.eventCanceled) { this._onDrop(); return; } // If the user moves the pointer or let go the click or touch // before the delay has been reached: // disable the delayed drag on(ownerDocument, 'mouseup', _this._disableDelayedDrag); on(ownerDocument, 'touchend', _this._disableDelayedDrag); on(ownerDocument, 'touchcancel', _this._disableDelayedDrag); on(ownerDocument, 'mousemove', _this._delayedDragTouchMoveHandler); on(ownerDocument, 'touchmove', _this._delayedDragTouchMoveHandler); options.supportPointer && on(ownerDocument, 'pointermove', _this._delayedDragTouchMoveHandler); _this._dragStartTimer = setTimeout(dragStartFn, options.delay); } else { dragStartFn(); } } }, _delayedDragTouchMoveHandler: function _delayedDragTouchMoveHandler( /** TouchEvent|PointerEvent **/ e) { var touch = e.touches ? e.touches[0] : e; if (Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) >= Math.floor(this.options.touchStartThreshold / (this.nativeDraggable && window.devicePixelRatio || 1))) { this._disableDelayedDrag(); } }, _disableDelayedDrag: function _disableDelayedDrag() { dragEl && _disableDraggable(dragEl); clearTimeout(this._dragStartTimer); this._disableDelayedDragEvents(); }, _disableDelayedDragEvents: function _disableDelayedDragEvents() { var ownerDocument = this.el.ownerDocument; off(ownerDocument, 'mouseup', this._disableDelayedDrag); off(ownerDocument, 'touchend', this._disableDelayedDrag); off(ownerDocument, 'touchcancel', this._disableDelayedDrag); off(ownerDocument, 'mousemove', this._delayedDragTouchMoveHandler); off(ownerDocument, 'touchmove', this._delayedDragTouchMoveHandler); off(ownerDocument, 'pointermove', this._delayedDragTouchMoveHandler); }, _triggerDragStart: function _triggerDragStart( /** Event */ evt, /** Touch */ touch) { touch = touch || evt.pointerType == 'touch' && evt; if (!this.nativeDraggable || touch) { if (this.options.supportPointer) { on(document, 'pointermove', this._onTouchMove); } else if (touch) { on(document, 'touchmove', this._onTouchMove); } else { on(document, 'mousemove', this._onTouchMove); } } else { on(dragEl, 'dragend', this); on(rootEl, 'dragstart', this._onDragStart); } try { if (document.selection) { // Timeout neccessary for IE9 _nextTick(function () { document.selection.empty(); }); } else { window.getSelection().removeAllRanges(); } } catch (err) {} }, _dragStarted: function _dragStarted(fallback, evt) { awaitingDragStarted = false; if (rootEl && dragEl) { pluginEvent('dragStarted', this, { evt: evt }); if (this.nativeDraggable) { on(document, 'dragover', _checkOutsideTargetEl); } var options = this.options; // Apply effect !fallback && toggleClass(dragEl, options.dragClass, false); toggleClass(dragEl, options.ghostClass, true); Sortable.active = this; fallback && this._appendGhost(); // Drag start event _dispatchEvent({ sortable: this, name: 'start', originalEvent: evt }); } else { this._nulling(); } }, _emulateDragOver: function _emulateDragOver() { if (touchEvt) { this._lastX = touchEvt.clientX; this._lastY = touchEvt.clientY; _hideGhostForTarget(); var target = document.elementFromPoint(touchEvt.clientX, touchEvt.clientY); var parent = target; while (target && target.shadowRoot) { target = target.shadowRoot.elementFromPoint(touchEvt.clientX, touchEvt.clientY); if (target === parent) break; parent = target; } dragEl.parentNode[expando]._isOutsideThisEl(target); if (parent) { do { if (parent[expando]) { var inserted = void 0; inserted = parent[expando]._onDragOver({ clientX: touchEvt.clientX, clientY: touchEvt.clientY, target: target, rootEl: parent }); if (inserted && !this.options.dragoverBubble) { break; } } target = parent; // store last element } /* jshint boss:true */ while (parent = parent.parentNode); } _unhideGhostForTarget(); } }, _onTouchMove: function _onTouchMove( /**TouchEvent*/ evt) { if (tapEvt) { var options = this.options, fallbackTolerance = options.fallbackTolerance, fallbackOffset = options.fallbackOffset, touch = evt.touches ? evt.touches[0] : evt, ghostMatrix = ghostEl && matrix(ghostEl, true), scaleX = ghostEl && ghostMatrix && ghostMatrix.a, scaleY = ghostEl && ghostMatrix && ghostMatrix.d, relativeScrollOffset = PositionGhostAbsolutely && ghostRelativeParent && getRelativeScrollOffset(ghostRelativeParent), dx = (touch.clientX - tapEvt.clientX + fallbackOffset.x) / (scaleX || 1) + (relativeScrollOffset ? relativeScrollOffset[0] - ghostRelativeParentInitialScroll[0] : 0) / (scaleX || 1), dy = (touch.clientY - tapEvt.clientY + fallbackOffset.y) / (scaleY || 1) + (relativeScrollOffset ? relativeScrollOffset[1] - ghostRelativeParentInitialScroll[1] : 0) / (scaleY || 1); // only set the status to dragging, when we are actually dragging if (!Sortable.active && !awaitingDragStarted) { if (fallbackTolerance && Math.max(Math.abs(touch.clientX - this._lastX), Math.abs(touch.clientY - this._lastY)) < fallbackTolerance) { return; } this._onDragStart(evt, true); } if (ghostEl) { if (ghostMatrix) { ghostMatrix.e += dx - (lastDx || 0); ghostMatrix.f += dy - (lastDy || 0); } else { ghostMatrix = { a: 1, b: 0, c: 0, d: 1, e: dx, f: dy }; } var cssMatrix = "matrix(".concat(ghostMatrix.a, ",").concat(ghostMatrix.b, ",").concat(ghostMatrix.c, ",").concat(ghostMatrix.d, ",").concat(ghostMatrix.e, ",").concat(ghostMatrix.f, ")"); css(ghostEl, 'webkitTransform', cssMatrix); css(ghostEl, 'mozTransform', cssMatrix); css(ghostEl, 'msTransform', cssMatrix); css(ghostEl, 'transform', cssMatrix); lastDx = dx; lastDy = dy; touchEvt = touch; } evt.cancelable && evt.preventDefault(); } }, _appendGhost: function _appendGhost() { // Bug if using scale(): https://stackoverflow.com/questions/2637058 // Not being adjusted for if (!ghostEl) { var container = this.options.fallbackOnBody ? document.body : rootEl, rect = getRect(dragEl, true, PositionGhostAbsolutely, true, container), options = this.options; // Position absolutely if (PositionGhostAbsolutely) { // Get relatively positioned parent ghostRelativeParent = container; while (css(ghostRelativeParent, 'position') === 'static' && css(ghostRelativeParent, 'transform') === 'none' && ghostRelativeParent !== document) { ghostRelativeParent = ghostRelativeParent.parentNode; } if (ghostRelativeParent !== document.body && ghostRelativeParent !== document.documentElement) { if (ghostRelativeParent === document) ghostRelativeParent = getWindowScrollingElement(); rect.top += ghostRelativeParent.scrollTop; rect.left += ghostRelativeParent.scrollLeft; } else { ghostRelativeParent = getWindowScrollingElement(); } ghostRelativeParentInitialScroll = getRelativeScrollOffset(ghostRelativeParent); } ghostEl = dragEl.cloneNode(true); toggleClass(ghostEl, options.ghostClass, false); toggleClass(ghostEl, options.fallbackClass, true); toggleClass(ghostEl, options.dragClass, true); css(ghostEl, 'transition', ''); css(ghostEl, 'transform', ''); css(ghostEl, 'box-sizing', 'border-box'); css(ghostEl, 'margin', 0); css(ghostEl, 'top', rect.top); css(ghostEl, 'left', rect.left); css(ghostEl, 'width', rect.width); css(ghostEl, 'height', rect.height); css(ghostEl, 'opacity', '0.8'); css(ghostEl, 'position', PositionGhostAbsolutely ? 'absolute' : 'fixed'); css(ghostEl, 'zIndex', '100000'); css(ghostEl, 'pointerEvents', 'none'); Sortable.ghost = ghostEl; container.appendChild(ghostEl); // Set transform-origin css(ghostEl, 'transform-origin', tapDistanceLeft / parseInt(ghostEl.style.width) * 100 + '% ' + tapDistanceTop / parseInt(ghostEl.style.height) * 100 + '%'); } }, _onDragStart: function _onDragStart( /**Event*/ evt, /**boolean*/ fallback) { var _this = this; var dataTransfer = evt.dataTransfer; var options = _this.options; pluginEvent('dragStart', this, { evt: evt }); if (Sortable.eventCanceled) { this._onDrop(); return; } pluginEvent('setupClone', this); if (!Sortable.eventCanceled) { cloneEl = clone(dragEl); cloneEl.removeAttribute("id"); cloneEl.draggable = false; cloneEl.style['will-change'] = ''; this._hideClone(); toggleClass(cloneEl, this.options.chosenClass, false); Sortable.clone = cloneEl; } // #1143: IFrame support workaround _this.cloneId = _nextTick(function () { pluginEvent('clone', _this); if (Sortable.eventCanceled) return; if (!_this.options.removeCloneOnHide) { rootEl.insertBefore(cloneEl, dragEl); } _this._hideClone(); _dispatchEvent({ sortable: _this, name: 'clone' }); }); !fallback && toggleClass(dragEl, options.dragClass, true); // Set proper drop events if (fallback) { ignoreNextClick = true; _this._loopId = setInterval(_this._emulateDragOver, 50); } else { // Undo what was set in _prepareDragStart before drag started off(document, 'mouseup', _this._onDrop); off(document, 'touchend', _this._onDrop); off(document, 'touchcancel', _this._onDrop); if (dataTransfer) { dataTransfer.effectAllowed = 'move'; options.setData && options.setData.call(_this, dataTransfer, dragEl); } on(document, 'drop', _this); // #1276 fix: css(dragEl, 'transform', 'translateZ(0)'); } awaitingDragStarted = true; _this._dragStartId = _nextTick(_this._dragStarted.bind(_this, fallback, evt)); on(document, 'selectstart', _this); moved = true; if (Safari) { css(document.body, 'user-select', 'none'); } }, // Returns true - if no further action is needed (either inserted or another condition) _onDragOver: function _onDragOver( /**Event*/ evt) { var el = this.el, target = evt.target, dragRect, targetRect, revert, options = this.options, group = options.group, activeSortable = Sortable.active, isOwner = activeGroup === group, canSort = options.sort, fromSortable = putSortable || activeSortable, vertical, _this = this, completedFired = false; if (_silent) return; function dragOverEvent(name, extra) { pluginEvent(name, _this, _objectSpread2({ evt: evt, isOwner: isOwner, axis: vertical ? 'vertical' : 'horizontal', revert: revert, dragRect: dragRect, targetRect: targetRect, canSort: canSort, fromSortable: fromSortable, target: target, completed: completed, onMove: function onMove(target, after) { return _onMove(rootEl, el, dragEl, dragRect, target, getRect(target), evt, after); }, changed: changed }, extra)); } // Capture animation state function capture() { dragOverEvent('dragOverAnimationCapture'); _this.captureAnimationState(); if (_this !== fromSortable) { fromSortable.captureAnimationState(); } } // Return invocation when dragEl is inserted (or completed) function completed(insertion) { dragOverEvent('dragOverCompleted', { insertion: insertion }); if (insertion) { // Clones must be hidden before folding animation to capture dragRectAbsolute properly if (isOwner) { activeSortable._hideClone(); } else { activeSortable._showClone(_this); } if (_this !== fromSortable) { // Set ghost class to new sortable's ghost class toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : activeSortable.options.ghostClass, false); toggleClass(dragEl, options.ghostClass, true); } if (putSortable !== _this && _this !== Sortable.active) { putSortable = _this; } else if (_this === Sortable.active && putSortable) { putSortable = null; } // Animation if (fromSortable === _this) { _this._ignoreWhileAnimating = target; } _this.animateAll(function () { dragOverEvent('dragOverAnimationComplete'); _this._ignoreWhileAnimating = null; }); if (_this !== fromSortable) { fromSortable.animateAll(); fromSortable._ignoreWhileAnimating = null; } } // Null lastTarget if it is not inside a previously swapped element if (target === dragEl && !dragEl.animated || target === el && !target.animated) { lastTarget = null; } // no bubbling and not fallback if (!options.dragoverBubble && !evt.rootEl && target !== document) { dragEl.parentNode[expando]._isOutsideThisEl(evt.target); // Do not detect for empty insert if already inserted !insertion && nearestEmptyInsertDetectEvent(evt); } !options.dragoverBubble && evt.stopPropagation && evt.stopPropagation(); return completedFired = true; } // Call when dragEl has been inserted function changed() { newIndex = index(dragEl); newDraggableIndex = index(dragEl, options.draggable); _dispatchEvent({ sortable: _this, name: 'change', toEl: el, newIndex: newIndex, newDraggableIndex: newDraggableIndex, originalEvent: evt }); } if (evt.preventDefault !== void 0) { evt.cancelable && evt.preventDefault(); } target = closest(target, options.draggable, el, true); dragOverEvent('dragOver'); if (Sortable.eventCanceled) return completedFired; if (dragEl.contains(evt.target) || target.animated && target.animatingX && target.animatingY || _this._ignoreWhileAnimating === target) { return completed(false); } ignoreNextClick = false; if (activeSortable && !options.disabled && (isOwner ? canSort || (revert = parentEl !== rootEl) // Reverting item into the original list : putSortable === this || (this.lastPutMode = activeGroup.checkPull(this, activeSortable, dragEl, evt)) && group.checkPut(this, activeSortable, dragEl, evt))) { vertical = this._getDirection(evt, target) === 'vertical'; dragRect = getRect(dragEl); dragOverEvent('dragOverValid'); if (Sortable.eventCanceled) return completedFired; if (revert) { parentEl = rootEl; // actualization capture(); this._hideClone(); dragOverEvent('revert'); if (!Sortable.eventCanceled) { if (nextEl) { rootEl.insertBefore(dragEl, nextEl); } else { rootEl.appendChild(dragEl); } } return completed(true); } var elLastChild = lastChild(el, options.draggable); if (!elLastChild || _ghostIsLast(evt, vertical, this) && !elLastChild.animated) { // Insert to end of list // If already at end of list: Do not insert if (elLastChild === dragEl) { return completed(false); } // if there is a last element, it is the target if (elLastChild && el === evt.target) { target = elLastChild; } if (target) { targetRect = getRect(target); } if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, !!target) !== false) { capture(); if (elLastChild && elLastChild.nextSibling) { // the last draggable element is not the last node el.insertBefore(dragEl, elLastChild.nextSibling); } else { el.appendChild(dragEl); } parentEl = el; // actualization changed(); return completed(true); } } else if (elLastChild && _ghostIsFirst(evt, vertical, this)) { // Insert to start of list var firstChild = getChild(el, 0, options, true); if (firstChild === dragEl) { return completed(false); } target = firstChild; targetRect = getRect(target); if (_onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, false) !== false) { capture(); el.insertBefore(dragEl, firstChild); parentEl = el; // actualization changed(); return completed(true); } } else if (target.parentNode === el) { targetRect = getRect(target); var direction = 0, targetBeforeFirstSwap, differentLevel = dragEl.parentNode !== el, differentRowCol = !_dragElInRowColumn(dragEl.animated && dragEl.toRect || dragRect, target.animated && target.toRect || targetRect, vertical), side1 = vertical ? 'top' : 'left', scrolledPastTop = isScrolledPast(target, 'top', 'top') || isScrolledPast(dragEl, 'top', 'top'), scrollBefore = scrolledPastTop ? scrolledPastTop.scrollTop : void 0; if (lastTarget !== target) { targetBeforeFirstSwap = targetRect[side1]; pastFirstInvertThresh = false; isCircumstantialInvert = !differentRowCol && options.invertSwap || differentLevel; } direction = _getSwapDirection(evt, target, targetRect, vertical, differentRowCol ? 1 : options.swapThreshold, options.invertedSwapThreshold == null ? options.swapThreshold : options.invertedSwapThreshold, isCircumstantialInvert, lastTarget === target); var sibling; if (direction !== 0) { // Check if target is beside dragEl in respective direction (ignoring hidden elements) var dragIndex = index(dragEl); do { dragIndex -= direction; sibling = parentEl.children[dragIndex]; } while (sibling && (css(sibling, 'display') === 'none' || sibling === ghostEl)); } // If dragEl is already beside target: Do not insert if (direction === 0 || sibling === target) { return completed(false); } lastTarget = target; lastDirection = direction; var nextSibling = target.nextElementSibling, after = false; after = direction === 1; var moveVector = _onMove(rootEl, el, dragEl, dragRect, target, targetRect, evt, after); if (moveVector !== false) { if (moveVector === 1 || moveVector === -1) { after = moveVector === 1; } _silent = true; setTimeout(_unsilent, 30); capture(); if (after && !nextSibling) { el.appendChild(dragEl); } else { target.parentNode.insertBefore(dragEl, after ? nextSibling : target); } // Undo chrome's scroll adjustment (has no effect on other browsers) if (scrolledPastTop) { scrollBy(scrolledPastTop, 0, scrollBefore - scrolledPastTop.scrollTop); } parentEl = dragEl.parentNode; // actualization // must be done before animation if (targetBeforeFirstSwap !== undefined && !isCircumstantialInvert) { targetMoveDistance = Math.abs(targetBeforeFirstSwap - getRect(target)[side1]); } changed(); return completed(true); } } if (el.contains(dragEl)) { return completed(false); } } return false; }, _ignoreWhileAnimating: null, _offMoveEvents: function _offMoveEvents() { off(document, 'mousemove', this._onTouchMove); off(document, 'touchmove', this._onTouchMove); off(document, 'pointermove', this._onTouchMove); off(document, 'dragover', nearestEmptyInsertDetectEvent); off(document, 'mousemove', nearestEmptyInsertDetectEvent); off(document, 'touchmove', nearestEmptyInsertDetectEvent); }, _offUpEvents: function _offUpEvents() { var ownerDocument = this.el.ownerDocument; off(ownerDocument, 'mouseup', this._onDrop); off(ownerDocument, 'touchend', this._onDrop); off(ownerDocument, 'pointerup', this._onDrop); off(ownerDocument, 'touchcancel', this._onDrop); off(document, 'selectstart', this); }, _onDrop: function _onDrop( /**Event*/ evt) { var el = this.el, options = this.options; // Get the index of the dragged element within its parent newIndex = index(dragEl); newDraggableIndex = index(dragEl, options.draggable); pluginEvent('drop', this, { evt: evt }); parentEl = dragEl && dragEl.parentNode; // Get again after plugin event newIndex = index(dragEl); newDraggableIndex = index(dragEl, options.draggable); if (Sortable.eventCanceled) { this._nulling(); return; } awaitingDragStarted = false; isCircumstantialInvert = false; pastFirstInvertThresh = false; clearInterval(this._loopId); clearTimeout(this._dragStartTimer); _cancelNextTick(this.cloneId); _cancelNextTick(this._dragStartId); // Unbind events if (this.nativeDraggable) { off(document, 'drop', this); off(el, 'dragstart', this._onDragStart); } this._offMoveEvents(); this._offUpEvents(); if (Safari) { css(document.body, 'user-select', ''); } css(dragEl, 'transform', ''); if (evt) { if (moved) { evt.cancelable && evt.preventDefault(); !options.dropBubble && evt.stopPropagation(); } ghostEl && ghostEl.parentNode && ghostEl.parentNode.removeChild(ghostEl); if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') { // Remove clone(s) cloneEl && cloneEl.parentNode && cloneEl.parentNode.removeChild(cloneEl); } if (dragEl) { if (this.nativeDraggable) { off(dragEl, 'dragend', this); } _disableDraggable(dragEl); dragEl.style['will-change'] = ''; // Remove classes // ghostClass is added in dragStarted if (moved && !awaitingDragStarted) { toggleClass(dragEl, putSortable ? putSortable.options.ghostClass : this.options.ghostClass, false); } toggleClass(dragEl, this.options.chosenClass, false); // Drag stop event _dispatchEvent({ sortable: this, name: 'unchoose', toEl: parentEl, newIndex: null, newDraggableIndex: null, originalEvent: evt }); if (rootEl !== parentEl) { if (newIndex >= 0) { // Add event _dispatchEvent({ rootEl: parentEl, name: 'add', toEl: parentEl, fromEl: rootEl, originalEvent: evt }); // Remove event _dispatchEvent({ sortable: this, name: 'remove', toEl: parentEl, originalEvent: evt }); // drag from one list and drop into another _dispatchEvent({ rootEl: parentEl, name: 'sort', toEl: parentEl, fromEl: rootEl, originalEvent: evt }); _dispatchEvent({ sortable: this, name: 'sort', toEl: parentEl, originalEvent: evt }); } putSortable && putSortable.save(); } else { if (newIndex !== oldIndex) { if (newIndex >= 0) { // drag & drop within the same list _dispatchEvent({ sortable: this, name: 'update', toEl: parentEl, originalEvent: evt }); _dispatchEvent({ sortable: this, name: 'sort', toEl: parentEl, originalEvent: evt }); } } } if (Sortable.active) { /* jshint eqnull:true */ if (newIndex == null || newIndex === -1) { newIndex = oldIndex; newDraggableIndex = oldDraggableIndex; } _dispatchEvent({ sortable: this, name: 'end', toEl: parentEl, originalEvent: evt }); // Save sorting this.save(); } } } this._nulling(); }, _nulling: function _nulling() { pluginEvent('nulling', this); rootEl = dragEl = parentEl = ghostEl = nextEl = cloneEl = lastDownEl = cloneHidden = tapEvt = touchEvt = moved = newIndex = newDraggableIndex = oldIndex = oldDraggableIndex = lastTarget = lastDirection = putSortable = activeGroup = Sortable.dragged = Sortable.ghost = Sortable.clone = Sortable.active = null; savedInputChecked.forEach(function (el) { el.checked = true; }); savedInputChecked.length = lastDx = lastDy = 0; }, handleEvent: function handleEvent( /**Event*/ evt) { switch (evt.type) { case 'drop': case 'dragend': this._onDrop(evt); break; case 'dragenter': case 'dragover': if (dragEl) { this._onDragOver(evt); _globalDragOver(evt); } break; case 'selectstart': evt.preventDefault(); break; } }, /** * Serializes the item into an array of string. * @returns {String[]} */ toArray: function toArray() { var order = [], el, children = this.el.children, i = 0, n = children.length, options = this.options; for (; i < n; i++) { el = children[i]; if (closest(el, options.draggable, this.el, false)) { order.push(el.getAttribute(options.dataIdAttr) || _generateId(el)); } } return order; }, /** * Sorts the elements according to the array. * @param {String[]} order order of the items */ sort: function sort(order, useAnimation) { var items = {}, rootEl = this.el; this.toArray().forEach(function (id, i) { var el = rootEl.children[i]; if (closest(el, this.options.draggable, rootEl, false)) { items[id] = el; } }, this); useAnimation && this.captureAnimationState(); order.forEach(function (id) { if (items[id]) { rootEl.removeChild(items[id]); rootEl.appendChild(items[id]); } }); useAnimation && this.animateAll(); }, /** * Save the current sorting */ save: function save() { var store = this.options.store; store && store.set && store.set(this); }, /** * For each element in the set, get the first element that matches the selector by testing the element itself and traversing up through its ancestors in the DOM tree. * @param {HTMLElement} el * @param {String} [selector] default: `options.draggable` * @returns {HTMLElement|null} */ closest: function closest$1(el, selector) { return closest(el, selector || this.options.draggable, this.el, false); }, /** * Set/get option * @param {string} name * @param {*} [value] * @returns {*} */ option: function option(name, value) { var options = this.options; if (value === void 0) { return options[name]; } else { var modifiedValue = PluginManager.modifyOption(this, name, value); if (typeof modifiedValue !== 'undefined') { options[name] = modifiedValue; } else { options[name] = value; } if (name === 'group') { _prepareGroup(options); } } }, /** * Destroy */ destroy: function destroy() { pluginEvent('destroy', this); var el = this.el; el[expando] = null; off(el, 'mousedown', this._onTapStart); off(el, 'touchstart', this._onTapStart); off(el, 'pointerdown', this._onTapStart); if (this.nativeDraggable) { off(el, 'dragover', this); off(el, 'dragenter', this); } // Remove draggable attributes Array.prototype.forEach.call(el.querySelectorAll('[draggable]'), function (el) { el.removeAttribute('draggable'); }); this._onDrop(); this._disableDelayedDragEvents(); sortables.splice(sortables.indexOf(this.el), 1); this.el = el = null; }, _hideClone: function _hideClone() { if (!cloneHidden) { pluginEvent('hideClone', this); if (Sortable.eventCanceled) return; css(cloneEl, 'display', 'none'); if (this.options.removeCloneOnHide && cloneEl.parentNode) { cloneEl.parentNode.removeChild(cloneEl); } cloneHidden = true; } }, _showClone: function _showClone(putSortable) { if (putSortable.lastPutMode !== 'clone') { this._hideClone(); return; } if (cloneHidden) { pluginEvent('showClone', this); if (Sortable.eventCanceled) return; // show clone at dragEl or original position if (dragEl.parentNode == rootEl && !this.options.group.revertClone) { rootEl.insertBefore(cloneEl, dragEl); } else if (nextEl) { rootEl.insertBefore(cloneEl, nextEl); } else { rootEl.appendChild(cloneEl); } if (this.options.group.revertClone) { this.animate(dragEl, cloneEl); } css(cloneEl, 'display', ''); cloneHidden = false; } } }; function _globalDragOver( /**Event*/ evt) { if (evt.dataTransfer) { evt.dataTransfer.dropEffect = 'move'; } evt.cancelable && evt.preventDefault(); } function _onMove(fromEl, toEl, dragEl, dragRect, targetEl, targetRect, originalEvent, willInsertAfter) { var evt, sortable = fromEl[expando], onMoveFn = sortable.options.onMove, retVal; // Support for new CustomEvent feature if (window.CustomEvent && !IE11OrLess && !Edge) { evt = new CustomEvent('move', { bubbles: true, cancelable: true }); } else { evt = document.createEvent('Event'); evt.initEvent('move', true, true); } evt.to = toEl; evt.from = fromEl; evt.dragged = dragEl; evt.draggedRect = dragRect; evt.related = targetEl || toEl; evt.relatedRect = targetRect || getRect(toEl); evt.willInsertAfter = willInsertAfter; evt.originalEvent = originalEvent; fromEl.dispatchEvent(evt); if (onMoveFn) { retVal = onMoveFn.call(sortable, evt, originalEvent); } return retVal; } function _disableDraggable(el) { el.draggable = false; } function _unsilent() { _silent = false; } function _ghostIsFirst(evt, vertical, sortable) { var rect = getRect(getChild(sortable.el, 0, sortable.options, true)); var spacer = 10; return vertical ? evt.clientX < rect.left - spacer || evt.clientY < rect.top && evt.clientX < rect.right : evt.clientY < rect.top - spacer || evt.clientY < rect.bottom && evt.clientX < rect.left; } function _ghostIsLast(evt, vertical, sortable) { var rect = getRect(lastChild(sortable.el, sortable.options.draggable)); var spacer = 10; return vertical ? evt.clientX > rect.right + spacer || evt.clientX <= rect.right && evt.clientY > rect.bottom && evt.clientX >= rect.left : evt.clientX > rect.right && evt.clientY > rect.top || evt.clientX <= rect.right && evt.clientY > rect.bottom + spacer; } function _getSwapDirection(evt, target, targetRect, vertical, swapThreshold, invertedSwapThreshold, invertSwap, isLastTarget) { var mouseOnAxis = vertical ? evt.clientY : evt.clientX, targetLength = vertical ? targetRect.height : targetRect.width, targetS1 = vertical ? targetRect.top : targetRect.left, targetS2 = vertical ? targetRect.bottom : targetRect.right, invert = false; if (!invertSwap) { // Never invert or create dragEl shadow when target movemenet causes mouse to move past the end of regular swapThreshold if (isLastTarget && targetMoveDistance < targetLength * swapThreshold) { // multiplied only by swapThreshold because mouse will already be inside target by (1 - threshold) * targetLength / 2 // check if past first invert threshold on side opposite of lastDirection if (!pastFirstInvertThresh && (lastDirection === 1 ? mouseOnAxis > targetS1 + targetLength * invertedSwapThreshold / 2 : mouseOnAxis < targetS2 - targetLength * invertedSwapThreshold / 2)) { // past first invert threshold, do not restrict inverted threshold to dragEl shadow pastFirstInvertThresh = true; } if (!pastFirstInvertThresh) { // dragEl shadow (target move distance shadow) if (lastDirection === 1 ? mouseOnAxis < targetS1 + targetMoveDistance // over dragEl shadow : mouseOnAxis > targetS2 - targetMoveDistance) { return -lastDirection; } } else { invert = true; } } else { // Regular if (mouseOnAxis > targetS1 + targetLength * (1 - swapThreshold) / 2 && mouseOnAxis < targetS2 - targetLength * (1 - swapThreshold) / 2) { return _getInsertDirection(target); } } } invert = invert || invertSwap; if (invert) { // Invert of regular if (mouseOnAxis < targetS1 + targetLength * invertedSwapThreshold / 2 || mouseOnAxis > targetS2 - targetLength * invertedSwapThreshold / 2) { return mouseOnAxis > targetS1 + targetLength / 2 ? 1 : -1; } } return 0; } /** * Gets the direction dragEl must be swapped relative to target in order to make it * seem that dragEl has been "inserted" into that element's position * @param {HTMLElement} target The target whose position dragEl is being inserted at * @return {Number} Direction dragEl must be swapped */ function _getInsertDirection(target) { if (index(dragEl) < index(target)) { return 1; } else { return -1; } } /** * Generate id * @param {HTMLElement} el * @returns {String} * @private */ function _generateId(el) { var str = el.tagName + el.className + el.src + el.href + el.textContent, i = str.length, sum = 0; while (i--) { sum += str.charCodeAt(i); } return sum.toString(36); } function _saveInputCheckedState(root) { savedInputChecked.length = 0; var inputs = root.getElementsByTagName('input'); var idx = inputs.length; while (idx--) { var el = inputs[idx]; el.checked && savedInputChecked.push(el); } } function _nextTick(fn) { return setTimeout(fn, 0); } function _cancelNextTick(id) { return clearTimeout(id); } // Fixed #973: if (documentExists) { on(document, 'touchmove', function (evt) { if ((Sortable.active || awaitingDragStarted) && evt.cancelable) { evt.preventDefault(); } }); } // Export utils Sortable.utils = { on: on, off: off, css: css, find: find, is: function is(el, selector) { return !!closest(el, selector, el, false); }, extend: extend, throttle: throttle, closest: closest, toggleClass: toggleClass, clone: clone, index: index, nextTick: _nextTick, cancelNextTick: _cancelNextTick, detectDirection: _detectDirection, getChild: getChild }; /** * Get the Sortable instance of an element * @param {HTMLElement} element The element * @return {Sortable|undefined} The instance of Sortable */ Sortable.get = function (element) { return element[expando]; }; /** * Mount a plugin to Sortable * @param {...SortablePlugin|SortablePlugin[]} plugins Plugins being mounted */ Sortable.mount = function () { for (var _len = arguments.length, plugins = new Array(_len), _key = 0; _key < _len; _key++) { plugins[_key] = arguments[_key]; } if (plugins[0].constructor === Array) plugins = plugins[0]; plugins.forEach(function (plugin) { if (!plugin.prototype || !plugin.prototype.constructor) { throw "Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(plugin)); } if (plugin.utils) Sortable.utils = _objectSpread2(_objectSpread2({}, Sortable.utils), plugin.utils); PluginManager.mount(plugin); }); }; /** * Create sortable instance * @param {HTMLElement} el * @param {Object} [options] */ Sortable.create = function (el, options) { return new Sortable(el, options); }; // Export Sortable.version = version; var autoScrolls = [], scrollEl, scrollRootEl, scrolling = false, lastAutoScrollX, lastAutoScrollY, touchEvt$1, pointerElemChangedInterval; function AutoScrollPlugin() { function AutoScroll() { this.defaults = { scroll: true, forceAutoScrollFallback: false, scrollSensitivity: 30, scrollSpeed: 10, bubbleScroll: true }; // Bind all private methods for (var fn in this) { if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { this[fn] = this[fn].bind(this); } } } AutoScroll.prototype = { dragStarted: function dragStarted(_ref) { var originalEvent = _ref.originalEvent; if (this.sortable.nativeDraggable) { on(document, 'dragover', this._handleAutoScroll); } else { if (this.options.supportPointer) { on(document, 'pointermove', this._handleFallbackAutoScroll); } else if (originalEvent.touches) { on(document, 'touchmove', this._handleFallbackAutoScroll); } else { on(document, 'mousemove', this._handleFallbackAutoScroll); } } }, dragOverCompleted: function dragOverCompleted(_ref2) { var originalEvent = _ref2.originalEvent; // For when bubbling is canceled and using fallback (fallback 'touchmove' always reached) if (!this.options.dragOverBubble && !originalEvent.rootEl) { this._handleAutoScroll(originalEvent); } }, drop: function drop() { if (this.sortable.nativeDraggable) { off(document, 'dragover', this._handleAutoScroll); } else { off(document, 'pointermove', this._handleFallbackAutoScroll); off(document, 'touchmove', this._handleFallbackAutoScroll); off(document, 'mousemove', this._handleFallbackAutoScroll); } clearPointerElemChangedInterval(); clearAutoScrolls(); cancelThrottle(); }, nulling: function nulling() { touchEvt$1 = scrollRootEl = scrollEl = scrolling = pointerElemChangedInterval = lastAutoScrollX = lastAutoScrollY = null; autoScrolls.length = 0; }, _handleFallbackAutoScroll: function _handleFallbackAutoScroll(evt) { this._handleAutoScroll(evt, true); }, _handleAutoScroll: function _handleAutoScroll(evt, fallback) { var _this = this; var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, elem = document.elementFromPoint(x, y); touchEvt$1 = evt; // IE does not seem to have native autoscroll, // Edge's autoscroll seems too conditional, // MACOS Safari does not have autoscroll, // Firefox and Chrome are good if (fallback || this.options.forceAutoScrollFallback || Edge || IE11OrLess || Safari) { autoScroll(evt, this.options, elem, fallback); // Listener for pointer element change var ogElemScroller = getParentAutoScrollElement(elem, true); if (scrolling && (!pointerElemChangedInterval || x !== lastAutoScrollX || y !== lastAutoScrollY)) { pointerElemChangedInterval && clearPointerElemChangedInterval(); // Detect for pointer elem change, emulating native DnD behaviour pointerElemChangedInterval = setInterval(function () { var newElem = getParentAutoScrollElement(document.elementFromPoint(x, y), true); if (newElem !== ogElemScroller) { ogElemScroller = newElem; clearAutoScrolls(); } autoScroll(evt, _this.options, newElem, fallback); }, 10); lastAutoScrollX = x; lastAutoScrollY = y; } } else { // if DnD is enabled (and browser has good autoscrolling), first autoscroll will already scroll, so get parent autoscroll of first autoscroll if (!this.options.bubbleScroll || getParentAutoScrollElement(elem, true) === getWindowScrollingElement()) { clearAutoScrolls(); return; } autoScroll(evt, this.options, getParentAutoScrollElement(elem, false), false); } } }; return _extends(AutoScroll, { pluginName: 'scroll', initializeByDefault: true }); } function clearAutoScrolls() { autoScrolls.forEach(function (autoScroll) { clearInterval(autoScroll.pid); }); autoScrolls = []; } function clearPointerElemChangedInterval() { clearInterval(pointerElemChangedInterval); } var autoScroll = throttle(function (evt, options, rootEl, isFallback) { // Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=505521 if (!options.scroll) return; var x = (evt.touches ? evt.touches[0] : evt).clientX, y = (evt.touches ? evt.touches[0] : evt).clientY, sens = options.scrollSensitivity, speed = options.scrollSpeed, winScroller = getWindowScrollingElement(); var scrollThisInstance = false, scrollCustomFn; // New scroll root, set scrollEl if (scrollRootEl !== rootEl) { scrollRootEl = rootEl; clearAutoScrolls(); scrollEl = options.scroll; scrollCustomFn = options.scrollFn; if (scrollEl === true) { scrollEl = getParentAutoScrollElement(rootEl, true); } } var layersOut = 0; var currentParent = scrollEl; do { var el = currentParent, rect = getRect(el), top = rect.top, bottom = rect.bottom, left = rect.left, right = rect.right, width = rect.width, height = rect.height, canScrollX = void 0, canScrollY = void 0, scrollWidth = el.scrollWidth, scrollHeight = el.scrollHeight, elCSS = css(el), scrollPosX = el.scrollLeft, scrollPosY = el.scrollTop; if (el === winScroller) { canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll' || elCSS.overflowX === 'visible'); canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll' || elCSS.overflowY === 'visible'); } else { canScrollX = width < scrollWidth && (elCSS.overflowX === 'auto' || elCSS.overflowX === 'scroll'); canScrollY = height < scrollHeight && (elCSS.overflowY === 'auto' || elCSS.overflowY === 'scroll'); } var vx = canScrollX && (Math.abs(right - x) <= sens && scrollPosX + width < scrollWidth) - (Math.abs(left - x) <= sens && !!scrollPosX); var vy = canScrollY && (Math.abs(bottom - y) <= sens && scrollPosY + height < scrollHeight) - (Math.abs(top - y) <= sens && !!scrollPosY); if (!autoScrolls[layersOut]) { for (var i = 0; i <= layersOut; i++) { if (!autoScrolls[i]) { autoScrolls[i] = {}; } } } if (autoScrolls[layersOut].vx != vx || autoScrolls[layersOut].vy != vy || autoScrolls[layersOut].el !== el) { autoScrolls[layersOut].el = el; autoScrolls[layersOut].vx = vx; autoScrolls[layersOut].vy = vy; clearInterval(autoScrolls[layersOut].pid); if (vx != 0 || vy != 0) { scrollThisInstance = true; /* jshint loopfunc:true */ autoScrolls[layersOut].pid = setInterval(function () { // emulate drag over during autoscroll (fallback), emulating native DnD behaviour if (isFallback && this.layer === 0) { Sortable.active._onTouchMove(touchEvt$1); // To move ghost if it is positioned absolutely } var scrollOffsetY = autoScrolls[this.layer].vy ? autoScrolls[this.layer].vy * speed : 0; var scrollOffsetX = autoScrolls[this.layer].vx ? autoScrolls[this.layer].vx * speed : 0; if (typeof scrollCustomFn === 'function') { if (scrollCustomFn.call(Sortable.dragged.parentNode[expando], scrollOffsetX, scrollOffsetY, evt, touchEvt$1, autoScrolls[this.layer].el) !== 'continue') { return; } } scrollBy(autoScrolls[this.layer].el, scrollOffsetX, scrollOffsetY); }.bind({ layer: layersOut }), 24); } } layersOut++; } while (options.bubbleScroll && currentParent !== winScroller && (currentParent = getParentAutoScrollElement(currentParent, false))); scrolling = scrollThisInstance; // in case another function catches scrolling as false in between when it is not }, 30); var drop = function drop(_ref) { var originalEvent = _ref.originalEvent, putSortable = _ref.putSortable, dragEl = _ref.dragEl, activeSortable = _ref.activeSortable, dispatchSortableEvent = _ref.dispatchSortableEvent, hideGhostForTarget = _ref.hideGhostForTarget, unhideGhostForTarget = _ref.unhideGhostForTarget; if (!originalEvent) return; var toSortable = putSortable || activeSortable; hideGhostForTarget(); var touch = originalEvent.changedTouches && originalEvent.changedTouches.length ? originalEvent.changedTouches[0] : originalEvent; var target = document.elementFromPoint(touch.clientX, touch.clientY); unhideGhostForTarget(); if (toSortable && !toSortable.el.contains(target)) { dispatchSortableEvent('spill'); this.onSpill({ dragEl: dragEl, putSortable: putSortable }); } }; function Revert() {} Revert.prototype = { startIndex: null, dragStart: function dragStart(_ref2) { var oldDraggableIndex = _ref2.oldDraggableIndex; this.startIndex = oldDraggableIndex; }, onSpill: function onSpill(_ref3) { var dragEl = _ref3.dragEl, putSortable = _ref3.putSortable; this.sortable.captureAnimationState(); if (putSortable) { putSortable.captureAnimationState(); } var nextSibling = getChild(this.sortable.el, this.startIndex, this.options); if (nextSibling) { this.sortable.el.insertBefore(dragEl, nextSibling); } else { this.sortable.el.appendChild(dragEl); } this.sortable.animateAll(); if (putSortable) { putSortable.animateAll(); } }, drop: drop }; _extends(Revert, { pluginName: 'revertOnSpill' }); function Remove() {} Remove.prototype = { onSpill: function onSpill(_ref4) { var dragEl = _ref4.dragEl, putSortable = _ref4.putSortable; var parentSortable = putSortable || this.sortable; parentSortable.captureAnimationState(); dragEl.parentNode && dragEl.parentNode.removeChild(dragEl); parentSortable.animateAll(); }, drop: drop }; _extends(Remove, { pluginName: 'removeOnSpill' }); var lastSwapEl; function SwapPlugin() { function Swap() { this.defaults = { swapClass: 'sortable-swap-highlight' }; } Swap.prototype = { dragStart: function dragStart(_ref) { var dragEl = _ref.dragEl; lastSwapEl = dragEl; }, dragOverValid: function dragOverValid(_ref2) { var completed = _ref2.completed, target = _ref2.target, onMove = _ref2.onMove, activeSortable = _ref2.activeSortable, changed = _ref2.changed, cancel = _ref2.cancel; if (!activeSortable.options.swap) return; var el = this.sortable.el, options = this.options; if (target && target !== el) { var prevSwapEl = lastSwapEl; if (onMove(target) !== false) { toggleClass(target, options.swapClass, true); lastSwapEl = target; } else { lastSwapEl = null; } if (prevSwapEl && prevSwapEl !== lastSwapEl) { toggleClass(prevSwapEl, options.swapClass, false); } } changed(); completed(true); cancel(); }, drop: function drop(_ref3) { var activeSortable = _ref3.activeSortable, putSortable = _ref3.putSortable, dragEl = _ref3.dragEl; var toSortable = putSortable || this.sortable; var options = this.options; lastSwapEl && toggleClass(lastSwapEl, options.swapClass, false); if (lastSwapEl && (options.swap || putSortable && putSortable.options.swap)) { if (dragEl !== lastSwapEl) { toSortable.captureAnimationState(); if (toSortable !== activeSortable) activeSortable.captureAnimationState(); swapNodes(dragEl, lastSwapEl); toSortable.animateAll(); if (toSortable !== activeSortable) activeSortable.animateAll(); } } }, nulling: function nulling() { lastSwapEl = null; } }; return _extends(Swap, { pluginName: 'swap', eventProperties: function eventProperties() { return { swapItem: lastSwapEl }; } }); } function swapNodes(n1, n2) { var p1 = n1.parentNode, p2 = n2.parentNode, i1, i2; if (!p1 || !p2 || p1.isEqualNode(n2) || p2.isEqualNode(n1)) return; i1 = index(n1); i2 = index(n2); if (p1.isEqualNode(p2) && i1 < i2) { i2++; } p1.insertBefore(n2, p1.children[i1]); p2.insertBefore(n1, p2.children[i2]); } var multiDragElements = [], multiDragClones = [], lastMultiDragSelect, // for selection with modifier key down (SHIFT) multiDragSortable, initialFolding = false, // Initial multi-drag fold when drag started folding = false, // Folding any other time dragStarted = false, dragEl$1, clonesFromRect, clonesHidden; function MultiDragPlugin() { function MultiDrag(sortable) { // Bind all private methods for (var fn in this) { if (fn.charAt(0) === '_' && typeof this[fn] === 'function') { this[fn] = this[fn].bind(this); } } if (!sortable.options.avoidImplicitDeselect) { if (sortable.options.supportPointer) { on(document, 'pointerup', this._deselectMultiDrag); } else { on(document, 'mouseup', this._deselectMultiDrag); on(document, 'touchend', this._deselectMultiDrag); } } on(document, 'keydown', this._checkKeyDown); on(document, 'keyup', this._checkKeyUp); this.defaults = { selectedClass: 'sortable-selected', multiDragKey: null, avoidImplicitDeselect: false, setData: function setData(dataTransfer, dragEl) { var data = ''; if (multiDragElements.length && multiDragSortable === sortable) { multiDragElements.forEach(function (multiDragElement, i) { data += (!i ? '' : ', ') + multiDragElement.textContent; }); } else { data = dragEl.textContent; } dataTransfer.setData('Text', data); } }; } MultiDrag.prototype = { multiDragKeyDown: false, isMultiDrag: false, delayStartGlobal: function delayStartGlobal(_ref) { var dragged = _ref.dragEl; dragEl$1 = dragged; }, delayEnded: function delayEnded() { this.isMultiDrag = ~multiDragElements.indexOf(dragEl$1); }, setupClone: function setupClone(_ref2) { var sortable = _ref2.sortable, cancel = _ref2.cancel; if (!this.isMultiDrag) return; for (var i = 0; i < multiDragElements.length; i++) { multiDragClones.push(clone(multiDragElements[i])); multiDragClones[i].sortableIndex = multiDragElements[i].sortableIndex; multiDragClones[i].draggable = false; multiDragClones[i].style['will-change'] = ''; toggleClass(multiDragClones[i], this.options.selectedClass, false); multiDragElements[i] === dragEl$1 && toggleClass(multiDragClones[i], this.options.chosenClass, false); } sortable._hideClone(); cancel(); }, clone: function clone(_ref3) { var sortable = _ref3.sortable, rootEl = _ref3.rootEl, dispatchSortableEvent = _ref3.dispatchSortableEvent, cancel = _ref3.cancel; if (!this.isMultiDrag) return; if (!this.options.removeCloneOnHide) { if (multiDragElements.length && multiDragSortable === sortable) { insertMultiDragClones(true, rootEl); dispatchSortableEvent('clone'); cancel(); } } }, showClone: function showClone(_ref4) { var cloneNowShown = _ref4.cloneNowShown, rootEl = _ref4.rootEl, cancel = _ref4.cancel; if (!this.isMultiDrag) return; insertMultiDragClones(false, rootEl); multiDragClones.forEach(function (clone) { css(clone, 'display', ''); }); cloneNowShown(); clonesHidden = false; cancel(); }, hideClone: function hideClone(_ref5) { var _this = this; var sortable = _ref5.sortable, cloneNowHidden = _ref5.cloneNowHidden, cancel = _ref5.cancel; if (!this.isMultiDrag) return; multiDragClones.forEach(function (clone) { css(clone, 'display', 'none'); if (_this.options.removeCloneOnHide && clone.parentNode) { clone.parentNode.removeChild(clone); } }); cloneNowHidden(); clonesHidden = true; cancel(); }, dragStartGlobal: function dragStartGlobal(_ref6) { var sortable = _ref6.sortable; if (!this.isMultiDrag && multiDragSortable) { multiDragSortable.multiDrag._deselectMultiDrag(); } multiDragElements.forEach(function (multiDragElement) { multiDragElement.sortableIndex = index(multiDragElement); }); // Sort multi-drag elements multiDragElements = multiDragElements.sort(function (a, b) { return a.sortableIndex - b.sortableIndex; }); dragStarted = true; }, dragStarted: function dragStarted(_ref7) { var _this2 = this; var sortable = _ref7.sortable; if (!this.isMultiDrag) return; if (this.options.sort) { // Capture rects, // hide multi drag elements (by positioning them absolute), // set multi drag elements rects to dragRect, // show multi drag elements, // animate to rects, // unset rects & remove from DOM sortable.captureAnimationState(); if (this.options.animation) { multiDragElements.forEach(function (multiDragElement) { if (multiDragElement === dragEl$1) return; css(multiDragElement, 'position', 'absolute'); }); var dragRect = getRect(dragEl$1, false, true, true); multiDragElements.forEach(function (multiDragElement) { if (multiDragElement === dragEl$1) return; setRect(multiDragElement, dragRect); }); folding = true; initialFolding = true; } } sortable.animateAll(function () { folding = false; initialFolding = false; if (_this2.options.animation) { multiDragElements.forEach(function (multiDragElement) { unsetRect(multiDragElement); }); } // Remove all auxiliary multidrag items from el, if sorting enabled if (_this2.options.sort) { removeMultiDragElements(); } }); }, dragOver: function dragOver(_ref8) { var target = _ref8.target, completed = _ref8.completed, cancel = _ref8.cancel; if (folding && ~multiDragElements.indexOf(target)) { completed(false); cancel(); } }, revert: function revert(_ref9) { var fromSortable = _ref9.fromSortable, rootEl = _ref9.rootEl, sortable = _ref9.sortable, dragRect = _ref9.dragRect; if (multiDragElements.length > 1) { // Setup unfold animation multiDragElements.forEach(function (multiDragElement) { sortable.addAnimationState({ target: multiDragElement, rect: folding ? getRect(multiDragElement) : dragRect }); unsetRect(multiDragElement); multiDragElement.fromRect = dragRect; fromSortable.removeAnimationState(multiDragElement); }); folding = false; insertMultiDragElements(!this.options.removeCloneOnHide, rootEl); } }, dragOverCompleted: function dragOverCompleted(_ref10) { var sortable = _ref10.sortable, isOwner = _ref10.isOwner, insertion = _ref10.insertion, activeSortable = _ref10.activeSortable, parentEl = _ref10.parentEl, putSortable = _ref10.putSortable; var options = this.options; if (insertion) { // Clones must be hidden before folding animation to capture dragRectAbsolute properly if (isOwner) { activeSortable._hideClone(); } initialFolding = false; // If leaving sort:false root, or already folding - Fold to new location if (options.animation && multiDragElements.length > 1 && (folding || !isOwner && !activeSortable.options.sort && !putSortable)) { // Fold: Set all multi drag elements's rects to dragEl's rect when multi-drag elements are invisible var dragRectAbsolute = getRect(dragEl$1, false, true, true); multiDragElements.forEach(function (multiDragElement) { if (multiDragElement === dragEl$1) return; setRect(multiDragElement, dragRectAbsolute); // Move element(s) to end of parentEl so that it does not interfere with multi-drag clones insertion if they are inserted // while folding, and so that we can capture them again because old sortable will no longer be fromSortable parentEl.appendChild(multiDragElement); }); folding = true; } // Clones must be shown (and check to remove multi drags) after folding when interfering multiDragElements are moved out if (!isOwner) { // Only remove if not folding (folding will remove them anyways) if (!folding) { removeMultiDragElements(); } if (multiDragElements.length > 1) { var clonesHiddenBefore = clonesHidden; activeSortable._showClone(sortable); // Unfold animation for clones if showing from hidden if (activeSortable.options.animation && !clonesHidden && clonesHiddenBefore) { multiDragClones.forEach(function (clone) { activeSortable.addAnimationState({ target: clone, rect: clonesFromRect }); clone.fromRect = clonesFromRect; clone.thisAnimationDuration = null; }); } } else { activeSortable._showClone(sortable); } } } }, dragOverAnimationCapture: function dragOverAnimationCapture(_ref11) { var dragRect = _ref11.dragRect, isOwner = _ref11.isOwner, activeSortable = _ref11.activeSortable; multiDragElements.forEach(function (multiDragElement) { multiDragElement.thisAnimationDuration = null; }); if (activeSortable.options.animation && !isOwner && activeSortable.multiDrag.isMultiDrag) { clonesFromRect = _extends({}, dragRect); var dragMatrix = matrix(dragEl$1, true); clonesFromRect.top -= dragMatrix.f; clonesFromRect.left -= dragMatrix.e; } }, dragOverAnimationComplete: function dragOverAnimationComplete() { if (folding) { folding = false; removeMultiDragElements(); } }, drop: function drop(_ref12) { var evt = _ref12.originalEvent, rootEl = _ref12.rootEl, parentEl = _ref12.parentEl, sortable = _ref12.sortable, dispatchSortableEvent = _ref12.dispatchSortableEvent, oldIndex = _ref12.oldIndex, putSortable = _ref12.putSortable; var toSortable = putSortable || this.sortable; if (!evt) return; var options = this.options, children = parentEl.children; // Multi-drag selection if (!dragStarted) { if (options.multiDragKey && !this.multiDragKeyDown) { this._deselectMultiDrag(); } toggleClass(dragEl$1, options.selectedClass, !~multiDragElements.indexOf(dragEl$1)); if (!~multiDragElements.indexOf(dragEl$1)) { multiDragElements.push(dragEl$1); dispatchEvent({ sortable: sortable, rootEl: rootEl, name: 'select', targetEl: dragEl$1, originalEvent: evt }); // Modifier activated, select from last to dragEl if (evt.shiftKey && lastMultiDragSelect && sortable.el.contains(lastMultiDragSelect)) { var lastIndex = index(lastMultiDragSelect), currentIndex = index(dragEl$1); if (~lastIndex && ~currentIndex && lastIndex !== currentIndex) { // Must include lastMultiDragSelect (select it), in case modified selection from no selection // (but previous selection existed) var n, i; if (currentIndex > lastIndex) { i = lastIndex; n = currentIndex; } else { i = currentIndex; n = lastIndex + 1; } for (; i < n; i++) { if (~multiDragElements.indexOf(children[i])) continue; toggleClass(children[i], options.selectedClass, true); multiDragElements.push(children[i]); dispatchEvent({ sortable: sortable, rootEl: rootEl, name: 'select', targetEl: children[i], originalEvent: evt }); } } } else { lastMultiDragSelect = dragEl$1; } multiDragSortable = toSortable; } else { multiDragElements.splice(multiDragElements.indexOf(dragEl$1), 1); lastMultiDragSelect = null; dispatchEvent({ sortable: sortable, rootEl: rootEl, name: 'deselect', targetEl: dragEl$1, originalEvent: evt }); } } // Multi-drag drop if (dragStarted && this.isMultiDrag) { folding = false; // Do not "unfold" after around dragEl if reverted if ((parentEl[expando].options.sort || parentEl !== rootEl) && multiDragElements.length > 1) { var dragRect = getRect(dragEl$1), multiDragIndex = index(dragEl$1, ':not(.' + this.options.selectedClass + ')'); if (!initialFolding && options.animation) dragEl$1.thisAnimationDuration = null; toSortable.captureAnimationState(); if (!initialFolding) { if (options.animation) { dragEl$1.fromRect = dragRect; multiDragElements.forEach(function (multiDragElement) { multiDragElement.thisAnimationDuration = null; if (multiDragElement !== dragEl$1) { var rect = folding ? getRect(multiDragElement) : dragRect; multiDragElement.fromRect = rect; // Prepare unfold animation toSortable.addAnimationState({ target: multiDragElement, rect: rect }); } }); } // Multi drag elements are not necessarily removed from the DOM on drop, so to reinsert // properly they must all be removed removeMultiDragElements(); multiDragElements.forEach(function (multiDragElement) { if (children[multiDragIndex]) { parentEl.insertBefore(multiDragElement, children[multiDragIndex]); } else { parentEl.appendChild(multiDragElement); } multiDragIndex++; }); // If initial folding is done, the elements may have changed position because they are now // unfolding around dragEl, even though dragEl may not have his index changed, so update event // must be fired here as Sortable will not. if (oldIndex === index(dragEl$1)) { var update = false; multiDragElements.forEach(function (multiDragElement) { if (multiDragElement.sortableIndex !== index(multiDragElement)) { update = true; return; } }); if (update) { dispatchSortableEvent('update'); } } } // Must be done after capturing individual rects (scroll bar) multiDragElements.forEach(function (multiDragElement) { unsetRect(multiDragElement); }); toSortable.animateAll(); } multiDragSortable = toSortable; } // Remove clones if necessary if (rootEl === parentEl || putSortable && putSortable.lastPutMode !== 'clone') { multiDragClones.forEach(function (clone) { clone.parentNode && clone.parentNode.removeChild(clone); }); } }, nullingGlobal: function nullingGlobal() { this.isMultiDrag = dragStarted = false; multiDragClones.length = 0; }, destroyGlobal: function destroyGlobal() { this._deselectMultiDrag(); off(document, 'pointerup', this._deselectMultiDrag); off(document, 'mouseup', this._deselectMultiDrag); off(document, 'touchend', this._deselectMultiDrag); off(document, 'keydown', this._checkKeyDown); off(document, 'keyup', this._checkKeyUp); }, _deselectMultiDrag: function _deselectMultiDrag(evt) { if (typeof dragStarted !== "undefined" && dragStarted) return; // Only deselect if selection is in this sortable if (multiDragSortable !== this.sortable) return; // Only deselect if target is not item in this sortable if (evt && closest(evt.target, this.options.draggable, this.sortable.el, false)) return; // Only deselect if left click if (evt && evt.button !== 0) return; while (multiDragElements.length) { var el = multiDragElements[0]; toggleClass(el, this.options.selectedClass, false); multiDragElements.shift(); dispatchEvent({ sortable: this.sortable, rootEl: this.sortable.el, name: 'deselect', targetEl: el, originalEvent: evt }); } }, _checkKeyDown: function _checkKeyDown(evt) { if (evt.key === this.options.multiDragKey) { this.multiDragKeyDown = true; } }, _checkKeyUp: function _checkKeyUp(evt) { if (evt.key === this.options.multiDragKey) { this.multiDragKeyDown = false; } } }; return _extends(MultiDrag, { // Static methods & properties pluginName: 'multiDrag', utils: { /** * Selects the provided multi-drag item * @param {HTMLElement} el The element to be selected */ select: function select(el) { var sortable = el.parentNode[expando]; if (!sortable || !sortable.options.multiDrag || ~multiDragElements.indexOf(el)) return; if (multiDragSortable && multiDragSortable !== sortable) { multiDragSortable.multiDrag._deselectMultiDrag(); multiDragSortable = sortable; } toggleClass(el, sortable.options.selectedClass, true); multiDragElements.push(el); }, /** * Deselects the provided multi-drag item * @param {HTMLElement} el The element to be deselected */ deselect: function deselect(el) { var sortable = el.parentNode[expando], index = multiDragElements.indexOf(el); if (!sortable || !sortable.options.multiDrag || !~index) return; toggleClass(el, sortable.options.selectedClass, false); multiDragElements.splice(index, 1); } }, eventProperties: function eventProperties() { var _this3 = this; var oldIndicies = [], newIndicies = []; multiDragElements.forEach(function (multiDragElement) { oldIndicies.push({ multiDragElement: multiDragElement, index: multiDragElement.sortableIndex }); // multiDragElements will already be sorted if folding var newIndex; if (folding && multiDragElement !== dragEl$1) { newIndex = -1; } else if (folding) { newIndex = index(multiDragElement, ':not(.' + _this3.options.selectedClass + ')'); } else { newIndex = index(multiDragElement); } newIndicies.push({ multiDragElement: multiDragElement, index: newIndex }); }); return { items: _toConsumableArray(multiDragElements), clones: [].concat(multiDragClones), oldIndicies: oldIndicies, newIndicies: newIndicies }; }, optionListeners: { multiDragKey: function multiDragKey(key) { key = key.toLowerCase(); if (key === 'ctrl') { key = 'Control'; } else if (key.length > 1) { key = key.charAt(0).toUpperCase() + key.substr(1); } return key; } } }); } function insertMultiDragElements(clonesInserted, rootEl) { multiDragElements.forEach(function (multiDragElement, i) { var target = rootEl.children[multiDragElement.sortableIndex + (clonesInserted ? Number(i) : 0)]; if (target) { rootEl.insertBefore(multiDragElement, target); } else { rootEl.appendChild(multiDragElement); } }); } /** * Insert multi-drag clones * @param {[Boolean]} elementsInserted Whether the multi-drag elements are inserted * @param {HTMLElement} rootEl */ function insertMultiDragClones(elementsInserted, rootEl) { multiDragClones.forEach(function (clone, i) { var target = rootEl.children[clone.sortableIndex + (elementsInserted ? Number(i) : 0)]; if (target) { rootEl.insertBefore(clone, target); } else { rootEl.appendChild(clone); } }); } function removeMultiDragElements() { multiDragElements.forEach(function (multiDragElement) { if (multiDragElement === dragEl$1) return; multiDragElement.parentNode && multiDragElement.parentNode.removeChild(multiDragElement); }); } Sortable.mount(new AutoScrollPlugin()); Sortable.mount(Remove, Revert); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (Sortable); /***/ }), /***/ "./node_modules/tiny-invariant/dist/tiny-invariant.esm.js": /*!****************************************************************!*\ !*** ./node_modules/tiny-invariant/dist/tiny-invariant.esm.js ***! \****************************************************************/ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ invariant) /* harmony export */ }); var isProduction = "development" === 'production'; var prefix = 'Invariant failed'; function invariant(condition, message) { if (condition) { return; } if (isProduction) { throw new Error(prefix); } var provided = typeof message === 'function' ? message() : message; var value = provided ? prefix + ": " + provided : prefix; throw new Error(value); } /***/ }), /***/ "./src/blocks/image/lazyPlaceholder.gif": /*!**********************************************!*\ !*** ./src/blocks/image/lazyPlaceholder.gif ***! \**********************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__.p + "images/lazyPlaceholder.aa7f8baa.gif"; /***/ }), /***/ "./src/blocks/image/placeholder.jpg": /*!******************************************!*\ !*** ./src/blocks/image/placeholder.jpg ***! \******************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__.p + "images/placeholder.da204f5f.jpg"; /***/ }), /***/ "./src/blocks/post-featured-image/placeholder.jpg": /*!********************************************************!*\ !*** ./src/blocks/post-featured-image/placeholder.jpg ***! \********************************************************/ /***/ ((module, __unused_webpack_exports, __webpack_require__) => { "use strict"; module.exports = __webpack_require__.p + "images/placeholder.da204f5f.jpg"; /***/ }), /***/ "react": /*!************************!*\ !*** external "React" ***! \************************/ /***/ ((module) => { "use strict"; module.exports = window["React"]; /***/ }), /***/ "@wordpress/api-fetch": /*!**********************************!*\ !*** external ["wp","apiFetch"] ***! \**********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["apiFetch"]; /***/ }), /***/ "@wordpress/block-editor": /*!*************************************!*\ !*** external ["wp","blockEditor"] ***! \*************************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["blockEditor"]; /***/ }), /***/ "@wordpress/blocks": /*!********************************!*\ !*** external ["wp","blocks"] ***! \********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["blocks"]; /***/ }), /***/ "@wordpress/components": /*!************************************!*\ !*** external ["wp","components"] ***! \************************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["components"]; /***/ }), /***/ "@wordpress/compose": /*!*********************************!*\ !*** external ["wp","compose"] ***! \*********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["compose"]; /***/ }), /***/ "@wordpress/core-data": /*!**********************************!*\ !*** external ["wp","coreData"] ***! \**********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["coreData"]; /***/ }), /***/ "@wordpress/data": /*!******************************!*\ !*** external ["wp","data"] ***! \******************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["data"]; /***/ }), /***/ "@wordpress/edit-post": /*!**********************************!*\ !*** external ["wp","editPost"] ***! \**********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["editPost"]; /***/ }), /***/ "@wordpress/element": /*!*********************************!*\ !*** external ["wp","element"] ***! \*********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["element"]; /***/ }), /***/ "@wordpress/hooks": /*!*******************************!*\ !*** external ["wp","hooks"] ***! \*******************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["hooks"]; /***/ }), /***/ "@wordpress/i18n": /*!******************************!*\ !*** external ["wp","i18n"] ***! \******************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["i18n"]; /***/ }), /***/ "@wordpress/plugins": /*!*********************************!*\ !*** external ["wp","plugins"] ***! \*********************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["plugins"]; /***/ }), /***/ "@wordpress/primitives": /*!************************************!*\ !*** external ["wp","primitives"] ***! \************************************/ /***/ ((module) => { "use strict"; module.exports = window["wp"]["primitives"]; /***/ }), /***/ "./node_modules/@babel/runtime/helpers/esm/extends.js": /*!************************************************************!*\ !*** ./node_modules/@babel/runtime/helpers/esm/extends.js ***! \************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ "default": () => (/* binding */ _extends) /* harmony export */ }); function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); } /***/ }), /***/ "./node_modules/openai/_shims/MultipartBody.mjs": /*!******************************************************!*\ !*** ./node_modules/openai/_shims/MultipartBody.mjs ***! \******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ MultipartBody: () => (/* binding */ MultipartBody) /* harmony export */ }); /** * Disclaimer: modules in _shims aren't intended to be imported by SDK users. */ class MultipartBody { constructor(body) { this.body = body; } get [Symbol.toStringTag]() { return 'MultipartBody'; } } //# sourceMappingURL=MultipartBody.mjs.map /***/ }), /***/ "./node_modules/openai/_shims/index.mjs": /*!**********************************************!*\ !*** ./node_modules/openai/_shims/index.mjs ***! \**********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Blob: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.Blob), /* harmony export */ File: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.File), /* harmony export */ FormData: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.FormData), /* harmony export */ Headers: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.Headers), /* harmony export */ ReadableStream: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.ReadableStream), /* harmony export */ Request: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.Request), /* harmony export */ Response: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.Response), /* harmony export */ auto: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.auto), /* harmony export */ fetch: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.fetch), /* harmony export */ fileFromPath: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.fileFromPath), /* harmony export */ getDefaultAgent: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultAgent), /* harmony export */ getMultipartRequestOptions: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.getMultipartRequestOptions), /* harmony export */ isFsReadStream: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.isFsReadStream), /* harmony export */ kind: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.kind), /* harmony export */ setShims: () => (/* reexport safe */ _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.setShims) /* harmony export */ }); /* harmony import */ var _registry_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./registry.mjs */ "./node_modules/openai/_shims/registry.mjs"); /* harmony import */ var openai_shims_auto_runtime__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/_shims/auto/runtime */ "./node_modules/openai/_shims/web-runtime.mjs"); /** * Disclaimer: modules in _shims aren't intended to be imported by SDK users. */ if (!_registry_mjs__WEBPACK_IMPORTED_MODULE_0__.kind) _registry_mjs__WEBPACK_IMPORTED_MODULE_0__.setShims(openai_shims_auto_runtime__WEBPACK_IMPORTED_MODULE_1__.getRuntime(), { auto: true }); /***/ }), /***/ "./node_modules/openai/_shims/registry.mjs": /*!*************************************************!*\ !*** ./node_modules/openai/_shims/registry.mjs ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Blob: () => (/* binding */ Blob), /* harmony export */ File: () => (/* binding */ File), /* harmony export */ FormData: () => (/* binding */ FormData), /* harmony export */ Headers: () => (/* binding */ Headers), /* harmony export */ ReadableStream: () => (/* binding */ ReadableStream), /* harmony export */ Request: () => (/* binding */ Request), /* harmony export */ Response: () => (/* binding */ Response), /* harmony export */ auto: () => (/* binding */ auto), /* harmony export */ fetch: () => (/* binding */ fetch), /* harmony export */ fileFromPath: () => (/* binding */ fileFromPath), /* harmony export */ getDefaultAgent: () => (/* binding */ getDefaultAgent), /* harmony export */ getMultipartRequestOptions: () => (/* binding */ getMultipartRequestOptions), /* harmony export */ isFsReadStream: () => (/* binding */ isFsReadStream), /* harmony export */ kind: () => (/* binding */ kind), /* harmony export */ setShims: () => (/* binding */ setShims) /* harmony export */ }); let auto = false; let kind = undefined; let fetch = undefined; let Request = undefined; let Response = undefined; let Headers = undefined; let FormData = undefined; let Blob = undefined; let File = undefined; let ReadableStream = undefined; let getMultipartRequestOptions = undefined; let getDefaultAgent = undefined; let fileFromPath = undefined; let isFsReadStream = undefined; function setShims(shims, options = { auto: false }) { if (auto) { throw new Error(`you must \`import 'openai/shims/${shims.kind}'\` before importing anything else from openai`); } if (kind) { throw new Error(`can't \`import 'openai/shims/${shims.kind}'\` after \`import 'openai/shims/${kind}'\``); } auto = options.auto; kind = shims.kind; fetch = shims.fetch; Request = shims.Request; Response = shims.Response; Headers = shims.Headers; FormData = shims.FormData; Blob = shims.Blob; File = shims.File; ReadableStream = shims.ReadableStream; getMultipartRequestOptions = shims.getMultipartRequestOptions; getDefaultAgent = shims.getDefaultAgent; fileFromPath = shims.fileFromPath; isFsReadStream = shims.isFsReadStream; } //# sourceMappingURL=registry.mjs.map /***/ }), /***/ "./node_modules/openai/_shims/web-runtime.mjs": /*!****************************************************!*\ !*** ./node_modules/openai/_shims/web-runtime.mjs ***! \****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ getRuntime: () => (/* binding */ getRuntime) /* harmony export */ }); /* harmony import */ var _MultipartBody_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./MultipartBody.mjs */ "./node_modules/openai/_shims/MultipartBody.mjs"); function getRuntime({ manuallyImported } = {}) { const recommendation = manuallyImported ? `You may need to use polyfills` : `Add one of these imports before your first \`import … from 'openai'\`: - \`import 'openai/shims/node'\` (if you're running on Node) - \`import 'openai/shims/web'\` (otherwise) `; let _fetch, _Request, _Response, _Headers; try { // @ts-ignore _fetch = fetch; // @ts-ignore _Request = Request; // @ts-ignore _Response = Response; // @ts-ignore _Headers = Headers; } catch (error) { throw new Error(`this environment is missing the following Web Fetch API type: ${error.message}. ${recommendation}`); } return { kind: 'web', fetch: _fetch, Request: _Request, Response: _Response, Headers: _Headers, FormData: // @ts-ignore typeof FormData !== 'undefined' ? FormData : (class FormData { // @ts-ignore constructor() { throw new Error(`file uploads aren't supported in this environment yet as 'FormData' is undefined. ${recommendation}`); } }), Blob: typeof Blob !== 'undefined' ? Blob : (class Blob { constructor() { throw new Error(`file uploads aren't supported in this environment yet as 'Blob' is undefined. ${recommendation}`); } }), File: // @ts-ignore typeof File !== 'undefined' ? File : (class File { // @ts-ignore constructor() { throw new Error(`file uploads aren't supported in this environment yet as 'File' is undefined. ${recommendation}`); } }), ReadableStream: // @ts-ignore typeof ReadableStream !== 'undefined' ? ReadableStream : (class ReadableStream { // @ts-ignore constructor() { throw new Error(`streaming isn't supported in this environment yet as 'ReadableStream' is undefined. ${recommendation}`); } }), getMultipartRequestOptions: async ( // @ts-ignore form, opts) => ({ ...opts, body: new _MultipartBody_mjs__WEBPACK_IMPORTED_MODULE_0__.MultipartBody(form), }), getDefaultAgent: (url) => undefined, fileFromPath: () => { throw new Error('The `fileFromPath` function is only supported in Node. See the README for more details: https://www.github.com/openai/openai-node#file-uploads'); }, isFsReadStream: (value) => false, }; } //# sourceMappingURL=web-runtime.mjs.map /***/ }), /***/ "./node_modules/openai/core.mjs": /*!**************************************!*\ !*** ./node_modules/openai/core.mjs ***! \**************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ APIClient: () => (/* binding */ APIClient), /* harmony export */ APIPromise: () => (/* binding */ APIPromise), /* harmony export */ AbstractPage: () => (/* binding */ AbstractPage), /* harmony export */ PagePromise: () => (/* binding */ PagePromise), /* harmony export */ castToError: () => (/* binding */ castToError), /* harmony export */ coerceBoolean: () => (/* binding */ coerceBoolean), /* harmony export */ coerceFloat: () => (/* binding */ coerceFloat), /* harmony export */ coerceInteger: () => (/* binding */ coerceInteger), /* harmony export */ createForm: () => (/* reexport safe */ _uploads_mjs__WEBPACK_IMPORTED_MODULE_1__.createForm), /* harmony export */ createResponseHeaders: () => (/* binding */ createResponseHeaders), /* harmony export */ debug: () => (/* binding */ debug), /* harmony export */ ensurePresent: () => (/* binding */ ensurePresent), /* harmony export */ getRequiredHeader: () => (/* binding */ getRequiredHeader), /* harmony export */ hasOwn: () => (/* binding */ hasOwn), /* harmony export */ isEmptyObj: () => (/* binding */ isEmptyObj), /* harmony export */ isHeadersProtocol: () => (/* binding */ isHeadersProtocol), /* harmony export */ isRequestOptions: () => (/* binding */ isRequestOptions), /* harmony export */ isRunningInBrowser: () => (/* binding */ isRunningInBrowser), /* harmony export */ maybeCoerceBoolean: () => (/* binding */ maybeCoerceBoolean), /* harmony export */ maybeCoerceFloat: () => (/* binding */ maybeCoerceFloat), /* harmony export */ maybeCoerceInteger: () => (/* binding */ maybeCoerceInteger), /* harmony export */ maybeMultipartFormRequestOptions: () => (/* reexport safe */ _uploads_mjs__WEBPACK_IMPORTED_MODULE_1__.maybeMultipartFormRequestOptions), /* harmony export */ multipartFormRequestOptions: () => (/* reexport safe */ _uploads_mjs__WEBPACK_IMPORTED_MODULE_1__.multipartFormRequestOptions), /* harmony export */ readEnv: () => (/* binding */ readEnv), /* harmony export */ safeJSON: () => (/* binding */ safeJSON), /* harmony export */ sleep: () => (/* binding */ sleep), /* harmony export */ toBase64: () => (/* binding */ toBase64) /* harmony export */ }); /* harmony import */ var _version_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./version.mjs */ "./node_modules/openai/version.mjs"); /* harmony import */ var _streaming_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./streaming.mjs */ "./node_modules/openai/streaming.mjs"); /* harmony import */ var _error_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./error.mjs */ "./node_modules/openai/error.mjs"); /* harmony import */ var _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_shims/index.mjs */ "./node_modules/openai/_shims/index.mjs"); /* harmony import */ var _uploads_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./uploads.mjs */ "./node_modules/openai/uploads.mjs"); var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _AbstractPage_client; async function defaultParseResponse(props) { const { response } = props; if (props.options.stream) { debug('response', response.status, response.url, response.headers, response.body); // Note: there is an invariant here that isn't represented in the type system // that if you set `stream: true` the response type must also be `Stream<T>` return _streaming_mjs__WEBPACK_IMPORTED_MODULE_2__.Stream.fromSSEResponse(response, props.controller); } // fetch refuses to read the body when the status code is 204. if (response.status === 204) { return null; } if (props.options.__binaryResponse) { return response; } const contentType = response.headers.get('content-type'); if (contentType?.includes('application/json')) { const json = await response.json(); debug('response', response.status, response.url, response.headers, json); return json; } const text = await response.text(); debug('response', response.status, response.url, response.headers, text); // TODO handle blob, arraybuffer, other content types, etc. return text; } /** * A subclass of `Promise` providing additional helper methods * for interacting with the SDK. */ class APIPromise extends Promise { constructor(responsePromise, parseResponse = defaultParseResponse) { super((resolve) => { // this is maybe a bit weird but this has to be a no-op to not implicitly // parse the response body; instead .then, .catch, .finally are overridden // to parse the response resolve(null); }); this.responsePromise = responsePromise; this.parseResponse = parseResponse; } _thenUnwrap(transform) { return new APIPromise(this.responsePromise, async (props) => transform(await this.parseResponse(props))); } /** * Gets the raw `Response` instance instead of parsing the response * data. * * If you want to parse the response body but still get the `Response` * instance, you can use {@link withResponse()}. * * 👋 Getting the wrong TypeScript type for `Response`? * Try setting `"moduleResolution": "NodeNext"` if you can, * or add one of these imports before your first `import … from 'openai'`: * - `import 'openai/shims/node'` (if you're running on Node) * - `import 'openai/shims/web'` (otherwise) */ asResponse() { return this.responsePromise.then((p) => p.response); } /** * Gets the parsed response data and the raw `Response` instance. * * If you just want to get the raw `Response` instance without parsing it, * you can use {@link asResponse()}. * * * 👋 Getting the wrong TypeScript type for `Response`? * Try setting `"moduleResolution": "NodeNext"` if you can, * or add one of these imports before your first `import … from 'openai'`: * - `import 'openai/shims/node'` (if you're running on Node) * - `import 'openai/shims/web'` (otherwise) */ async withResponse() { const [data, response] = await Promise.all([this.parse(), this.asResponse()]); return { data, response }; } parse() { if (!this.parsedPromise) { this.parsedPromise = this.responsePromise.then(this.parseResponse); } return this.parsedPromise; } then(onfulfilled, onrejected) { return this.parse().then(onfulfilled, onrejected); } catch(onrejected) { return this.parse().catch(onrejected); } finally(onfinally) { return this.parse().finally(onfinally); } } class APIClient { constructor({ baseURL, maxRetries = 2, timeout = 600000, // 10 minutes httpAgent, fetch: overridenFetch, }) { this.baseURL = baseURL; this.maxRetries = validatePositiveInteger('maxRetries', maxRetries); this.timeout = validatePositiveInteger('timeout', timeout); this.httpAgent = httpAgent; this.fetch = overridenFetch ?? _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.fetch; } authHeaders(opts) { return {}; } /** * Override this to add your own default headers, for example: * * { * ...super.defaultHeaders(), * Authorization: 'Bearer 123', * } */ defaultHeaders(opts) { return { Accept: 'application/json', 'Content-Type': 'application/json', 'User-Agent': this.getUserAgent(), ...getPlatformHeaders(), ...this.authHeaders(opts), }; } /** * Override this to add your own headers validation: */ validateHeaders(headers, customHeaders) { } defaultIdempotencyKey() { return `stainless-node-retry-${uuid4()}`; } get(path, opts) { return this.methodRequest('get', path, opts); } post(path, opts) { return this.methodRequest('post', path, opts); } patch(path, opts) { return this.methodRequest('patch', path, opts); } put(path, opts) { return this.methodRequest('put', path, opts); } delete(path, opts) { return this.methodRequest('delete', path, opts); } methodRequest(method, path, opts) { return this.request(Promise.resolve(opts).then((opts) => ({ method, path, ...opts }))); } getAPIList(path, Page, opts) { return this.requestAPIList(Page, { method: 'get', path, ...opts }); } calculateContentLength(body) { if (typeof body === 'string') { if (typeof Buffer !== 'undefined') { return Buffer.byteLength(body, 'utf8').toString(); } if (typeof TextEncoder !== 'undefined') { const encoder = new TextEncoder(); const encoded = encoder.encode(body); return encoded.length.toString(); } } return null; } buildRequest(options) { const { method, path, query, headers: headers = {} } = options; const body = (0,_uploads_mjs__WEBPACK_IMPORTED_MODULE_1__.isMultipartBody)(options.body) ? options.body.body : options.body ? JSON.stringify(options.body, null, 2) : null; const contentLength = this.calculateContentLength(body); const url = this.buildURL(path, query); if ('timeout' in options) validatePositiveInteger('timeout', options.timeout); const timeout = options.timeout ?? this.timeout; const httpAgent = options.httpAgent ?? this.httpAgent ?? (0,_shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.getDefaultAgent)(url); const minAgentTimeout = timeout + 1000; if (typeof httpAgent?.options?.timeout === 'number' && minAgentTimeout > (httpAgent.options.timeout ?? 0)) { // Allow any given request to bump our agent active socket timeout. // This may seem strange, but leaking active sockets should be rare and not particularly problematic, // and without mutating agent we would need to create more of them. // This tradeoff optimizes for performance. httpAgent.options.timeout = minAgentTimeout; } if (this.idempotencyHeader && method !== 'get') { if (!options.idempotencyKey) options.idempotencyKey = this.defaultIdempotencyKey(); headers[this.idempotencyHeader] = options.idempotencyKey; } const reqHeaders = { ...(contentLength && { 'Content-Length': contentLength }), ...this.defaultHeaders(options), ...headers, }; // let builtin fetch set the Content-Type for multipart bodies if ((0,_uploads_mjs__WEBPACK_IMPORTED_MODULE_1__.isMultipartBody)(options.body) && _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.kind !== 'node') { delete reqHeaders['Content-Type']; } // Strip any headers being explicitly omitted with null Object.keys(reqHeaders).forEach((key) => reqHeaders[key] === null && delete reqHeaders[key]); const req = { method, ...(body && { body: body }), headers: reqHeaders, ...(httpAgent && { agent: httpAgent }), // @ts-ignore node-fetch uses a custom AbortSignal type that is // not compatible with standard web types signal: options.signal ?? null, }; this.validateHeaders(reqHeaders, headers); return { req, url, timeout }; } /** * Used as a callback for mutating the given `RequestInit` object. * * This is useful for cases where you want to add certain headers based off of * the request properties, e.g. `method` or `url`. */ async prepareRequest(request, { url, options }) { } parseHeaders(headers) { return (!headers ? {} : Symbol.iterator in headers ? Object.fromEntries(Array.from(headers).map((header) => [...header])) : { ...headers }); } makeStatusError(status, error, message, headers) { return _error_mjs__WEBPACK_IMPORTED_MODULE_3__.APIError.generate(status, error, message, headers); } request(options, remainingRetries = null) { return new APIPromise(this.makeRequest(options, remainingRetries)); } async makeRequest(optionsInput, retriesRemaining) { const options = await optionsInput; if (retriesRemaining == null) { retriesRemaining = options.maxRetries ?? this.maxRetries; } const { req, url, timeout } = this.buildRequest(options); await this.prepareRequest(req, { url, options }); debug('request', url, options, req.headers); if (options.signal?.aborted) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.APIUserAbortError(); } const controller = new AbortController(); const response = await this.fetchWithTimeout(url, req, timeout, controller).catch(castToError); if (response instanceof Error) { if (options.signal?.aborted) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.APIUserAbortError(); } if (retriesRemaining) { return this.retryRequest(options, retriesRemaining); } if (response.name === 'AbortError') { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.APIConnectionTimeoutError(); } throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.APIConnectionError({ cause: response }); } const responseHeaders = createResponseHeaders(response.headers); if (!response.ok) { if (retriesRemaining && this.shouldRetry(response)) { return this.retryRequest(options, retriesRemaining, responseHeaders); } const errText = await response.text().catch((e) => castToError(e).message); const errJSON = safeJSON(errText); const errMessage = errJSON ? undefined : errText; debug('response', response.status, url, responseHeaders, errMessage); const err = this.makeStatusError(response.status, errJSON, errMessage, responseHeaders); throw err; } return { response, options, controller }; } requestAPIList(Page, options) { const request = this.makeRequest(options, null); return new PagePromise(this, request, Page); } buildURL(path, query) { const url = isAbsoluteURL(path) ? new URL(path) : new URL(this.baseURL + (this.baseURL.endsWith('/') && path.startsWith('/') ? path.slice(1) : path)); const defaultQuery = this.defaultQuery(); if (!isEmptyObj(defaultQuery)) { query = { ...defaultQuery, ...query }; } if (query) { url.search = this.stringifyQuery(query); } return url.toString(); } stringifyQuery(query) { return Object.entries(query) .filter(([_, value]) => typeof value !== 'undefined') .map(([key, value]) => { if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { return `${encodeURIComponent(key)}=${encodeURIComponent(value)}`; } if (value === null) { return `${encodeURIComponent(key)}=`; } throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError(`Cannot stringify type ${typeof value}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`); }) .join('&'); } async fetchWithTimeout(url, init, ms, controller) { const { signal, ...options } = init || {}; if (signal) signal.addEventListener('abort', () => controller.abort()); const timeout = setTimeout(() => controller.abort(), ms); return (this.getRequestClient() // use undefined this binding; fetch errors if bound to something else in browser/cloudflare .fetch.call(undefined, url, { signal: controller.signal, ...options }) .finally(() => { clearTimeout(timeout); })); } getRequestClient() { return { fetch: this.fetch }; } shouldRetry(response) { // Note this is not a standard header. const shouldRetryHeader = response.headers.get('x-should-retry'); // If the server explicitly says whether or not to retry, obey. if (shouldRetryHeader === 'true') return true; if (shouldRetryHeader === 'false') return false; // Retry on request timeouts. if (response.status === 408) return true; // Retry on lock timeouts. if (response.status === 409) return true; // Retry on rate limits. if (response.status === 429) return true; // Retry internal errors. if (response.status >= 500) return true; return false; } async retryRequest(options, retriesRemaining, responseHeaders) { // About the Retry-After header: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Retry-After let timeoutMillis; const retryAfterHeader = responseHeaders?.['retry-after']; if (retryAfterHeader) { const timeoutSeconds = parseInt(retryAfterHeader); if (!Number.isNaN(timeoutSeconds)) { timeoutMillis = timeoutSeconds * 1000; } else { timeoutMillis = Date.parse(retryAfterHeader) - Date.now(); } } // If the API asks us to wait a certain amount of time (and it's a reasonable amount), // just do what it says, but otherwise calculate a default if (!timeoutMillis || !Number.isInteger(timeoutMillis) || timeoutMillis <= 0 || timeoutMillis > 60 * 1000) { const maxRetries = options.maxRetries ?? this.maxRetries; timeoutMillis = this.calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries); } await sleep(timeoutMillis); return this.makeRequest(options, retriesRemaining - 1); } calculateDefaultRetryTimeoutMillis(retriesRemaining, maxRetries) { const initialRetryDelay = 0.5; const maxRetryDelay = 8.0; const numRetries = maxRetries - retriesRemaining; // Apply exponential backoff, but not more than the max. const sleepSeconds = Math.min(initialRetryDelay * Math.pow(2, numRetries), maxRetryDelay); // Apply some jitter, take up to at most 25 percent of the retry time. const jitter = 1 - Math.random() * 0.25; return sleepSeconds * jitter * 1000; } getUserAgent() { return `${this.constructor.name}/JS ${_version_mjs__WEBPACK_IMPORTED_MODULE_4__.VERSION}`; } } class AbstractPage { constructor(client, response, body, options) { _AbstractPage_client.set(this, void 0); __classPrivateFieldSet(this, _AbstractPage_client, client, "f"); this.options = options; this.response = response; this.body = body; } hasNextPage() { const items = this.getPaginatedItems(); if (!items.length) return false; return this.nextPageInfo() != null; } async getNextPage() { const nextInfo = this.nextPageInfo(); if (!nextInfo) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError('No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.'); } const nextOptions = { ...this.options }; if ('params' in nextInfo) { nextOptions.query = { ...nextOptions.query, ...nextInfo.params }; } else if ('url' in nextInfo) { const params = [...Object.entries(nextOptions.query || {}), ...nextInfo.url.searchParams.entries()]; for (const [key, value] of params) { nextInfo.url.searchParams.set(key, value); } nextOptions.query = undefined; nextOptions.path = nextInfo.url.toString(); } return await __classPrivateFieldGet(this, _AbstractPage_client, "f").requestAPIList(this.constructor, nextOptions); } async *iterPages() { // eslint-disable-next-line @typescript-eslint/no-this-alias let page = this; yield page; while (page.hasNextPage()) { page = await page.getNextPage(); yield page; } } async *[(_AbstractPage_client = new WeakMap(), Symbol.asyncIterator)]() { for await (const page of this.iterPages()) { for (const item of page.getPaginatedItems()) { yield item; } } } } /** * This subclass of Promise will resolve to an instantiated Page once the request completes. * * It also implements AsyncIterable to allow auto-paginating iteration on an unawaited list call, eg: * * for await (const item of client.items.list()) { * console.log(item) * } */ class PagePromise extends APIPromise { constructor(client, request, Page) { super(request, async (props) => new Page(client, props.response, await defaultParseResponse(props), props.options)); } /** * Allow auto-paginating iteration on an unawaited list call, eg: * * for await (const item of client.items.list()) { * console.log(item) * } */ async *[Symbol.asyncIterator]() { const page = await this; for await (const item of page) { yield item; } } } const createResponseHeaders = (headers) => { return new Proxy(Object.fromEntries( // @ts-ignore headers.entries()), { get(target, name) { const key = name.toString(); return target[key.toLowerCase()] || target[key]; }, }); }; // This is required so that we can determine if a given object matches the RequestOptions // type at runtime. While this requires duplication, it is enforced by the TypeScript // compiler such that any missing / extraneous keys will cause an error. const requestOptionsKeys = { method: true, path: true, query: true, body: true, headers: true, maxRetries: true, stream: true, timeout: true, httpAgent: true, signal: true, idempotencyKey: true, __binaryResponse: true, }; const isRequestOptions = (obj) => { return (typeof obj === 'object' && obj !== null && !isEmptyObj(obj) && Object.keys(obj).every((k) => hasOwn(requestOptionsKeys, k))); }; const getPlatformProperties = () => { if (typeof Deno !== 'undefined' && Deno.build != null) { return { 'X-Stainless-Lang': 'js', 'X-Stainless-Package-Version': _version_mjs__WEBPACK_IMPORTED_MODULE_4__.VERSION, 'X-Stainless-OS': normalizePlatform(Deno.build.os), 'X-Stainless-Arch': normalizeArch(Deno.build.arch), 'X-Stainless-Runtime': 'deno', 'X-Stainless-Runtime-Version': Deno.version, }; } if (typeof EdgeRuntime !== 'undefined') { return { 'X-Stainless-Lang': 'js', 'X-Stainless-Package-Version': _version_mjs__WEBPACK_IMPORTED_MODULE_4__.VERSION, 'X-Stainless-OS': 'Unknown', 'X-Stainless-Arch': `other:${EdgeRuntime}`, 'X-Stainless-Runtime': 'edge', 'X-Stainless-Runtime-Version': process.version, }; } // Check if Node.js if (Object.prototype.toString.call(typeof process !== 'undefined' ? process : 0) === '[object process]') { return { 'X-Stainless-Lang': 'js', 'X-Stainless-Package-Version': _version_mjs__WEBPACK_IMPORTED_MODULE_4__.VERSION, 'X-Stainless-OS': normalizePlatform(process.platform), 'X-Stainless-Arch': normalizeArch(process.arch), 'X-Stainless-Runtime': 'node', 'X-Stainless-Runtime-Version': process.version, }; } const browserInfo = getBrowserInfo(); if (browserInfo) { return { 'X-Stainless-Lang': 'js', 'X-Stainless-Package-Version': _version_mjs__WEBPACK_IMPORTED_MODULE_4__.VERSION, 'X-Stainless-OS': 'Unknown', 'X-Stainless-Arch': 'unknown', 'X-Stainless-Runtime': `browser:${browserInfo.browser}`, 'X-Stainless-Runtime-Version': browserInfo.version, }; } // TODO add support for Cloudflare workers, etc. return { 'X-Stainless-Lang': 'js', 'X-Stainless-Package-Version': _version_mjs__WEBPACK_IMPORTED_MODULE_4__.VERSION, 'X-Stainless-OS': 'Unknown', 'X-Stainless-Arch': 'unknown', 'X-Stainless-Runtime': 'unknown', 'X-Stainless-Runtime-Version': 'unknown', }; }; // Note: modified from https://github.com/JS-DevTools/host-environment/blob/b1ab79ecde37db5d6e163c050e54fe7d287d7c92/src/isomorphic.browser.ts function getBrowserInfo() { if (typeof navigator === 'undefined' || !navigator) { return null; } // NOTE: The order matters here! const browserPatterns = [ { key: 'edge', pattern: /Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, { key: 'ie', pattern: /MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, { key: 'ie', pattern: /Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/ }, { key: 'chrome', pattern: /Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, { key: 'firefox', pattern: /Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/ }, { key: 'safari', pattern: /(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/ }, ]; // Find the FIRST matching browser for (const { key, pattern } of browserPatterns) { const match = pattern.exec(navigator.userAgent); if (match) { const major = match[1] || 0; const minor = match[2] || 0; const patch = match[3] || 0; return { browser: key, version: `${major}.${minor}.${patch}` }; } } return null; } const normalizeArch = (arch) => { // Node docs: // - https://nodejs.org/api/process.html#processarch // Deno docs: // - https://doc.deno.land/deno/stable/~/Deno.build if (arch === 'x32') return 'x32'; if (arch === 'x86_64' || arch === 'x64') return 'x64'; if (arch === 'arm') return 'arm'; if (arch === 'aarch64' || arch === 'arm64') return 'arm64'; if (arch) return `other:${arch}`; return 'unknown'; }; const normalizePlatform = (platform) => { // Node platforms: // - https://nodejs.org/api/process.html#processplatform // Deno platforms: // - https://doc.deno.land/deno/stable/~/Deno.build // - https://github.com/denoland/deno/issues/14799 platform = platform.toLowerCase(); // NOTE: this iOS check is untested and may not work // Node does not work natively on IOS, there is a fork at // https://github.com/nodejs-mobile/nodejs-mobile // however it is unknown at the time of writing how to detect if it is running if (platform.includes('ios')) return 'iOS'; if (platform === 'android') return 'Android'; if (platform === 'darwin') return 'MacOS'; if (platform === 'win32') return 'Windows'; if (platform === 'freebsd') return 'FreeBSD'; if (platform === 'openbsd') return 'OpenBSD'; if (platform === 'linux') return 'Linux'; if (platform) return `Other:${platform}`; return 'Unknown'; }; let _platformHeaders; const getPlatformHeaders = () => { return (_platformHeaders ?? (_platformHeaders = getPlatformProperties())); }; const safeJSON = (text) => { try { return JSON.parse(text); } catch (err) { return undefined; } }; // https://stackoverflow.com/a/19709846 const startsWithSchemeRegexp = new RegExp('^(?:[a-z]+:)?//', 'i'); const isAbsoluteURL = (url) => { return startsWithSchemeRegexp.test(url); }; const sleep = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); const validatePositiveInteger = (name, n) => { if (typeof n !== 'number' || !Number.isInteger(n)) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError(`${name} must be an integer`); } if (n < 0) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError(`${name} must be a positive integer`); } return n; }; const castToError = (err) => { if (err instanceof Error) return err; return new Error(err); }; const ensurePresent = (value) => { if (value == null) throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError(`Expected a value to be given but received ${value} instead.`); return value; }; /** * Read an environment variable. * * Will return undefined if the environment variable doesn't exist or cannot be accessed. */ const readEnv = (env) => { if (typeof process !== 'undefined') { return process.env?.[env] ?? undefined; } if (typeof Deno !== 'undefined') { return Deno.env?.get?.(env); } return undefined; }; const coerceInteger = (value) => { if (typeof value === 'number') return Math.round(value); if (typeof value === 'string') return parseInt(value, 10); throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError(`Could not coerce ${value} (type: ${typeof value}) into a number`); }; const coerceFloat = (value) => { if (typeof value === 'number') return value; if (typeof value === 'string') return parseFloat(value); throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError(`Could not coerce ${value} (type: ${typeof value}) into a number`); }; const coerceBoolean = (value) => { if (typeof value === 'boolean') return value; if (typeof value === 'string') return value === 'true'; return Boolean(value); }; const maybeCoerceInteger = (value) => { if (value === undefined) { return undefined; } return coerceInteger(value); }; const maybeCoerceFloat = (value) => { if (value === undefined) { return undefined; } return coerceFloat(value); }; const maybeCoerceBoolean = (value) => { if (value === undefined) { return undefined; } return coerceBoolean(value); }; // https://stackoverflow.com/a/34491287 function isEmptyObj(obj) { if (!obj) return true; for (const _k in obj) return false; return true; } // https://eslint.org/docs/latest/rules/no-prototype-builtins function hasOwn(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } function debug(action, ...args) { if (typeof process !== 'undefined' && process.env['DEBUG'] === 'true') { console.log(`OpenAI:DEBUG:${action}`, ...args); } } /** * https://stackoverflow.com/a/2117523 */ const uuid4 = () => { return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, (c) => { const r = (Math.random() * 16) | 0; const v = c === 'x' ? r : (r & 0x3) | 0x8; return v.toString(16); }); }; const isRunningInBrowser = () => { return ( // @ts-ignore typeof window !== 'undefined' && // @ts-ignore typeof window.document !== 'undefined' && // @ts-ignore typeof navigator !== 'undefined'); }; const isHeadersProtocol = (headers) => { return typeof headers?.get === 'function'; }; const getRequiredHeader = (headers, header) => { const lowerCasedHeader = header.toLowerCase(); if (isHeadersProtocol(headers)) { // to deal with the case where the header looks like Stainless-Event-Id const intercapsHeader = header[0]?.toUpperCase() + header.substring(1).replace(/([^\w])(\w)/g, (_m, g1, g2) => g1 + g2.toUpperCase()); for (const key of [header, lowerCasedHeader, header.toUpperCase(), intercapsHeader]) { const value = headers.get(key); if (value) { return value; } } } for (const [key, value] of Object.entries(headers)) { if (key.toLowerCase() === lowerCasedHeader) { if (Array.isArray(value)) { if (value.length <= 1) return value[0]; console.warn(`Received ${value.length} entries for the ${header} header, using the first entry.`); return value[0]; } return value; } } throw new Error(`Could not find ${header} header`); }; /** * Encodes a string to Base64 format. */ const toBase64 = (str) => { if (!str) return ''; if (typeof Buffer !== 'undefined') { return Buffer.from(str).toString('base64'); } if (typeof btoa !== 'undefined') { return btoa(str); } throw new _error_mjs__WEBPACK_IMPORTED_MODULE_3__.OpenAIError('Cannot generate b64 string; Expected `Buffer` or `btoa` to be defined'); }; //# sourceMappingURL=core.mjs.map /***/ }), /***/ "./node_modules/openai/error.mjs": /*!***************************************!*\ !*** ./node_modules/openai/error.mjs ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ APIConnectionError: () => (/* binding */ APIConnectionError), /* harmony export */ APIConnectionTimeoutError: () => (/* binding */ APIConnectionTimeoutError), /* harmony export */ APIError: () => (/* binding */ APIError), /* harmony export */ APIUserAbortError: () => (/* binding */ APIUserAbortError), /* harmony export */ AuthenticationError: () => (/* binding */ AuthenticationError), /* harmony export */ BadRequestError: () => (/* binding */ BadRequestError), /* harmony export */ ConflictError: () => (/* binding */ ConflictError), /* harmony export */ InternalServerError: () => (/* binding */ InternalServerError), /* harmony export */ NotFoundError: () => (/* binding */ NotFoundError), /* harmony export */ OpenAIError: () => (/* binding */ OpenAIError), /* harmony export */ PermissionDeniedError: () => (/* binding */ PermissionDeniedError), /* harmony export */ RateLimitError: () => (/* binding */ RateLimitError), /* harmony export */ UnprocessableEntityError: () => (/* binding */ UnprocessableEntityError) /* harmony export */ }); /* harmony import */ var _core_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core.mjs */ "./node_modules/openai/core.mjs"); // File generated from our OpenAPI spec by Stainless. class OpenAIError extends Error { } class APIError extends OpenAIError { constructor(status, error, message, headers) { super(`${APIError.makeMessage(status, error, message)}`); this.status = status; this.headers = headers; const data = error; this.error = data; this.code = data?.['code']; this.param = data?.['param']; this.type = data?.['type']; } static makeMessage(status, error, message) { const msg = error?.message ? typeof error.message === 'string' ? error.message : JSON.stringify(error.message) : error ? JSON.stringify(error) : message; if (status && msg) { return `${status} ${msg}`; } if (status) { return `${status} status code (no body)`; } if (msg) { return msg; } return '(no status code or body)'; } static generate(status, errorResponse, message, headers) { if (!status) { return new APIConnectionError({ cause: (0,_core_mjs__WEBPACK_IMPORTED_MODULE_0__.castToError)(errorResponse) }); } const error = errorResponse?.['error']; if (status === 400) { return new BadRequestError(status, error, message, headers); } if (status === 401) { return new AuthenticationError(status, error, message, headers); } if (status === 403) { return new PermissionDeniedError(status, error, message, headers); } if (status === 404) { return new NotFoundError(status, error, message, headers); } if (status === 409) { return new ConflictError(status, error, message, headers); } if (status === 422) { return new UnprocessableEntityError(status, error, message, headers); } if (status === 429) { return new RateLimitError(status, error, message, headers); } if (status >= 500) { return new InternalServerError(status, error, message, headers); } return new APIError(status, error, message, headers); } } class APIUserAbortError extends APIError { constructor({ message } = {}) { super(undefined, undefined, message || 'Request was aborted.', undefined); this.status = undefined; } } class APIConnectionError extends APIError { constructor({ message, cause }) { super(undefined, undefined, message || 'Connection error.', undefined); this.status = undefined; // in some environments the 'cause' property is already declared // @ts-ignore if (cause) this.cause = cause; } } class APIConnectionTimeoutError extends APIConnectionError { constructor({ message } = {}) { super({ message: message ?? 'Request timed out.' }); } } class BadRequestError extends APIError { constructor() { super(...arguments); this.status = 400; } } class AuthenticationError extends APIError { constructor() { super(...arguments); this.status = 401; } } class PermissionDeniedError extends APIError { constructor() { super(...arguments); this.status = 403; } } class NotFoundError extends APIError { constructor() { super(...arguments); this.status = 404; } } class ConflictError extends APIError { constructor() { super(...arguments); this.status = 409; } } class UnprocessableEntityError extends APIError { constructor() { super(...arguments); this.status = 422; } } class RateLimitError extends APIError { constructor() { super(...arguments); this.status = 429; } } class InternalServerError extends APIError { } //# sourceMappingURL=error.mjs.map /***/ }), /***/ "./node_modules/openai/index.mjs": /*!***************************************!*\ !*** ./node_modules/openai/index.mjs ***! \***************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ APIConnectionError: () => (/* binding */ APIConnectionError), /* harmony export */ APIConnectionTimeoutError: () => (/* binding */ APIConnectionTimeoutError), /* harmony export */ APIError: () => (/* binding */ APIError), /* harmony export */ APIUserAbortError: () => (/* binding */ APIUserAbortError), /* harmony export */ AuthenticationError: () => (/* binding */ AuthenticationError), /* harmony export */ BadRequestError: () => (/* binding */ BadRequestError), /* harmony export */ ConflictError: () => (/* binding */ ConflictError), /* harmony export */ InternalServerError: () => (/* binding */ InternalServerError), /* harmony export */ NotFoundError: () => (/* binding */ NotFoundError), /* harmony export */ OpenAI: () => (/* binding */ OpenAI), /* harmony export */ OpenAIError: () => (/* binding */ OpenAIError), /* harmony export */ PermissionDeniedError: () => (/* binding */ PermissionDeniedError), /* harmony export */ RateLimitError: () => (/* binding */ RateLimitError), /* harmony export */ UnprocessableEntityError: () => (/* binding */ UnprocessableEntityError), /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), /* harmony export */ fileFromPath: () => (/* binding */ fileFromPath), /* harmony export */ toFile: () => (/* binding */ toFile) /* harmony export */ }); /* harmony import */ var _core_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core.mjs */ "./node_modules/openai/core.mjs"); /* harmony import */ var _pagination_mjs__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./pagination.mjs */ "./node_modules/openai/pagination.mjs"); /* harmony import */ var _error_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./error.mjs */ "./node_modules/openai/error.mjs"); /* harmony import */ var _uploads_mjs__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./uploads.mjs */ "./node_modules/openai/uploads.mjs"); /* harmony import */ var _uploads_mjs__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./uploads.mjs */ "./node_modules/openai/_shims/index.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/completions.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/chat/chat.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/edits.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/embeddings.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/files.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/images.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/audio/audio.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/moderations.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/models.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/fine-tuning/fine-tuning.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/fine-tunes.mjs"); /* harmony import */ var openai_resources_index__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! openai/resources/index */ "./node_modules/openai/resources/beta/beta.mjs"); // File generated from our OpenAPI spec by Stainless. var _a; /** API Client for interfacing with the OpenAI API. */ class OpenAI extends _core_mjs__WEBPACK_IMPORTED_MODULE_0__.APIClient { /** * API Client for interfacing with the OpenAI API. * * @param {string} [opts.apiKey==process.env['OPENAI_API_KEY'] ?? undefined] * @param {string | null} [opts.organization==process.env['OPENAI_ORG_ID'] ?? null] * @param {string} [opts.baseURL] - Override the default base URL for the API. * @param {number} [opts.timeout=10 minutes] - The maximum amount of time (in milliseconds) the client will wait for a response before timing out. * @param {number} [opts.httpAgent] - An HTTP agent used to manage HTTP(s) connections. * @param {Core.Fetch} [opts.fetch] - Specify a custom `fetch` function implementation. * @param {number} [opts.maxRetries=2] - The maximum number of times the client will retry a request. * @param {Core.Headers} opts.defaultHeaders - Default headers to include with every request to the API. * @param {Core.DefaultQuery} opts.defaultQuery - Default query parameters to include with every request to the API. * @param {boolean} [opts.dangerouslyAllowBrowser=false] - By default, client-side use of this library is not allowed, as it risks exposing your secret API credentials to attackers. */ constructor({ apiKey = _core_mjs__WEBPACK_IMPORTED_MODULE_0__.readEnv('OPENAI_API_KEY'), organization = _core_mjs__WEBPACK_IMPORTED_MODULE_0__.readEnv('OPENAI_ORG_ID') ?? null, ...opts } = {}) { if (apiKey === undefined) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError("The OPENAI_API_KEY environment variable is missing or empty; either provide it, or instantiate the OpenAI client with an apiKey option, like new OpenAI({ apiKey: 'My API Key' })."); } const options = { apiKey, organization, ...opts, baseURL: opts.baseURL ?? `https://api.openai.com/v1`, }; if (!options.dangerouslyAllowBrowser && _core_mjs__WEBPACK_IMPORTED_MODULE_0__.isRunningInBrowser()) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError("It looks like you're running in a browser-like environment.\n\nThis is disabled by default, as it risks exposing your secret API credentials to attackers.\nIf you understand the risks and have appropriate mitigations in place,\nyou can set the `dangerouslyAllowBrowser` option to `true`, e.g.,\n\nnew OpenAI({ apiKey, dangerouslyAllowBrowser: true });\n\nhttps://help.openai.com/en/articles/5112595-best-practices-for-api-key-safety\n"); } super({ baseURL: options.baseURL, timeout: options.timeout ?? 600000 /* 10 minutes */, httpAgent: options.httpAgent, maxRetries: options.maxRetries, fetch: options.fetch, }); this.completions = new openai_resources_index__WEBPACK_IMPORTED_MODULE_2__.Completions(this); this.chat = new openai_resources_index__WEBPACK_IMPORTED_MODULE_3__.Chat(this); this.edits = new openai_resources_index__WEBPACK_IMPORTED_MODULE_4__.Edits(this); this.embeddings = new openai_resources_index__WEBPACK_IMPORTED_MODULE_5__.Embeddings(this); this.files = new openai_resources_index__WEBPACK_IMPORTED_MODULE_6__.Files(this); this.images = new openai_resources_index__WEBPACK_IMPORTED_MODULE_7__.Images(this); this.audio = new openai_resources_index__WEBPACK_IMPORTED_MODULE_8__.Audio(this); this.moderations = new openai_resources_index__WEBPACK_IMPORTED_MODULE_9__.Moderations(this); this.models = new openai_resources_index__WEBPACK_IMPORTED_MODULE_10__.Models(this); this.fineTuning = new openai_resources_index__WEBPACK_IMPORTED_MODULE_11__.FineTuning(this); this.fineTunes = new openai_resources_index__WEBPACK_IMPORTED_MODULE_12__.FineTunes(this); this.beta = new openai_resources_index__WEBPACK_IMPORTED_MODULE_13__.Beta(this); this._options = options; this.apiKey = apiKey; this.organization = organization; } defaultQuery() { return this._options.defaultQuery; } defaultHeaders(opts) { return { ...super.defaultHeaders(opts), 'OpenAI-Organization': this.organization, ...this._options.defaultHeaders, }; } authHeaders(opts) { return { Authorization: `Bearer ${this.apiKey}` }; } } _a = OpenAI; OpenAI.OpenAI = _a; OpenAI.OpenAIError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError; OpenAI.APIError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.APIError; OpenAI.APIConnectionError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.APIConnectionError; OpenAI.APIConnectionTimeoutError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.APIConnectionTimeoutError; OpenAI.APIUserAbortError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.APIUserAbortError; OpenAI.NotFoundError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.NotFoundError; OpenAI.ConflictError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.ConflictError; OpenAI.RateLimitError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.RateLimitError; OpenAI.BadRequestError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.BadRequestError; OpenAI.AuthenticationError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.AuthenticationError; OpenAI.InternalServerError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.InternalServerError; OpenAI.PermissionDeniedError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.PermissionDeniedError; OpenAI.UnprocessableEntityError = _error_mjs__WEBPACK_IMPORTED_MODULE_1__.UnprocessableEntityError; const { OpenAIError, APIError, APIConnectionError, APIConnectionTimeoutError, APIUserAbortError, NotFoundError, ConflictError, RateLimitError, BadRequestError, AuthenticationError, InternalServerError, PermissionDeniedError, UnprocessableEntityError, } = _error_mjs__WEBPACK_IMPORTED_MODULE_1__; var toFile = _uploads_mjs__WEBPACK_IMPORTED_MODULE_14__.toFile; var fileFromPath = _uploads_mjs__WEBPACK_IMPORTED_MODULE_15__.fileFromPath; (function (OpenAI) { // Helper functions OpenAI.toFile = _uploads_mjs__WEBPACK_IMPORTED_MODULE_14__.toFile; OpenAI.fileFromPath = _uploads_mjs__WEBPACK_IMPORTED_MODULE_15__.fileFromPath; OpenAI.Page = _pagination_mjs__WEBPACK_IMPORTED_MODULE_16__.Page; OpenAI.CursorPage = _pagination_mjs__WEBPACK_IMPORTED_MODULE_16__.CursorPage; OpenAI.Completions = openai_resources_index__WEBPACK_IMPORTED_MODULE_2__.Completions; OpenAI.Chat = openai_resources_index__WEBPACK_IMPORTED_MODULE_3__.Chat; OpenAI.Edits = openai_resources_index__WEBPACK_IMPORTED_MODULE_4__.Edits; OpenAI.Embeddings = openai_resources_index__WEBPACK_IMPORTED_MODULE_5__.Embeddings; OpenAI.Files = openai_resources_index__WEBPACK_IMPORTED_MODULE_6__.Files; OpenAI.FileObjectsPage = openai_resources_index__WEBPACK_IMPORTED_MODULE_6__.FileObjectsPage; OpenAI.Images = openai_resources_index__WEBPACK_IMPORTED_MODULE_7__.Images; OpenAI.Audio = openai_resources_index__WEBPACK_IMPORTED_MODULE_8__.Audio; OpenAI.Moderations = openai_resources_index__WEBPACK_IMPORTED_MODULE_9__.Moderations; OpenAI.Models = openai_resources_index__WEBPACK_IMPORTED_MODULE_10__.Models; OpenAI.ModelsPage = openai_resources_index__WEBPACK_IMPORTED_MODULE_10__.ModelsPage; OpenAI.FineTuning = openai_resources_index__WEBPACK_IMPORTED_MODULE_11__.FineTuning; OpenAI.FineTunes = openai_resources_index__WEBPACK_IMPORTED_MODULE_12__.FineTunes; OpenAI.FineTunesPage = openai_resources_index__WEBPACK_IMPORTED_MODULE_12__.FineTunesPage; OpenAI.Beta = openai_resources_index__WEBPACK_IMPORTED_MODULE_13__.Beta; })(OpenAI || (OpenAI = {})); /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (OpenAI); //# sourceMappingURL=index.mjs.map /***/ }), /***/ "./node_modules/openai/lib/AbstractChatCompletionRunner.mjs": /*!******************************************************************!*\ !*** ./node_modules/openai/lib/AbstractChatCompletionRunner.mjs ***! \******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ AbstractChatCompletionRunner: () => (/* binding */ AbstractChatCompletionRunner) /* harmony export */ }); /* harmony import */ var openai_error__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/error */ "./node_modules/openai/error.mjs"); /* harmony import */ var _RunnableFunction_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./RunnableFunction.mjs */ "./node_modules/openai/lib/RunnableFunction.mjs"); /* harmony import */ var _chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chatCompletionUtils.mjs */ "./node_modules/openai/lib/chatCompletionUtils.mjs"); var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var _AbstractChatCompletionRunner_instances, _AbstractChatCompletionRunner_connectedPromise, _AbstractChatCompletionRunner_resolveConnectedPromise, _AbstractChatCompletionRunner_rejectConnectedPromise, _AbstractChatCompletionRunner_endPromise, _AbstractChatCompletionRunner_resolveEndPromise, _AbstractChatCompletionRunner_rejectEndPromise, _AbstractChatCompletionRunner_listeners, _AbstractChatCompletionRunner_ended, _AbstractChatCompletionRunner_errored, _AbstractChatCompletionRunner_aborted, _AbstractChatCompletionRunner_catchingPromiseCreated, _AbstractChatCompletionRunner_getFinalContent, _AbstractChatCompletionRunner_getFinalMessage, _AbstractChatCompletionRunner_getFinalFunctionCall, _AbstractChatCompletionRunner_getFinalFunctionCallResult, _AbstractChatCompletionRunner_calculateTotalUsage, _AbstractChatCompletionRunner_handleError, _AbstractChatCompletionRunner_validateParams, _AbstractChatCompletionRunner_stringifyFunctionCallResult; const DEFAULT_MAX_CHAT_COMPLETIONS = 10; class AbstractChatCompletionRunner { constructor() { _AbstractChatCompletionRunner_instances.add(this); this.controller = new AbortController(); _AbstractChatCompletionRunner_connectedPromise.set(this, void 0); _AbstractChatCompletionRunner_resolveConnectedPromise.set(this, () => { }); _AbstractChatCompletionRunner_rejectConnectedPromise.set(this, () => { }); _AbstractChatCompletionRunner_endPromise.set(this, void 0); _AbstractChatCompletionRunner_resolveEndPromise.set(this, () => { }); _AbstractChatCompletionRunner_rejectEndPromise.set(this, () => { }); _AbstractChatCompletionRunner_listeners.set(this, {}); this._chatCompletions = []; this.messages = []; _AbstractChatCompletionRunner_ended.set(this, false); _AbstractChatCompletionRunner_errored.set(this, false); _AbstractChatCompletionRunner_aborted.set(this, false); _AbstractChatCompletionRunner_catchingPromiseCreated.set(this, false); _AbstractChatCompletionRunner_handleError.set(this, (error) => { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_errored, true, "f"); if (error instanceof Error && error.name === 'AbortError') { error = new openai_error__WEBPACK_IMPORTED_MODULE_0__.APIUserAbortError(); } if (error instanceof openai_error__WEBPACK_IMPORTED_MODULE_0__.APIUserAbortError) { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_aborted, true, "f"); return this._emit('abort', error); } if (error instanceof openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError) { return this._emit('error', error); } if (error instanceof Error) { const openAIError = new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError(error.message); // @ts-ignore openAIError.cause = error; return this._emit('error', openAIError); } return this._emit('error', new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError(String(error))); }); __classPrivateFieldSet(this, _AbstractChatCompletionRunner_connectedPromise, new Promise((resolve, reject) => { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_resolveConnectedPromise, resolve, "f"); __classPrivateFieldSet(this, _AbstractChatCompletionRunner_rejectConnectedPromise, reject, "f"); }), "f"); __classPrivateFieldSet(this, _AbstractChatCompletionRunner_endPromise, new Promise((resolve, reject) => { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_resolveEndPromise, resolve, "f"); __classPrivateFieldSet(this, _AbstractChatCompletionRunner_rejectEndPromise, reject, "f"); }), "f"); // Don't let these promises cause unhandled rejection errors. // we will manually cause an unhandled rejection error later // if the user hasn't registered any error listener or called // any promise-returning method. __classPrivateFieldGet(this, _AbstractChatCompletionRunner_connectedPromise, "f").catch(() => { }); __classPrivateFieldGet(this, _AbstractChatCompletionRunner_endPromise, "f").catch(() => { }); } _run(executor) { // Unfortunately if we call `executor()` immediately we get runtime errors about // references to `this` before the `super()` constructor call returns. setTimeout(() => { executor().then(() => { this._emitFinal(); this._emit('end'); }, __classPrivateFieldGet(this, _AbstractChatCompletionRunner_handleError, "f")); }, 0); } _addChatCompletion(chatCompletion) { this._chatCompletions.push(chatCompletion); this._emit('chatCompletion', chatCompletion); const message = chatCompletion.choices[0]?.message; if (message) this._addMessage(message); return chatCompletion; } _addMessage(message, emit = true) { this.messages.push(message); if (emit) { this._emit('message', message); if (((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isFunctionMessage)(message) || (0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isToolMessage)(message)) && message.content) { // Note, this assumes that {role: 'tool', content: …} is always the result of a call of tool of type=function. this._emit('functionCallResult', message.content); } else if ((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isAssistantMessage)(message) && message.function_call) { this._emit('functionCall', message.function_call); } else if ((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isAssistantMessage)(message) && message.tool_calls) { for (const tool_call of message.tool_calls) { if (tool_call.type === 'function') { this._emit('functionCall', tool_call.function); } } } } } _connected() { if (this.ended) return; __classPrivateFieldGet(this, _AbstractChatCompletionRunner_resolveConnectedPromise, "f").call(this); this._emit('connect'); } get ended() { return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_ended, "f"); } get errored() { return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_errored, "f"); } get aborted() { return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_aborted, "f"); } abort() { this.controller.abort(); } /** * Adds the listener function to the end of the listeners array for the event. * No checks are made to see if the listener has already been added. Multiple calls passing * the same combination of event and listener will result in the listener being added, and * called, multiple times. * @returns this ChatCompletionStream, so that calls can be chained */ on(event, listener) { const listeners = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event] || (__classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event] = []); listeners.push({ listener }); return this; } /** * Removes the specified listener from the listener array for the event. * off() will remove, at most, one instance of a listener from the listener array. If any single * listener has been added multiple times to the listener array for the specified event, then * off() must be called multiple times to remove each instance. * @returns this ChatCompletionStream, so that calls can be chained */ off(event, listener) { const listeners = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event]; if (!listeners) return this; const index = listeners.findIndex((l) => l.listener === listener); if (index >= 0) listeners.splice(index, 1); return this; } /** * Adds a one-time listener function for the event. The next time the event is triggered, * this listener is removed and then invoked. * @returns this ChatCompletionStream, so that calls can be chained */ once(event, listener) { const listeners = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event] || (__classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event] = []); listeners.push({ listener, once: true }); return this; } /** * This is similar to `.once()`, but returns a Promise that resolves the next time * the event is triggered, instead of calling a listener callback. * @returns a Promise that resolves the next time given event is triggered, * or rejects if an error is emitted. (If you request the 'error' event, * returns a promise that resolves with the error). * * Example: * * const message = await stream.emitted('message') // rejects if the stream errors */ emitted(event) { return new Promise((resolve, reject) => { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_catchingPromiseCreated, true, "f"); if (event !== 'error') this.once('error', reject); this.once(event, resolve); }); } async done() { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_catchingPromiseCreated, true, "f"); await __classPrivateFieldGet(this, _AbstractChatCompletionRunner_endPromise, "f"); } /** * @returns a promise that resolves with the final ChatCompletion, or rejects * if an error occurred or the stream ended prematurely without producing a ChatCompletion. */ async finalChatCompletion() { await this.done(); const completion = this._chatCompletions[this._chatCompletions.length - 1]; if (!completion) throw new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError('stream ended without producing a ChatCompletion'); return completion; } /** * @returns a promise that resolves with the content of the final ChatCompletionMessage, or rejects * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. */ async finalContent() { await this.done(); return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); } /** * @returns a promise that resolves with the the final assistant ChatCompletionMessage response, * or rejects if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. */ async finalMessage() { await this.done(); return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this); } /** * @returns a promise that resolves with the content of the final FunctionCall, or rejects * if an error occurred or the stream ended prematurely without producing a ChatCompletionMessage. */ async finalFunctionCall() { await this.done(); return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); } async finalFunctionCallResult() { await this.done(); return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); } async totalUsage() { await this.done(); return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this); } allChatCompletions() { return [...this._chatCompletions]; } _emit(event, ...args) { // make sure we don't emit any events after end if (__classPrivateFieldGet(this, _AbstractChatCompletionRunner_ended, "f")) return; if (event === 'end') { __classPrivateFieldSet(this, _AbstractChatCompletionRunner_ended, true, "f"); __classPrivateFieldGet(this, _AbstractChatCompletionRunner_resolveEndPromise, "f").call(this); } const listeners = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event]; if (listeners) { __classPrivateFieldGet(this, _AbstractChatCompletionRunner_listeners, "f")[event] = listeners.filter((l) => !l.once); listeners.forEach(({ listener }) => listener(...args)); } if (event === 'abort') { const error = args[0]; if (!__classPrivateFieldGet(this, _AbstractChatCompletionRunner_catchingPromiseCreated, "f") && !listeners?.length) { Promise.reject(error); } __classPrivateFieldGet(this, _AbstractChatCompletionRunner_rejectConnectedPromise, "f").call(this, error); __classPrivateFieldGet(this, _AbstractChatCompletionRunner_rejectEndPromise, "f").call(this, error); this._emit('end'); return; } if (event === 'error') { // NOTE: _emit('error', error) should only be called from #handleError(). const error = args[0]; if (!__classPrivateFieldGet(this, _AbstractChatCompletionRunner_catchingPromiseCreated, "f") && !listeners?.length) { // Trigger an unhandled rejection if the user hasn't registered any error handlers. // If you are seeing stack traces here, make sure to handle errors via either: // - runner.on('error', () => ...) // - await runner.done() // - await runner.finalChatCompletion() // - etc. Promise.reject(error); } __classPrivateFieldGet(this, _AbstractChatCompletionRunner_rejectConnectedPromise, "f").call(this, error); __classPrivateFieldGet(this, _AbstractChatCompletionRunner_rejectEndPromise, "f").call(this, error); this._emit('end'); } } _emitFinal() { const completion = this._chatCompletions[this._chatCompletions.length - 1]; if (completion) this._emit('finalChatCompletion', completion); const finalMessage = this.messages[this.messages.length - 1]; if (finalMessage) this._emit('finalMessage', finalMessage); const finalContent = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalContent).call(this); if (finalContent) this._emit('finalContent', finalContent); const finalFunctionCall = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCall).call(this); if (finalFunctionCall) this._emit('finalFunctionCall', finalFunctionCall); const finalFunctionCallResult = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalFunctionCallResult).call(this); if (finalFunctionCallResult != null) this._emit('finalFunctionCallResult', finalFunctionCallResult); if (this._chatCompletions.some((c) => c.usage)) { this._emit('totalUsage', __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_calculateTotalUsage).call(this)); } } async _createChatCompletion(completions, params, options) { const signal = options?.signal; if (signal) { if (signal.aborted) this.controller.abort(); signal.addEventListener('abort', () => this.controller.abort()); } __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_validateParams).call(this, params); const chatCompletion = await completions.create({ ...params, stream: false }, { ...options, signal: this.controller.signal }); this._connected(); return this._addChatCompletion(chatCompletion); } async _runChatCompletion(completions, params, options) { for (const message of params.messages) { this._addMessage(message, false); } return await this._createChatCompletion(completions, params, options); } async _runFunctions(completions, params, options) { const role = 'function'; const { function_call = 'auto', stream, ...restParams } = params; const singleFunctionToCall = typeof function_call !== 'string' && function_call?.name; const { maxChatCompletions = DEFAULT_MAX_CHAT_COMPLETIONS } = options || {}; const functionsByName = {}; for (const f of params.functions) { functionsByName[f.name || f.function.name] = f; } const functions = params.functions.map((f) => ({ name: f.name || f.function.name, parameters: f.parameters, description: f.description, })); for (const message of params.messages) { this._addMessage(message, false); } for (let i = 0; i < maxChatCompletions; ++i) { const chatCompletion = await this._createChatCompletion(completions, { ...restParams, function_call, functions, messages: [...this.messages], }, options); const message = chatCompletion.choices[0]?.message; if (!message) { throw new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError(`missing message in ChatCompletion response`); } if (!message.function_call) return; const { name, arguments: args } = message.function_call; const fn = functionsByName[name]; if (!fn) { const content = `Invalid function_call: ${JSON.stringify(name)}. Available options are: ${functions .map((f) => JSON.stringify(f.name)) .join(', ')}. Please try again`; this._addMessage({ role, name, content }); continue; } else if (singleFunctionToCall && singleFunctionToCall !== name) { const content = `Invalid function_call: ${JSON.stringify(name)}. ${JSON.stringify(singleFunctionToCall)} requested. Please try again`; this._addMessage({ role, name, content }); continue; } let parsed; try { parsed = (0,_RunnableFunction_mjs__WEBPACK_IMPORTED_MODULE_2__.isRunnableFunctionWithParse)(fn) ? await fn.parse(args) : args; } catch (error) { this._addMessage({ role, name, content: error instanceof Error ? error.message : String(error), }); continue; } // @ts-expect-error it can't rule out `never` type. const rawContent = await fn.function(parsed, this); const content = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent); this._addMessage({ role, name, content }); if (singleFunctionToCall) return; } } async _runTools(completions, params, options) { const role = 'tool'; const { tool_choice = 'auto', stream, ...restParams } = params; const singleFunctionToCall = typeof tool_choice !== 'string' && tool_choice?.function?.name; const { maxChatCompletions = DEFAULT_MAX_CHAT_COMPLETIONS } = options || {}; const functionsByName = {}; for (const f of params.tools) { if (f.type === 'function') { functionsByName[f.function.name || f.function.function.name] = f.function; } } const tools = 'tools' in params ? params.tools.map((t) => t.type === 'function' ? { type: 'function', function: { name: t.function.name || t.function.function.name, parameters: t.function.parameters, description: t.function.description, }, } : t) : undefined; for (const message of params.messages) { this._addMessage(message, false); } for (let i = 0; i < maxChatCompletions; ++i) { const chatCompletion = await this._createChatCompletion(completions, { ...restParams, tool_choice, tools, messages: [...this.messages], }, options); const message = chatCompletion.choices[0]?.message; if (!message) { throw new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError(`missing message in ChatCompletion response`); } if (!message.tool_calls) return; for (const tool_call of message.tool_calls) { if (tool_call.type !== 'function') continue; const tool_call_id = tool_call.id; const { name, arguments: args } = tool_call.function; const fn = functionsByName[name]; if (!fn) { const content = `Invalid tool_call: ${JSON.stringify(name)}. Available options are: ${tools .map((f) => JSON.stringify(f.function.name)) .join(', ')}. Please try again`; this._addMessage({ role, tool_call_id, content }); continue; } else if (singleFunctionToCall && singleFunctionToCall !== name) { const content = `Invalid tool_call: ${JSON.stringify(name)}. ${JSON.stringify(singleFunctionToCall)} requested. Please try again`; this._addMessage({ role, tool_call_id, content }); continue; } let parsed; try { parsed = (0,_RunnableFunction_mjs__WEBPACK_IMPORTED_MODULE_2__.isRunnableFunctionWithParse)(fn) ? await fn.parse(args) : args; } catch (error) { const content = error instanceof Error ? error.message : String(error); this._addMessage({ role, tool_call_id, content }); continue; } // @ts-expect-error it can't rule out `never` type. const rawContent = await fn.function(parsed, this); const content = __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_stringifyFunctionCallResult).call(this, rawContent); this._addMessage({ role, tool_call_id, content }); if (singleFunctionToCall) return; } } } } _AbstractChatCompletionRunner_connectedPromise = new WeakMap(), _AbstractChatCompletionRunner_resolveConnectedPromise = new WeakMap(), _AbstractChatCompletionRunner_rejectConnectedPromise = new WeakMap(), _AbstractChatCompletionRunner_endPromise = new WeakMap(), _AbstractChatCompletionRunner_resolveEndPromise = new WeakMap(), _AbstractChatCompletionRunner_rejectEndPromise = new WeakMap(), _AbstractChatCompletionRunner_listeners = new WeakMap(), _AbstractChatCompletionRunner_ended = new WeakMap(), _AbstractChatCompletionRunner_errored = new WeakMap(), _AbstractChatCompletionRunner_aborted = new WeakMap(), _AbstractChatCompletionRunner_catchingPromiseCreated = new WeakMap(), _AbstractChatCompletionRunner_handleError = new WeakMap(), _AbstractChatCompletionRunner_instances = new WeakSet(), _AbstractChatCompletionRunner_getFinalContent = function _AbstractChatCompletionRunner_getFinalContent() { return __classPrivateFieldGet(this, _AbstractChatCompletionRunner_instances, "m", _AbstractChatCompletionRunner_getFinalMessage).call(this).content; }, _AbstractChatCompletionRunner_getFinalMessage = function _AbstractChatCompletionRunner_getFinalMessage() { let i = this.messages.length; while (i-- > 0) { const message = this.messages[i]; if ((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isAssistantMessage)(message)) { return message; } } throw new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError('stream ended without producing a ChatCompletionMessage with role=assistant'); }, _AbstractChatCompletionRunner_getFinalFunctionCall = function _AbstractChatCompletionRunner_getFinalFunctionCall() { for (let i = this.messages.length - 1; i >= 0; i--) { const message = this.messages[i]; if ((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isAssistantMessage)(message) && message?.function_call) { return message.function_call; } } return; }, _AbstractChatCompletionRunner_getFinalFunctionCallResult = function _AbstractChatCompletionRunner_getFinalFunctionCallResult() { for (let i = this.messages.length - 1; i >= 0; i--) { const message = this.messages[i]; if ((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isFunctionMessage)(message) && message.content != null) { return message.content; } } return; }, _AbstractChatCompletionRunner_calculateTotalUsage = function _AbstractChatCompletionRunner_calculateTotalUsage() { const total = { completion_tokens: 0, prompt_tokens: 0, total_tokens: 0, }; for (const { usage } of this._chatCompletions) { if (usage) { total.completion_tokens += usage.completion_tokens; total.prompt_tokens += usage.prompt_tokens; total.total_tokens += usage.total_tokens; } } return total; }, _AbstractChatCompletionRunner_validateParams = function _AbstractChatCompletionRunner_validateParams(params) { if (params.n != null && params.n > 1) { throw new openai_error__WEBPACK_IMPORTED_MODULE_0__.OpenAIError('ChatCompletion convenience helpers only support n=1 at this time. To use n>1, please use chat.completions.create() directly.'); } }, _AbstractChatCompletionRunner_stringifyFunctionCallResult = function _AbstractChatCompletionRunner_stringifyFunctionCallResult(rawContent) { return (typeof rawContent === 'string' ? rawContent : rawContent === undefined ? 'undefined' : JSON.stringify(rawContent)); }; //# sourceMappingURL=AbstractChatCompletionRunner.mjs.map /***/ }), /***/ "./node_modules/openai/lib/ChatCompletionRunner.mjs": /*!**********************************************************!*\ !*** ./node_modules/openai/lib/ChatCompletionRunner.mjs ***! \**********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ChatCompletionRunner: () => (/* binding */ ChatCompletionRunner) /* harmony export */ }); /* harmony import */ var _AbstractChatCompletionRunner_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChatCompletionRunner.mjs */ "./node_modules/openai/lib/AbstractChatCompletionRunner.mjs"); /* harmony import */ var _chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./chatCompletionUtils.mjs */ "./node_modules/openai/lib/chatCompletionUtils.mjs"); class ChatCompletionRunner extends _AbstractChatCompletionRunner_mjs__WEBPACK_IMPORTED_MODULE_0__.AbstractChatCompletionRunner { static runFunctions(completions, params, options) { const runner = new ChatCompletionRunner(); runner._run(() => runner._runFunctions(completions, params, options)); return runner; } static runTools(completions, params, options) { const runner = new ChatCompletionRunner(); runner._run(() => runner._runTools(completions, params, options)); return runner; } _addMessage(message) { super._addMessage(message); if ((0,_chatCompletionUtils_mjs__WEBPACK_IMPORTED_MODULE_1__.isAssistantMessage)(message) && message.content) { this._emit('content', message.content); } } } //# sourceMappingURL=ChatCompletionRunner.mjs.map /***/ }), /***/ "./node_modules/openai/lib/ChatCompletionStream.mjs": /*!**********************************************************!*\ !*** ./node_modules/openai/lib/ChatCompletionStream.mjs ***! \**********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ChatCompletionStream: () => (/* binding */ ChatCompletionStream) /* harmony export */ }); /* harmony import */ var openai_error__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/error */ "./node_modules/openai/error.mjs"); /* harmony import */ var _AbstractChatCompletionRunner_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AbstractChatCompletionRunner.mjs */ "./node_modules/openai/lib/AbstractChatCompletionRunner.mjs"); /* harmony import */ var openai_streaming__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/streaming */ "./node_modules/openai/streaming.mjs"); var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) { if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it"); return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver); }; var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) { if (kind === "m") throw new TypeError("Private method is not writable"); if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter"); if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it"); return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value; }; var _ChatCompletionStream_instances, _ChatCompletionStream_currentChatCompletionSnapshot, _ChatCompletionStream_beginRequest, _ChatCompletionStream_addChunk, _ChatCompletionStream_endRequest, _ChatCompletionStream_accumulateChatCompletion; class ChatCompletionStream extends _AbstractChatCompletionRunner_mjs__WEBPACK_IMPORTED_MODULE_0__.AbstractChatCompletionRunner { constructor() { super(...arguments); _ChatCompletionStream_instances.add(this); _ChatCompletionStream_currentChatCompletionSnapshot.set(this, void 0); } get currentChatCompletionSnapshot() { return __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); } /** * Intended for use on the frontend, consuming a stream produced with * `.toReadableStream()` on the backend. * * Note that messages sent to the model do not appear in `.on('message')` * in this context. */ static fromReadableStream(stream) { const runner = new ChatCompletionStream(); runner._run(() => runner._fromReadableStream(stream)); return runner; } static createChatCompletion(completions, params, options) { const runner = new ChatCompletionStream(); runner._run(() => runner._runChatCompletion(completions, { ...params, stream: true }, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'stream' } })); return runner; } async _createChatCompletion(completions, params, options) { const signal = options?.signal; if (signal) { if (signal.aborted) this.controller.abort(); signal.addEventListener('abort', () => this.controller.abort()); } __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); const stream = await completions.create({ ...params, stream: true }, { ...options, signal: this.controller.signal }); this._connected(); for await (const chunk of stream) { __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); } if (stream.controller.signal?.aborted) { throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.APIUserAbortError(); } return this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } async _fromReadableStream(readableStream, options) { const signal = options?.signal; if (signal) { if (signal.aborted) this.controller.abort(); signal.addEventListener('abort', () => this.controller.abort()); } __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_beginRequest).call(this); this._connected(); const stream = openai_streaming__WEBPACK_IMPORTED_MODULE_2__.Stream.fromReadableStream(readableStream, this.controller); let chatId; for await (const chunk of stream) { if (chatId && chatId !== chunk.id) { // A new request has been made. this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_addChunk).call(this, chunk); chatId = chunk.id; } if (stream.controller.signal?.aborted) { throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.APIUserAbortError(); } return this._addChatCompletion(__classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_endRequest).call(this)); } [(_ChatCompletionStream_currentChatCompletionSnapshot = new WeakMap(), _ChatCompletionStream_instances = new WeakSet(), _ChatCompletionStream_beginRequest = function _ChatCompletionStream_beginRequest() { if (this.ended) return; __classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f"); }, _ChatCompletionStream_addChunk = function _ChatCompletionStream_addChunk(chunk) { if (this.ended) return; const completion = __classPrivateFieldGet(this, _ChatCompletionStream_instances, "m", _ChatCompletionStream_accumulateChatCompletion).call(this, chunk); this._emit('chunk', chunk, completion); const delta = chunk.choices[0]?.delta?.content; const snapshot = completion.choices[0]?.message; if (delta != null && snapshot?.role === 'assistant' && snapshot?.content) { this._emit('content', delta, snapshot.content); } }, _ChatCompletionStream_endRequest = function _ChatCompletionStream_endRequest() { if (this.ended) { throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`stream has ended, this shouldn't happen`); } const snapshot = __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); if (!snapshot) { throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`request ended without sending any chunks`); } __classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, undefined, "f"); return finalizeChatCompletion(snapshot); }, _ChatCompletionStream_accumulateChatCompletion = function _ChatCompletionStream_accumulateChatCompletion(chunk) { var _a, _b; let snapshot = __classPrivateFieldGet(this, _ChatCompletionStream_currentChatCompletionSnapshot, "f"); const { choices, ...rest } = chunk; if (!snapshot) { snapshot = __classPrivateFieldSet(this, _ChatCompletionStream_currentChatCompletionSnapshot, { ...rest, choices: [], }, "f"); } else { Object.assign(snapshot, rest); } for (const { delta, finish_reason, index, ...other } of chunk.choices) { let choice = snapshot.choices[index]; if (!choice) { snapshot.choices[index] = { finish_reason, index, message: delta, ...other }; continue; } if (finish_reason) choice.finish_reason = finish_reason; Object.assign(choice, other); if (!delta) continue; // Shouldn't happen; just in case. const { content, function_call, role, tool_calls } = delta; if (content) choice.message.content = (choice.message.content || '') + content; if (role) choice.message.role = role; if (function_call) { if (!choice.message.function_call) { choice.message.function_call = function_call; } else { if (function_call.name) choice.message.function_call.name = function_call.name; if (function_call.arguments) { (_a = choice.message.function_call).arguments ?? (_a.arguments = ''); choice.message.function_call.arguments += function_call.arguments; } } } if (tool_calls) { if (!choice.message.tool_calls) choice.message.tool_calls = []; for (const { index, id, type, function: fn } of tool_calls) { const tool_call = ((_b = choice.message.tool_calls)[index] ?? (_b[index] = {})); if (id) tool_call.id = id; if (type) tool_call.type = type; if (fn) tool_call.function ?? (tool_call.function = { arguments: '' }); if (fn?.name) tool_call.function.name = fn.name; if (fn?.arguments) tool_call.function.arguments += fn.arguments; } } } return snapshot; }, Symbol.asyncIterator)]() { const pushQueue = []; const readQueue = []; let done = false; this.on('chunk', (chunk) => { const reader = readQueue.shift(); if (reader) { reader(chunk); } else { pushQueue.push(chunk); } }); this.on('end', () => { done = true; for (const reader of readQueue) { reader(undefined); } readQueue.length = 0; }); return { next: async () => { if (!pushQueue.length) { if (done) { return { value: undefined, done: true }; } return new Promise((resolve) => readQueue.push(resolve)).then((chunk) => (chunk ? { value: chunk, done: false } : { value: undefined, done: true })); } const chunk = pushQueue.shift(); return { value: chunk, done: false }; }, }; } toReadableStream() { const stream = new openai_streaming__WEBPACK_IMPORTED_MODULE_2__.Stream(this[Symbol.asyncIterator].bind(this), this.controller); return stream.toReadableStream(); } } function finalizeChatCompletion(snapshot) { const { id, choices, created, model } = snapshot; return { id, choices: choices.map(({ message, finish_reason, index }) => { if (!finish_reason) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing finish_reason for choice ${index}`); const { content = null, function_call, tool_calls } = message; const role = message.role; // this is what we expect; in theory it could be different which would make our types a slight lie but would be fine. if (!role) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing role for choice ${index}`); if (function_call) { const { arguments: args, name } = function_call; if (args == null) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing function_call.arguments for choice ${index}`); if (!name) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing function_call.name for choice ${index}`); return { message: { content, function_call: { arguments: args, name }, role }, finish_reason, index }; } if (tool_calls) { return { index, finish_reason, message: { role, content, tool_calls: tool_calls.map((tool_call, i) => { const { function: fn, type, id } = tool_call; const { arguments: args, name } = fn || {}; if (id == null) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing choices[${index}].tool_calls[${i}].id\n${str(snapshot)}`); if (type == null) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing choices[${index}].tool_calls[${i}].type\n${str(snapshot)}`); if (name == null) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing choices[${index}].tool_calls[${i}].function.name\n${str(snapshot)}`); if (args == null) throw new openai_error__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`missing choices[${index}].tool_calls[${i}].function.arguments\n${str(snapshot)}`); return { id, type, function: { name, arguments: args } }; }), }, }; } return { message: { content: content, role }, finish_reason, index }; }), created, model, object: 'chat.completion', }; } function str(x) { return JSON.stringify(x); } //# sourceMappingURL=ChatCompletionStream.mjs.map /***/ }), /***/ "./node_modules/openai/lib/ChatCompletionStreamingRunner.mjs": /*!*******************************************************************!*\ !*** ./node_modules/openai/lib/ChatCompletionStreamingRunner.mjs ***! \*******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ChatCompletionStreamingRunner: () => (/* binding */ ChatCompletionStreamingRunner) /* harmony export */ }); /* harmony import */ var _ChatCompletionStream_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./ChatCompletionStream.mjs */ "./node_modules/openai/lib/ChatCompletionStream.mjs"); class ChatCompletionStreamingRunner extends _ChatCompletionStream_mjs__WEBPACK_IMPORTED_MODULE_0__.ChatCompletionStream { static fromReadableStream(stream) { const runner = new ChatCompletionStreamingRunner(); runner._run(() => runner._fromReadableStream(stream)); return runner; } static runFunctions(completions, params, options) { const runner = new ChatCompletionStreamingRunner(); runner._run(() => runner._runFunctions(completions, params, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'runFunctions' }, })); return runner; } static runTools(completions, params, options) { const runner = new ChatCompletionStreamingRunner(); runner._run(() => runner._runTools(completions, params, { ...options, headers: { ...options?.headers, 'X-Stainless-Helper-Method': 'runTools' }, })); return runner; } } //# sourceMappingURL=ChatCompletionStreamingRunner.mjs.map /***/ }), /***/ "./node_modules/openai/lib/RunnableFunction.mjs": /*!******************************************************!*\ !*** ./node_modules/openai/lib/RunnableFunction.mjs ***! \******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ParsingFunction: () => (/* binding */ ParsingFunction), /* harmony export */ isRunnableFunctionWithParse: () => (/* binding */ isRunnableFunctionWithParse) /* harmony export */ }); function isRunnableFunctionWithParse(fn) { return typeof fn.parse === 'function'; } /** * This is helper class for passing a `function` and `parse` where the `function` * argument type matches the `parse` return type. */ class ParsingFunction { constructor(input) { this.function = input.function; this.parse = input.parse; this.parameters = input.parameters; this.description = input.description; this.name = input.name; } } //# sourceMappingURL=RunnableFunction.mjs.map /***/ }), /***/ "./node_modules/openai/lib/chatCompletionUtils.mjs": /*!*********************************************************!*\ !*** ./node_modules/openai/lib/chatCompletionUtils.mjs ***! \*********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ isAssistantMessage: () => (/* binding */ isAssistantMessage), /* harmony export */ isFunctionMessage: () => (/* binding */ isFunctionMessage), /* harmony export */ isPresent: () => (/* binding */ isPresent), /* harmony export */ isToolMessage: () => (/* binding */ isToolMessage) /* harmony export */ }); const isAssistantMessage = (message) => { return message?.role === 'assistant'; }; const isFunctionMessage = (message) => { return message?.role === 'function'; }; const isToolMessage = (message) => { return message?.role === 'tool'; }; function isPresent(obj) { return obj != null; } //# sourceMappingURL=chatCompletionUtils.mjs.map /***/ }), /***/ "./node_modules/openai/pagination.mjs": /*!********************************************!*\ !*** ./node_modules/openai/pagination.mjs ***! \********************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ CursorPage: () => (/* binding */ CursorPage), /* harmony export */ Page: () => (/* binding */ Page) /* harmony export */ }); /* harmony import */ var _core_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./core.mjs */ "./node_modules/openai/core.mjs"); // File generated from our OpenAPI spec by Stainless. /** * Note: no pagination actually occurs yet, this is for forwards-compatibility. */ class Page extends _core_mjs__WEBPACK_IMPORTED_MODULE_0__.AbstractPage { constructor(client, response, body, options) { super(client, response, body, options); this.data = body.data; this.object = body.object; } getPaginatedItems() { return this.data; } // @deprecated Please use `nextPageInfo()` instead /** * This page represents a response that isn't actually paginated at the API level * so there will never be any next page params. */ nextPageParams() { return null; } nextPageInfo() { return null; } } class CursorPage extends _core_mjs__WEBPACK_IMPORTED_MODULE_0__.AbstractPage { constructor(client, response, body, options) { super(client, response, body, options); this.data = body.data; } getPaginatedItems() { return this.data; } // @deprecated Please use `nextPageInfo()` instead nextPageParams() { const info = this.nextPageInfo(); if (!info) return null; if ('params' in info) return info.params; const params = Object.fromEntries(info.url.searchParams); if (!Object.keys(params).length) return null; return params; } nextPageInfo() { if (!this.data?.length) { return null; } const next = this.data[this.data.length - 1]?.id; if (!next) return null; return { params: { after: next } }; } } //# sourceMappingURL=pagination.mjs.map /***/ }), /***/ "./node_modules/openai/resource.mjs": /*!******************************************!*\ !*** ./node_modules/openai/resource.mjs ***! \******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ APIResource: () => (/* binding */ APIResource) /* harmony export */ }); // File generated from our OpenAPI spec by Stainless. class APIResource { constructor(client) { this._client = client; } } //# sourceMappingURL=resource.mjs.map /***/ }), /***/ "./node_modules/openai/resources/audio/audio.mjs": /*!*******************************************************!*\ !*** ./node_modules/openai/resources/audio/audio.mjs ***! \*******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Audio: () => (/* binding */ Audio) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_audio_speech__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/audio/speech */ "./node_modules/openai/resources/audio/speech.mjs"); /* harmony import */ var openai_resources_audio_transcriptions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/audio/transcriptions */ "./node_modules/openai/resources/audio/transcriptions.mjs"); /* harmony import */ var openai_resources_audio_translations__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/resources/audio/translations */ "./node_modules/openai/resources/audio/translations.mjs"); // File generated from our OpenAPI spec by Stainless. class Audio extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.transcriptions = new openai_resources_audio_transcriptions__WEBPACK_IMPORTED_MODULE_1__.Transcriptions(this._client); this.translations = new openai_resources_audio_translations__WEBPACK_IMPORTED_MODULE_2__.Translations(this._client); this.speech = new openai_resources_audio_speech__WEBPACK_IMPORTED_MODULE_3__.Speech(this._client); } } (function (Audio) { Audio.Transcriptions = openai_resources_audio_transcriptions__WEBPACK_IMPORTED_MODULE_1__.Transcriptions; Audio.Translations = openai_resources_audio_translations__WEBPACK_IMPORTED_MODULE_2__.Translations; Audio.Speech = openai_resources_audio_speech__WEBPACK_IMPORTED_MODULE_3__.Speech; })(Audio || (Audio = {})); //# sourceMappingURL=audio.mjs.map /***/ }), /***/ "./node_modules/openai/resources/audio/speech.mjs": /*!********************************************************!*\ !*** ./node_modules/openai/resources/audio/speech.mjs ***! \********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Speech: () => (/* binding */ Speech) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); // File generated from our OpenAPI spec by Stainless. class Speech extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Generates audio from the input text. */ create(body, options) { return this._client.post('/audio/speech', { body, ...options, __binaryResponse: true }); } } (function (Speech) { })(Speech || (Speech = {})); //# sourceMappingURL=speech.mjs.map /***/ }), /***/ "./node_modules/openai/resources/audio/transcriptions.mjs": /*!****************************************************************!*\ !*** ./node_modules/openai/resources/audio/transcriptions.mjs ***! \****************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Transcriptions: () => (/* binding */ Transcriptions) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/uploads.mjs"); // File generated from our OpenAPI spec by Stainless. class Transcriptions extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Transcribes audio into the input language. */ create(body, options) { return this._client.post('/audio/transcriptions', (0,openai_core__WEBPACK_IMPORTED_MODULE_1__.multipartFormRequestOptions)({ body, ...options })); } } (function (Transcriptions) { })(Transcriptions || (Transcriptions = {})); //# sourceMappingURL=transcriptions.mjs.map /***/ }), /***/ "./node_modules/openai/resources/audio/translations.mjs": /*!**************************************************************!*\ !*** ./node_modules/openai/resources/audio/translations.mjs ***! \**************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Translations: () => (/* binding */ Translations) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/uploads.mjs"); // File generated from our OpenAPI spec by Stainless. class Translations extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Translates audio into English. */ create(body, options) { return this._client.post('/audio/translations', (0,openai_core__WEBPACK_IMPORTED_MODULE_1__.multipartFormRequestOptions)({ body, ...options })); } } (function (Translations) { })(Translations || (Translations = {})); //# sourceMappingURL=translations.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/assistants/assistants.mjs": /*!**********************************************************************!*\ !*** ./node_modules/openai/resources/beta/assistants/assistants.mjs ***! \**********************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Assistants: () => (/* binding */ Assistants), /* harmony export */ AssistantsPage: () => (/* binding */ AssistantsPage) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_assistants_assistants__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! openai/resources/beta/assistants/assistants */ "./node_modules/openai/resources/beta/assistants/assistants.mjs"); /* harmony import */ var openai_resources_beta_assistants_files__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/beta/assistants/files */ "./node_modules/openai/resources/beta/assistants/files.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Assistants extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.files = new openai_resources_beta_assistants_files__WEBPACK_IMPORTED_MODULE_1__.Files(this._client); } /** * Create an assistant with a model and instructions. */ create(body, options) { return this._client.post('/assistants', { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Retrieves an assistant. */ retrieve(assistantId, options) { return this._client.get(`/assistants/${assistantId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Modifies an assistant. */ update(assistantId, body, options) { return this._client.post(`/assistants/${assistantId}`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } list(query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_2__.isRequestOptions)(query)) { return this.list({}, query); } return this._client.getAPIList('/assistants', AssistantsPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Delete an assistant. */ del(assistantId, options) { return this._client.delete(`/assistants/${assistantId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } class AssistantsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_3__.CursorPage { } (function (Assistants) { Assistants.AssistantsPage = openai_resources_beta_assistants_assistants__WEBPACK_IMPORTED_MODULE_4__.AssistantsPage; Assistants.Files = openai_resources_beta_assistants_files__WEBPACK_IMPORTED_MODULE_1__.Files; Assistants.AssistantFilesPage = openai_resources_beta_assistants_files__WEBPACK_IMPORTED_MODULE_1__.AssistantFilesPage; })(Assistants || (Assistants = {})); //# sourceMappingURL=assistants.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/assistants/files.mjs": /*!*****************************************************************!*\ !*** ./node_modules/openai/resources/beta/assistants/files.mjs ***! \*****************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ AssistantFilesPage: () => (/* binding */ AssistantFilesPage), /* harmony export */ Files: () => (/* binding */ Files) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_assistants_files__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/beta/assistants/files */ "./node_modules/openai/resources/beta/assistants/files.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Files extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Create an assistant file by attaching a * [File](https://platform.openai.com/docs/api-reference/files) to an * [assistant](https://platform.openai.com/docs/api-reference/assistants). */ create(assistantId, body, options) { return this._client.post(`/assistants/${assistantId}/files`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Retrieves an AssistantFile. */ retrieve(assistantId, fileId, options) { return this._client.get(`/assistants/${assistantId}/files/${fileId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } list(assistantId, query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_1__.isRequestOptions)(query)) { return this.list(assistantId, {}, query); } return this._client.getAPIList(`/assistants/${assistantId}/files`, AssistantFilesPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Delete an assistant file. */ del(assistantId, fileId, options) { return this._client.delete(`/assistants/${assistantId}/files/${fileId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } class AssistantFilesPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_2__.CursorPage { } (function (Files) { Files.AssistantFilesPage = openai_resources_beta_assistants_files__WEBPACK_IMPORTED_MODULE_3__.AssistantFilesPage; })(Files || (Files = {})); //# sourceMappingURL=files.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/beta.mjs": /*!*****************************************************!*\ !*** ./node_modules/openai/resources/beta/beta.mjs ***! \*****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Beta: () => (/* binding */ Beta) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_beta_assistants_assistants__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/resources/beta/assistants/assistants */ "./node_modules/openai/resources/beta/assistants/assistants.mjs"); /* harmony import */ var openai_resources_beta_chat_chat__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/beta/chat/chat */ "./node_modules/openai/resources/beta/chat/chat.mjs"); /* harmony import */ var openai_resources_beta_threads_threads__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/beta/threads/threads */ "./node_modules/openai/resources/beta/threads/threads.mjs"); // File generated from our OpenAPI spec by Stainless. class Beta extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.chat = new openai_resources_beta_chat_chat__WEBPACK_IMPORTED_MODULE_1__.Chat(this._client); this.assistants = new openai_resources_beta_assistants_assistants__WEBPACK_IMPORTED_MODULE_2__.Assistants(this._client); this.threads = new openai_resources_beta_threads_threads__WEBPACK_IMPORTED_MODULE_3__.Threads(this._client); } } (function (Beta) { Beta.Chat = openai_resources_beta_chat_chat__WEBPACK_IMPORTED_MODULE_1__.Chat; Beta.Assistants = openai_resources_beta_assistants_assistants__WEBPACK_IMPORTED_MODULE_2__.Assistants; Beta.AssistantsPage = openai_resources_beta_assistants_assistants__WEBPACK_IMPORTED_MODULE_2__.AssistantsPage; Beta.Threads = openai_resources_beta_threads_threads__WEBPACK_IMPORTED_MODULE_3__.Threads; })(Beta || (Beta = {})); //# sourceMappingURL=beta.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/chat/chat.mjs": /*!**********************************************************!*\ !*** ./node_modules/openai/resources/beta/chat/chat.mjs ***! \**********************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Chat: () => (/* binding */ Chat) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_beta_chat_completions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/beta/chat/completions */ "./node_modules/openai/resources/beta/chat/completions.mjs"); // File generated from our OpenAPI spec by Stainless. class Chat extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.completions = new openai_resources_beta_chat_completions__WEBPACK_IMPORTED_MODULE_1__.Completions(this._client); } } (function (Chat) { Chat.Completions = openai_resources_beta_chat_completions__WEBPACK_IMPORTED_MODULE_1__.Completions; })(Chat || (Chat = {})); //# sourceMappingURL=chat.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/chat/completions.mjs": /*!*****************************************************************!*\ !*** ./node_modules/openai/resources/beta/chat/completions.mjs ***! \*****************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ ChatCompletionRunner: () => (/* reexport safe */ openai_lib_ChatCompletionRunner__WEBPACK_IMPORTED_MODULE_0__.ChatCompletionRunner), /* harmony export */ ChatCompletionStream: () => (/* reexport safe */ openai_lib_ChatCompletionStream__WEBPACK_IMPORTED_MODULE_3__.ChatCompletionStream), /* harmony export */ ChatCompletionStreamingRunner: () => (/* reexport safe */ openai_lib_ChatCompletionStreamingRunner__WEBPACK_IMPORTED_MODULE_1__.ChatCompletionStreamingRunner), /* harmony export */ Completions: () => (/* binding */ Completions), /* harmony export */ ParsingFunction: () => (/* reexport safe */ openai_lib_RunnableFunction__WEBPACK_IMPORTED_MODULE_2__.ParsingFunction) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_lib_ChatCompletionRunner__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/lib/ChatCompletionRunner */ "./node_modules/openai/lib/ChatCompletionRunner.mjs"); /* harmony import */ var openai_lib_ChatCompletionStreamingRunner__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/lib/ChatCompletionStreamingRunner */ "./node_modules/openai/lib/ChatCompletionStreamingRunner.mjs"); /* harmony import */ var openai_lib_RunnableFunction__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/lib/RunnableFunction */ "./node_modules/openai/lib/RunnableFunction.mjs"); /* harmony import */ var openai_lib_ChatCompletionStream__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/lib/ChatCompletionStream */ "./node_modules/openai/lib/ChatCompletionStream.mjs"); // File generated from our OpenAPI spec by Stainless. class Completions extends openai_resource__WEBPACK_IMPORTED_MODULE_4__.APIResource { runFunctions(body, options) { if (body.stream) { return openai_lib_ChatCompletionStreamingRunner__WEBPACK_IMPORTED_MODULE_1__.ChatCompletionStreamingRunner.runFunctions(this._client.chat.completions, body, options); } return openai_lib_ChatCompletionRunner__WEBPACK_IMPORTED_MODULE_0__.ChatCompletionRunner.runFunctions(this._client.chat.completions, body, options); } runTools(body, options) { if (body.stream) { return openai_lib_ChatCompletionStreamingRunner__WEBPACK_IMPORTED_MODULE_1__.ChatCompletionStreamingRunner.runTools(this._client.chat.completions, body, options); } return openai_lib_ChatCompletionRunner__WEBPACK_IMPORTED_MODULE_0__.ChatCompletionRunner.runTools(this._client.chat.completions, body, options); } /** * Creates a chat completion stream */ stream(body, options) { return openai_lib_ChatCompletionStream__WEBPACK_IMPORTED_MODULE_3__.ChatCompletionStream.createChatCompletion(this._client.chat.completions, body, options); } } //# sourceMappingURL=completions.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/threads/messages/files.mjs": /*!***********************************************************************!*\ !*** ./node_modules/openai/resources/beta/threads/messages/files.mjs ***! \***********************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Files: () => (/* binding */ Files), /* harmony export */ MessageFilesPage: () => (/* binding */ MessageFilesPage) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_threads_messages_files__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/beta/threads/messages/files */ "./node_modules/openai/resources/beta/threads/messages/files.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Files extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Retrieves a message file. */ retrieve(threadId, messageId, fileId, options) { return this._client.get(`/threads/${threadId}/messages/${messageId}/files/${fileId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } list(threadId, messageId, query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_1__.isRequestOptions)(query)) { return this.list(threadId, messageId, {}, query); } return this._client.getAPIList(`/threads/${threadId}/messages/${messageId}/files`, MessageFilesPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } class MessageFilesPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_2__.CursorPage { } (function (Files) { Files.MessageFilesPage = openai_resources_beta_threads_messages_files__WEBPACK_IMPORTED_MODULE_3__.MessageFilesPage; })(Files || (Files = {})); //# sourceMappingURL=files.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/threads/messages/messages.mjs": /*!**************************************************************************!*\ !*** ./node_modules/openai/resources/beta/threads/messages/messages.mjs ***! \**************************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Messages: () => (/* binding */ Messages), /* harmony export */ ThreadMessagesPage: () => (/* binding */ ThreadMessagesPage) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_threads_messages_messages__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! openai/resources/beta/threads/messages/messages */ "./node_modules/openai/resources/beta/threads/messages/messages.mjs"); /* harmony import */ var openai_resources_beta_threads_messages_files__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/beta/threads/messages/files */ "./node_modules/openai/resources/beta/threads/messages/files.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Messages extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.files = new openai_resources_beta_threads_messages_files__WEBPACK_IMPORTED_MODULE_1__.Files(this._client); } /** * Create a message. */ create(threadId, body, options) { return this._client.post(`/threads/${threadId}/messages`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Retrieve a message. */ retrieve(threadId, messageId, options) { return this._client.get(`/threads/${threadId}/messages/${messageId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Modifies a message. */ update(threadId, messageId, body, options) { return this._client.post(`/threads/${threadId}/messages/${messageId}`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } list(threadId, query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_2__.isRequestOptions)(query)) { return this.list(threadId, {}, query); } return this._client.getAPIList(`/threads/${threadId}/messages`, ThreadMessagesPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } class ThreadMessagesPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_3__.CursorPage { } (function (Messages) { Messages.ThreadMessagesPage = openai_resources_beta_threads_messages_messages__WEBPACK_IMPORTED_MODULE_4__.ThreadMessagesPage; Messages.Files = openai_resources_beta_threads_messages_files__WEBPACK_IMPORTED_MODULE_1__.Files; Messages.MessageFilesPage = openai_resources_beta_threads_messages_files__WEBPACK_IMPORTED_MODULE_1__.MessageFilesPage; })(Messages || (Messages = {})); //# sourceMappingURL=messages.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/threads/runs/runs.mjs": /*!******************************************************************!*\ !*** ./node_modules/openai/resources/beta/threads/runs/runs.mjs ***! \******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Runs: () => (/* binding */ Runs), /* harmony export */ RunsPage: () => (/* binding */ RunsPage) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_threads_runs_runs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! openai/resources/beta/threads/runs/runs */ "./node_modules/openai/resources/beta/threads/runs/runs.mjs"); /* harmony import */ var openai_resources_beta_threads_runs_steps__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/beta/threads/runs/steps */ "./node_modules/openai/resources/beta/threads/runs/steps.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Runs extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.steps = new openai_resources_beta_threads_runs_steps__WEBPACK_IMPORTED_MODULE_1__.Steps(this._client); } /** * Create a run. */ create(threadId, body, options) { return this._client.post(`/threads/${threadId}/runs`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Retrieves a run. */ retrieve(threadId, runId, options) { return this._client.get(`/threads/${threadId}/runs/${runId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Modifies a run. */ update(threadId, runId, body, options) { return this._client.post(`/threads/${threadId}/runs/${runId}`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } list(threadId, query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_2__.isRequestOptions)(query)) { return this.list(threadId, {}, query); } return this._client.getAPIList(`/threads/${threadId}/runs`, RunsPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Cancels a run that is `in_progress`. */ cancel(threadId, runId, options) { return this._client.post(`/threads/${threadId}/runs/${runId}/cancel`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * When a run has the `status: "requires_action"` and `required_action.type` is * `submit_tool_outputs`, this endpoint can be used to submit the outputs from the * tool calls once they're all completed. All outputs must be submitted in a single * request. */ submitToolOutputs(threadId, runId, body, options) { return this._client.post(`/threads/${threadId}/runs/${runId}/submit_tool_outputs`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } class RunsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_3__.CursorPage { } (function (Runs) { Runs.RunsPage = openai_resources_beta_threads_runs_runs__WEBPACK_IMPORTED_MODULE_4__.RunsPage; Runs.Steps = openai_resources_beta_threads_runs_steps__WEBPACK_IMPORTED_MODULE_1__.Steps; Runs.RunStepsPage = openai_resources_beta_threads_runs_steps__WEBPACK_IMPORTED_MODULE_1__.RunStepsPage; })(Runs || (Runs = {})); //# sourceMappingURL=runs.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/threads/runs/steps.mjs": /*!*******************************************************************!*\ !*** ./node_modules/openai/resources/beta/threads/runs/steps.mjs ***! \*******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ RunStepsPage: () => (/* binding */ RunStepsPage), /* harmony export */ Steps: () => (/* binding */ Steps) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_threads_runs_steps__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/beta/threads/runs/steps */ "./node_modules/openai/resources/beta/threads/runs/steps.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Steps extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Retrieves a run step. */ retrieve(threadId, runId, stepId, options) { return this._client.get(`/threads/${threadId}/runs/${runId}/steps/${stepId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } list(threadId, runId, query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_1__.isRequestOptions)(query)) { return this.list(threadId, runId, {}, query); } return this._client.getAPIList(`/threads/${threadId}/runs/${runId}/steps`, RunStepsPage, { query, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } class RunStepsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_2__.CursorPage { } (function (Steps) { Steps.RunStepsPage = openai_resources_beta_threads_runs_steps__WEBPACK_IMPORTED_MODULE_3__.RunStepsPage; })(Steps || (Steps = {})); //# sourceMappingURL=steps.mjs.map /***/ }), /***/ "./node_modules/openai/resources/beta/threads/threads.mjs": /*!****************************************************************!*\ !*** ./node_modules/openai/resources/beta/threads/threads.mjs ***! \****************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Threads: () => (/* binding */ Threads) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_beta_threads_messages_messages__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/resources/beta/threads/messages/messages */ "./node_modules/openai/resources/beta/threads/messages/messages.mjs"); /* harmony import */ var openai_resources_beta_threads_runs_runs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/beta/threads/runs/runs */ "./node_modules/openai/resources/beta/threads/runs/runs.mjs"); // File generated from our OpenAPI spec by Stainless. class Threads extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.runs = new openai_resources_beta_threads_runs_runs__WEBPACK_IMPORTED_MODULE_1__.Runs(this._client); this.messages = new openai_resources_beta_threads_messages_messages__WEBPACK_IMPORTED_MODULE_2__.Messages(this._client); } create(body = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_3__.isRequestOptions)(body)) { return this.create({}, body); } return this._client.post('/threads', { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Retrieves a thread. */ retrieve(threadId, options) { return this._client.get(`/threads/${threadId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Modifies a thread. */ update(threadId, body, options) { return this._client.post(`/threads/${threadId}`, { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Delete a thread. */ del(threadId, options) { return this._client.delete(`/threads/${threadId}`, { ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } /** * Create a thread and run it in one request. */ createAndRun(body, options) { return this._client.post('/threads/runs', { body, ...options, headers: { 'OpenAI-Beta': 'assistants=v1', ...options?.headers }, }); } } (function (Threads) { Threads.Runs = openai_resources_beta_threads_runs_runs__WEBPACK_IMPORTED_MODULE_1__.Runs; Threads.RunsPage = openai_resources_beta_threads_runs_runs__WEBPACK_IMPORTED_MODULE_1__.RunsPage; Threads.Messages = openai_resources_beta_threads_messages_messages__WEBPACK_IMPORTED_MODULE_2__.Messages; Threads.ThreadMessagesPage = openai_resources_beta_threads_messages_messages__WEBPACK_IMPORTED_MODULE_2__.ThreadMessagesPage; })(Threads || (Threads = {})); //# sourceMappingURL=threads.mjs.map /***/ }), /***/ "./node_modules/openai/resources/chat/chat.mjs": /*!*****************************************************!*\ !*** ./node_modules/openai/resources/chat/chat.mjs ***! \*****************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Chat: () => (/* binding */ Chat) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_chat_completions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/chat/completions */ "./node_modules/openai/resources/chat/completions.mjs"); // File generated from our OpenAPI spec by Stainless. class Chat extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.completions = new openai_resources_chat_completions__WEBPACK_IMPORTED_MODULE_1__.Completions(this._client); } } (function (Chat) { Chat.Completions = openai_resources_chat_completions__WEBPACK_IMPORTED_MODULE_1__.Completions; })(Chat || (Chat = {})); //# sourceMappingURL=chat.mjs.map /***/ }), /***/ "./node_modules/openai/resources/chat/completions.mjs": /*!************************************************************!*\ !*** ./node_modules/openai/resources/chat/completions.mjs ***! \************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Completions: () => (/* binding */ Completions) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); // File generated from our OpenAPI spec by Stainless. class Completions extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { create(body, options) { return this._client.post('/chat/completions', { body, ...options, stream: body.stream ?? false }); } } (function (Completions) { })(Completions || (Completions = {})); //# sourceMappingURL=completions.mjs.map /***/ }), /***/ "./node_modules/openai/resources/completions.mjs": /*!*******************************************************!*\ !*** ./node_modules/openai/resources/completions.mjs ***! \*******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Completions: () => (/* binding */ Completions) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); // File generated from our OpenAPI spec by Stainless. class Completions extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { create(body, options) { return this._client.post('/completions', { body, ...options, stream: body.stream ?? false }); } } (function (Completions) { })(Completions || (Completions = {})); //# sourceMappingURL=completions.mjs.map /***/ }), /***/ "./node_modules/openai/resources/edits.mjs": /*!*************************************************!*\ !*** ./node_modules/openai/resources/edits.mjs ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Edits: () => (/* binding */ Edits) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); // File generated from our OpenAPI spec by Stainless. class Edits extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Creates a new edit for the provided input, instruction, and parameters. * * @deprecated The Edits API is deprecated; please use Chat Completions instead. * * https://openai.com/blog/gpt-4-api-general-availability#deprecation-of-the-edits-api */ create(body, options) { return this._client.post('/edits', { body, ...options }); } } (function (Edits) { })(Edits || (Edits = {})); //# sourceMappingURL=edits.mjs.map /***/ }), /***/ "./node_modules/openai/resources/embeddings.mjs": /*!******************************************************!*\ !*** ./node_modules/openai/resources/embeddings.mjs ***! \******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Embeddings: () => (/* binding */ Embeddings) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); // File generated from our OpenAPI spec by Stainless. class Embeddings extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Creates an embedding vector representing the input text. */ create(body, options) { return this._client.post('/embeddings', { body, ...options }); } } (function (Embeddings) { })(Embeddings || (Embeddings = {})); //# sourceMappingURL=embeddings.mjs.map /***/ }), /***/ "./node_modules/openai/resources/files.mjs": /*!*************************************************!*\ !*** ./node_modules/openai/resources/files.mjs ***! \*************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FileObjectsPage: () => (/* binding */ FileObjectsPage), /* harmony export */ Files: () => (/* binding */ Files) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_error__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/error */ "./node_modules/openai/error.mjs"); /* harmony import */ var openai_resources_files__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! openai/resources/files */ "./node_modules/openai/resources/files.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/uploads.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Files extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Upload a file that can be used across various endpoints/features. The size of * all the files uploaded by one organization can be up to 100 GB. * * The size of individual files for can be a maximum of 512MB. See the * [Assistants Tools guide](https://platform.openai.com/docs/assistants/tools) to * learn more about the types of files supported. The Fine-tuning API only supports * `.jsonl` files. * * Please [contact us](https://help.openai.com/) if you need to increase these * storage limits. */ create(body, options) { return this._client.post('/files', (0,openai_core__WEBPACK_IMPORTED_MODULE_1__.multipartFormRequestOptions)({ body, ...options })); } /** * Returns information about a specific file. */ retrieve(fileId, options) { return this._client.get(`/files/${fileId}`, options); } list(query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_2__.isRequestOptions)(query)) { return this.list({}, query); } return this._client.getAPIList('/files', FileObjectsPage, { query, ...options }); } /** * Delete a file. */ del(fileId, options) { return this._client.delete(`/files/${fileId}`, options); } /** * Returns the contents of the specified file. */ content(fileId, options) { return this._client.get(`/files/${fileId}/content`, { ...options, __binaryResponse: true }); } /** * Returns the contents of the specified file. * * @deprecated The `.content()` method should be used instead */ retrieveContent(fileId, options) { return this._client.get(`/files/${fileId}/content`, { ...options, headers: { Accept: 'application/json', ...options?.headers }, }); } /** * Waits for the given file to be processed, default timeout is 30 mins. */ async waitForProcessing(id, { pollInterval = 5000, maxWait = 30 * 60 * 1000 } = {}) { const TERMINAL_STATES = new Set(['processed', 'error', 'deleted']); const start = Date.now(); let file = await this.retrieve(id); while (!file.status || !TERMINAL_STATES.has(file.status)) { await (0,openai_core__WEBPACK_IMPORTED_MODULE_2__.sleep)(pollInterval); file = await this.retrieve(id); if (Date.now() - start > maxWait) { throw new openai_error__WEBPACK_IMPORTED_MODULE_3__.APIConnectionTimeoutError({ message: `Giving up on waiting for file ${id} to finish processing after ${maxWait} milliseconds.`, }); } } return file; } } /** * Note: no pagination actually occurs yet, this is for forwards-compatibility. */ class FileObjectsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_4__.Page { } (function (Files) { Files.FileObjectsPage = openai_resources_files__WEBPACK_IMPORTED_MODULE_5__.FileObjectsPage; })(Files || (Files = {})); //# sourceMappingURL=files.mjs.map /***/ }), /***/ "./node_modules/openai/resources/fine-tunes.mjs": /*!******************************************************!*\ !*** ./node_modules/openai/resources/fine-tunes.mjs ***! \******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FineTunes: () => (/* binding */ FineTunes), /* harmony export */ FineTunesPage: () => (/* binding */ FineTunesPage) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_fine_tunes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/resources/fine-tunes */ "./node_modules/openai/resources/fine-tunes.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class FineTunes extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Creates a job that fine-tunes a specified model from a given dataset. * * Response includes details of the enqueued job including job status and the name * of the fine-tuned models once complete. * * [Learn more about fine-tuning](https://platform.openai.com/docs/guides/legacy-fine-tuning) */ create(body, options) { return this._client.post('/fine-tunes', { body, ...options }); } /** * Gets info about the fine-tune job. * * [Learn more about fine-tuning](https://platform.openai.com/docs/guides/legacy-fine-tuning) */ retrieve(fineTuneId, options) { return this._client.get(`/fine-tunes/${fineTuneId}`, options); } /** * List your organization's fine-tuning jobs */ list(options) { return this._client.getAPIList('/fine-tunes', FineTunesPage, options); } /** * Immediately cancel a fine-tune job. */ cancel(fineTuneId, options) { return this._client.post(`/fine-tunes/${fineTuneId}/cancel`, options); } listEvents(fineTuneId, query, options) { return this._client.get(`/fine-tunes/${fineTuneId}/events`, { query, timeout: 86400000, ...options, stream: query?.stream ?? false, }); } } /** * Note: no pagination actually occurs yet, this is for forwards-compatibility. */ class FineTunesPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_1__.Page { } (function (FineTunes) { FineTunes.FineTunesPage = openai_resources_fine_tunes__WEBPACK_IMPORTED_MODULE_2__.FineTunesPage; })(FineTunes || (FineTunes = {})); //# sourceMappingURL=fine-tunes.mjs.map /***/ }), /***/ "./node_modules/openai/resources/fine-tuning/fine-tuning.mjs": /*!*******************************************************************!*\ !*** ./node_modules/openai/resources/fine-tuning/fine-tuning.mjs ***! \*******************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FineTuning: () => (/* binding */ FineTuning) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/resources/fine-tuning/jobs */ "./node_modules/openai/resources/fine-tuning/jobs.mjs"); // File generated from our OpenAPI spec by Stainless. class FineTuning extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { constructor() { super(...arguments); this.jobs = new openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_1__.Jobs(this._client); } } (function (FineTuning) { FineTuning.Jobs = openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_1__.Jobs; FineTuning.FineTuningJobsPage = openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_1__.FineTuningJobsPage; FineTuning.FineTuningJobEventsPage = openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_1__.FineTuningJobEventsPage; })(FineTuning || (FineTuning = {})); //# sourceMappingURL=fine-tuning.mjs.map /***/ }), /***/ "./node_modules/openai/resources/fine-tuning/jobs.mjs": /*!************************************************************!*\ !*** ./node_modules/openai/resources/fine-tuning/jobs.mjs ***! \************************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ FineTuningJobEventsPage: () => (/* binding */ FineTuningJobEventsPage), /* harmony export */ FineTuningJobsPage: () => (/* binding */ FineTuningJobsPage), /* harmony export */ Jobs: () => (/* binding */ Jobs) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/core.mjs"); /* harmony import */ var openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! openai/resources/fine-tuning/jobs */ "./node_modules/openai/resources/fine-tuning/jobs.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Jobs extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Creates a job that fine-tunes a specified model from a given dataset. * * Response includes details of the enqueued job including job status and the name * of the fine-tuned models once complete. * * [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) */ create(body, options) { return this._client.post('/fine_tuning/jobs', { body, ...options }); } /** * Get info about a fine-tuning job. * * [Learn more about fine-tuning](https://platform.openai.com/docs/guides/fine-tuning) */ retrieve(fineTuningJobId, options) { return this._client.get(`/fine_tuning/jobs/${fineTuningJobId}`, options); } list(query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_1__.isRequestOptions)(query)) { return this.list({}, query); } return this._client.getAPIList('/fine_tuning/jobs', FineTuningJobsPage, { query, ...options }); } /** * Immediately cancel a fine-tune job. */ cancel(fineTuningJobId, options) { return this._client.post(`/fine_tuning/jobs/${fineTuningJobId}/cancel`, options); } listEvents(fineTuningJobId, query = {}, options) { if ((0,openai_core__WEBPACK_IMPORTED_MODULE_1__.isRequestOptions)(query)) { return this.listEvents(fineTuningJobId, {}, query); } return this._client.getAPIList(`/fine_tuning/jobs/${fineTuningJobId}/events`, FineTuningJobEventsPage, { query, ...options, }); } } class FineTuningJobsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_2__.CursorPage { } class FineTuningJobEventsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_2__.CursorPage { } (function (Jobs) { Jobs.FineTuningJobsPage = openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_3__.FineTuningJobsPage; Jobs.FineTuningJobEventsPage = openai_resources_fine_tuning_jobs__WEBPACK_IMPORTED_MODULE_3__.FineTuningJobEventsPage; })(Jobs || (Jobs = {})); //# sourceMappingURL=jobs.mjs.map /***/ }), /***/ "./node_modules/openai/resources/images.mjs": /*!**************************************************!*\ !*** ./node_modules/openai/resources/images.mjs ***! \**************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Images: () => (/* binding */ Images) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/core */ "./node_modules/openai/uploads.mjs"); // File generated from our OpenAPI spec by Stainless. class Images extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Creates a variation of a given image. */ createVariation(body, options) { return this._client.post('/images/variations', (0,openai_core__WEBPACK_IMPORTED_MODULE_1__.multipartFormRequestOptions)({ body, ...options })); } /** * Creates an edited or extended image given an original image and a prompt. */ edit(body, options) { return this._client.post('/images/edits', (0,openai_core__WEBPACK_IMPORTED_MODULE_1__.multipartFormRequestOptions)({ body, ...options })); } /** * Creates an image given a prompt. */ generate(body, options) { return this._client.post('/images/generations', { body, ...options }); } } (function (Images) { })(Images || (Images = {})); //# sourceMappingURL=images.mjs.map /***/ }), /***/ "./node_modules/openai/resources/models.mjs": /*!**************************************************!*\ !*** ./node_modules/openai/resources/models.mjs ***! \**************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Models: () => (/* binding */ Models), /* harmony export */ ModelsPage: () => (/* binding */ ModelsPage) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); /* harmony import */ var openai_resources_models__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! openai/resources/models */ "./node_modules/openai/resources/models.mjs"); /* harmony import */ var openai_pagination__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/pagination */ "./node_modules/openai/pagination.mjs"); // File generated from our OpenAPI spec by Stainless. class Models extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Retrieves a model instance, providing basic information about the model such as * the owner and permissioning. */ retrieve(model, options) { return this._client.get(`/models/${model}`, options); } /** * Lists the currently available models, and provides basic information about each * one such as the owner and availability. */ list(options) { return this._client.getAPIList('/models', ModelsPage, options); } /** * Delete a fine-tuned model. You must have the Owner role in your organization to * delete a model. */ del(model, options) { return this._client.delete(`/models/${model}`, options); } } /** * Note: no pagination actually occurs yet, this is for forwards-compatibility. */ class ModelsPage extends openai_pagination__WEBPACK_IMPORTED_MODULE_1__.Page { } (function (Models) { Models.ModelsPage = openai_resources_models__WEBPACK_IMPORTED_MODULE_2__.ModelsPage; })(Models || (Models = {})); //# sourceMappingURL=models.mjs.map /***/ }), /***/ "./node_modules/openai/resources/moderations.mjs": /*!*******************************************************!*\ !*** ./node_modules/openai/resources/moderations.mjs ***! \*******************************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Moderations: () => (/* binding */ Moderations) /* harmony export */ }); /* harmony import */ var openai_resource__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! openai/resource */ "./node_modules/openai/resource.mjs"); // File generated from our OpenAPI spec by Stainless. class Moderations extends openai_resource__WEBPACK_IMPORTED_MODULE_0__.APIResource { /** * Classifies if text violates OpenAI's Content Policy */ create(body, options) { return this._client.post('/moderations', { body, ...options }); } } (function (Moderations) { })(Moderations || (Moderations = {})); //# sourceMappingURL=moderations.mjs.map /***/ }), /***/ "./node_modules/openai/streaming.mjs": /*!*******************************************!*\ !*** ./node_modules/openai/streaming.mjs ***! \*******************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Stream: () => (/* binding */ Stream) /* harmony export */ }); /* harmony import */ var _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_shims/index.mjs */ "./node_modules/openai/_shims/index.mjs"); /* harmony import */ var _error_mjs__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! openai/error */ "./node_modules/openai/error.mjs"); class Stream { constructor(iterator, controller) { this.iterator = iterator; this.controller = controller; } static fromSSEResponse(response, controller) { let consumed = false; const decoder = new SSEDecoder(); async function* iterMessages() { if (!response.body) { controller.abort(); throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`Attempted to iterate over a response with no body`); } const lineDecoder = new LineDecoder(); const iter = readableStreamAsyncIterable(response.body); for await (const chunk of iter) { for (const line of lineDecoder.decode(chunk)) { const sse = decoder.decode(line); if (sse) yield sse; } } for (const line of lineDecoder.flush()) { const sse = decoder.decode(line); if (sse) yield sse; } } async function* iterator() { if (consumed) { throw new Error('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); } consumed = true; let done = false; try { for await (const sse of iterMessages()) { if (done) continue; if (sse.data.startsWith('[DONE]')) { done = true; continue; } if (sse.event === null) { let data; try { data = JSON.parse(sse.data); } catch (e) { console.error(`Could not parse message into JSON:`, sse.data); console.error(`From chunk:`, sse.raw); throw e; } if (data && data.error) { throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.APIError(undefined, data.error, undefined, undefined); } yield data; } } done = true; } catch (e) { // If the user calls `stream.controller.abort()`, we should exit without throwing. if (e instanceof Error && e.name === 'AbortError') return; throw e; } finally { // If the user `break`s, abort the ongoing request. if (!done) controller.abort(); } } return new Stream(iterator, controller); } /** * Generates a Stream from a newline-separated ReadableStream * where each item is a JSON value. */ static fromReadableStream(readableStream, controller) { let consumed = false; async function* iterLines() { const lineDecoder = new LineDecoder(); const iter = readableStreamAsyncIterable(readableStream); for await (const chunk of iter) { for (const line of lineDecoder.decode(chunk)) { yield line; } } for (const line of lineDecoder.flush()) { yield line; } } async function* iterator() { if (consumed) { throw new Error('Cannot iterate over a consumed stream, use `.tee()` to split the stream.'); } consumed = true; let done = false; try { for await (const line of iterLines()) { if (done) continue; if (line) yield JSON.parse(line); } done = true; } catch (e) { // If the user calls `stream.controller.abort()`, we should exit without throwing. if (e instanceof Error && e.name === 'AbortError') return; throw e; } finally { // If the user `break`s, abort the ongoing request. if (!done) controller.abort(); } } return new Stream(iterator, controller); } [Symbol.asyncIterator]() { return this.iterator(); } /** * Splits the stream into two streams which can be * independently read from at different speeds. */ tee() { const left = []; const right = []; const iterator = this.iterator(); const teeIterator = (queue) => { return { next: () => { if (queue.length === 0) { const result = iterator.next(); left.push(result); right.push(result); } return queue.shift(); }, }; }; return [ new Stream(() => teeIterator(left), this.controller), new Stream(() => teeIterator(right), this.controller), ]; } /** * Converts this stream to a newline-separated ReadableStream of * JSON stringified values in the stream * which can be turned back into a Stream with `Stream.fromReadableStream()`. */ toReadableStream() { const self = this; let iter; const encoder = new TextEncoder(); return new _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.ReadableStream({ async start() { iter = self[Symbol.asyncIterator](); }, async pull(ctrl) { try { const { value, done } = await iter.next(); if (done) return ctrl.close(); const bytes = encoder.encode(JSON.stringify(value) + '\n'); ctrl.enqueue(bytes); } catch (err) { ctrl.error(err); } }, async cancel() { await iter.return?.(); }, }); } } class SSEDecoder { constructor() { this.event = null; this.data = []; this.chunks = []; } decode(line) { if (line.endsWith('\r')) { line = line.substring(0, line.length - 1); } if (!line) { // empty line and we didn't previously encounter any messages if (!this.event && !this.data.length) return null; const sse = { event: this.event, data: this.data.join('\n'), raw: this.chunks, }; this.event = null; this.data = []; this.chunks = []; return sse; } this.chunks.push(line); if (line.startsWith(':')) { return null; } let [fieldname, _, value] = partition(line, ':'); if (value.startsWith(' ')) { value = value.substring(1); } if (fieldname === 'event') { this.event = value; } else if (fieldname === 'data') { this.data.push(value); } return null; } } /** * A re-implementation of httpx's `LineDecoder` in Python that handles incrementally * reading lines from text. * * https://github.com/encode/httpx/blob/920333ea98118e9cf617f246905d7b202510941c/httpx/_decoders.py#L258 */ class LineDecoder { constructor() { this.buffer = []; this.trailingCR = false; } decode(chunk) { let text = this.decodeText(chunk); if (this.trailingCR) { text = '\r' + text; this.trailingCR = false; } if (text.endsWith('\r')) { this.trailingCR = true; text = text.slice(0, -1); } if (!text) { return []; } const trailingNewline = LineDecoder.NEWLINE_CHARS.has(text[text.length - 1] || ''); let lines = text.split(LineDecoder.NEWLINE_REGEXP); if (lines.length === 1 && !trailingNewline) { this.buffer.push(lines[0]); return []; } if (this.buffer.length > 0) { lines = [this.buffer.join('') + lines[0], ...lines.slice(1)]; this.buffer = []; } if (!trailingNewline) { this.buffer = [lines.pop() || '']; } return lines; } decodeText(bytes) { if (bytes == null) return ''; if (typeof bytes === 'string') return bytes; // Node: if (typeof Buffer !== 'undefined') { if (bytes instanceof Buffer) { return bytes.toString(); } if (bytes instanceof Uint8Array) { return Buffer.from(bytes).toString(); } throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`Unexpected: received non-Uint8Array (${bytes.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`); } // Browser if (typeof TextDecoder !== 'undefined') { if (bytes instanceof Uint8Array || bytes instanceof ArrayBuffer) { this.textDecoder ?? (this.textDecoder = new TextDecoder('utf8')); return this.textDecoder.decode(bytes); } throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`Unexpected: received non-Uint8Array/ArrayBuffer (${bytes.constructor.name}) in a web platform. Please report this error.`); } throw new _error_mjs__WEBPACK_IMPORTED_MODULE_1__.OpenAIError(`Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.`); } flush() { if (!this.buffer.length && !this.trailingCR) { return []; } const lines = [this.buffer.join('')]; this.buffer = []; this.trailingCR = false; return lines; } } // prettier-ignore LineDecoder.NEWLINE_CHARS = new Set(['\n', '\r', '\x0b', '\x0c', '\x1c', '\x1d', '\x1e', '\x85', '\u2028', '\u2029']); LineDecoder.NEWLINE_REGEXP = /\r\n|[\n\r\x0b\x0c\x1c\x1d\x1e\x85\u2028\u2029]/g; function partition(str, delimiter) { const index = str.indexOf(delimiter); if (index !== -1) { return [str.substring(0, index), delimiter, str.substring(index + delimiter.length)]; } return [str, '', '']; } /** * Most browsers don't yet have async iterable support for ReadableStream, * and Node has a very different way of reading bytes from its "ReadableStream". * * This polyfill was pulled from https://github.com/MattiasBuelens/web-streams-polyfill/pull/122#issuecomment-1627354490 */ function readableStreamAsyncIterable(stream) { if (stream[Symbol.asyncIterator]) return stream; const reader = stream.getReader(); return { async next() { try { const result = await reader.read(); if (result?.done) reader.releaseLock(); // release lock when stream becomes closed return result; } catch (e) { reader.releaseLock(); // release lock when stream becomes errored throw e; } }, async return() { const cancelPromise = reader.cancel(); reader.releaseLock(); await cancelPromise; return { done: true, value: undefined }; }, [Symbol.asyncIterator]() { return this; }, }; } //# sourceMappingURL=streaming.mjs.map /***/ }), /***/ "./node_modules/openai/uploads.mjs": /*!*****************************************!*\ !*** ./node_modules/openai/uploads.mjs ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ createForm: () => (/* binding */ createForm), /* harmony export */ fileFromPath: () => (/* reexport safe */ _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.fileFromPath), /* harmony export */ isBlobLike: () => (/* binding */ isBlobLike), /* harmony export */ isFileLike: () => (/* binding */ isFileLike), /* harmony export */ isMultipartBody: () => (/* binding */ isMultipartBody), /* harmony export */ isResponseLike: () => (/* binding */ isResponseLike), /* harmony export */ isUploadable: () => (/* binding */ isUploadable), /* harmony export */ maybeMultipartFormRequestOptions: () => (/* binding */ maybeMultipartFormRequestOptions), /* harmony export */ multipartFormRequestOptions: () => (/* binding */ multipartFormRequestOptions), /* harmony export */ toFile: () => (/* binding */ toFile) /* harmony export */ }); /* harmony import */ var _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./_shims/index.mjs */ "./node_modules/openai/_shims/index.mjs"); const isResponseLike = (value) => value != null && typeof value === 'object' && typeof value.url === 'string' && typeof value.blob === 'function'; const isFileLike = (value) => value != null && typeof value === 'object' && typeof value.name === 'string' && typeof value.lastModified === 'number' && isBlobLike(value); /** * The BlobLike type omits arrayBuffer() because @types/node-fetch@^2.6.4 lacks it; but this check * adds the arrayBuffer() method type because it is available and used at runtime */ const isBlobLike = (value) => value != null && typeof value === 'object' && typeof value.size === 'number' && typeof value.type === 'string' && typeof value.text === 'function' && typeof value.slice === 'function' && typeof value.arrayBuffer === 'function'; const isUploadable = (value) => { return isFileLike(value) || isResponseLike(value) || (0,_shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.isFsReadStream)(value); }; /** * Helper for creating a {@link File} to pass to an SDK upload method from a variety of different data formats * @param value the raw content of the file. Can be an {@link Uploadable}, {@link BlobLikePart}, or {@link AsyncIterable} of {@link BlobLikePart}s * @param {string=} name the name of the file. If omitted, toFile will try to determine a file name from bits if possible * @param {Object=} options additional properties * @param {string=} options.type the MIME type of the content * @param {number=} options.lastModified the last modified timestamp * @returns a {@link File} with the given properties */ async function toFile(value, name, options = {}) { // If it's a promise, resolve it. value = await value; if (isResponseLike(value)) { const blob = await value.blob(); name || (name = new URL(value.url).pathname.split(/[\\/]/).pop() ?? 'unknown_file'); return new _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.File([blob], name, options); } const bits = await getBytes(value); name || (name = getName(value) ?? 'unknown_file'); if (!options.type) { const type = bits[0]?.type; if (typeof type === 'string') { options = { ...options, type }; } } return new _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.File(bits, name, options); } async function getBytes(value) { let parts = []; if (typeof value === 'string' || ArrayBuffer.isView(value) || // includes Uint8Array, Buffer, etc. value instanceof ArrayBuffer) { parts.push(value); } else if (isBlobLike(value)) { parts.push(await value.arrayBuffer()); } else if (isAsyncIterableIterator(value) // includes Readable, ReadableStream, etc. ) { for await (const chunk of value) { parts.push(chunk); // TODO, consider validating? } } else { throw new Error(`Unexpected data type: ${typeof value}; constructor: ${value?.constructor?.name}; props: ${propsForError(value)}`); } return parts; } function propsForError(value) { const props = Object.getOwnPropertyNames(value); return `[${props.map((p) => `"${p}"`).join(', ')}]`; } function getName(value) { return (getStringFromMaybeBuffer(value.name) || getStringFromMaybeBuffer(value.filename) || // For fs.ReadStream getStringFromMaybeBuffer(value.path)?.split(/[\\/]/).pop()); } const getStringFromMaybeBuffer = (x) => { if (typeof x === 'string') return x; if (typeof Buffer !== 'undefined' && x instanceof Buffer) return String(x); return undefined; }; const isAsyncIterableIterator = (value) => value != null && typeof value === 'object' && typeof value[Symbol.asyncIterator] === 'function'; const isMultipartBody = (body) => body && typeof body === 'object' && body.body && body[Symbol.toStringTag] === 'MultipartBody'; /** * Returns a multipart/form-data request if any part of the given request body contains a File / Blob value. * Otherwise returns the request as is. */ const maybeMultipartFormRequestOptions = async (opts) => { if (!hasUploadableValue(opts.body)) return opts; const form = await createForm(opts.body); return (0,_shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.getMultipartRequestOptions)(form, opts); }; const multipartFormRequestOptions = async (opts) => { const form = await createForm(opts.body); return (0,_shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.getMultipartRequestOptions)(form, opts); }; const createForm = async (body) => { const form = new _shims_index_mjs__WEBPACK_IMPORTED_MODULE_0__.FormData(); await Promise.all(Object.entries(body || {}).map(([key, value]) => addFormValue(form, key, value))); return form; }; const hasUploadableValue = (value) => { if (isUploadable(value)) return true; if (Array.isArray(value)) return value.some(hasUploadableValue); if (value && typeof value === 'object') { for (const k in value) { if (hasUploadableValue(value[k])) return true; } } return false; }; const addFormValue = async (form, key, value) => { if (value === undefined) return; if (value == null) { throw new TypeError(`Received null for "${key}"; to pass null in FormData, you must use the string 'null'`); } // TODO: make nested formats configurable if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { form.append(key, String(value)); } else if (isUploadable(value)) { const file = await toFile(value); form.append(key, file); } else if (Array.isArray(value)) { await Promise.all(value.map((entry) => addFormValue(form, key + '[]', entry))); } else if (typeof value === 'object') { await Promise.all(Object.entries(value).map(([name, prop]) => addFormValue(form, `${key}[${name}]`, prop))); } else { throw new TypeError(`Invalid value given to form, expected a string, number, boolean, object, Array, File or Blob but got ${value} instead`); } }; //# sourceMappingURL=uploads.mjs.map /***/ }), /***/ "./node_modules/openai/version.mjs": /*!*****************************************!*\ !*** ./node_modules/openai/version.mjs ***! \*****************************************/ /***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ VERSION: () => (/* binding */ VERSION) /* harmony export */ }); const VERSION = '4.20.1'; // x-release-please-version //# sourceMappingURL=version.mjs.map /***/ }), /***/ "./src/blocks/accordion-nested-item/block.json": /*!*****************************************************!*\ !*** ./src/blocks/accordion-nested-item/block.json ***! \*****************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/accordion-nested-item","title":"Accordion Item","textdomain":"post-grid","category":"post-grid-tools","usesContext":["post-grid/accordionNestedIcon","post-grid/accordionNestedIconToggle","post-grid/accordionNestedLabelIcon","post-grid/accordionNestedLabelCounter"],"supports":{"align":["wide","full"]},"parent":["post-grid/accordion-nested"],"attributes":{"content":{"type":"object","default":{"options":{"tag":"div","class":"accordion-content"},"styles":{"backgroundColor":{"Desktop":""}}}},"header":{"type":"object","default":{"options":{"tag":"div","class":"accordion-header"},"styles":{"backgroundColor":{"Desktop":""},"display":{"Desktop":"flex"}}}},"headerLabel":{"type":"object","default":{"options":{"text":"Accordion Header Text","tag":"div","class":"accordion-header-label"},"styles":{"backgroundColor":{"Desktop":""}}}},"labelCounter":{"type":"object","default":{"options":{"position":"","tag":"div","class":"accordion-header-counter"},"styles":{}}},"labelIcon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","enable":false,"class":""},"styles":{}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"accordion-icon"},"styles":{}}},"iconToggle":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","class":"accordion-icon-toggle"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["accordion","accordion faq","accordions","faq","toggle","collapsible","accordion nested","accordion block","accordion plugin","question answer"],"description":"This block is the inner block of accordion nested block"}'); /***/ }), /***/ "./src/blocks/accordion-nested/block.json": /*!************************************************!*\ !*** ./src/blocks/accordion-nested/block.json ***! \************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/accordion-nested","title":"Accordion","textdomain":"post-grid","category":"post-grid-tools","usesContext":[],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"content":"","tag":"div","class":"pg-accordion-nested"},"styles":{"display":{"Desktop":"block"}}}},"searchWrap":{"type":"object","default":{"options":{"enable":false,"contentSrc":["content","label"],"tag":"div","class":"accordion-search-wrap"},"styles":{}}},"searchInput":{"type":"object","default":{"options":{"tag":"input","type":"text","value":"","placeholder":"Search here...","class":"accordion-search-input"},"styles":{}}},"content":{"type":"object","default":{"options":{"tag":"div","class":"accordion-content"},"styles":{}}},"header":{"type":"object","default":{"options":{"tag":"div","class":"accordion-header"},"styles":{"color":{"Desktop":"#000000"},"backgroundColor":{"Desktop":"#F1F7F9"},"padding":{"Desktop":"10px 10px 10px 10px"},"margin":{"Desktop":"0px 0px 10px 0px"},"borderRadius":{"Desktop":"5px 5px 5px 5px"}}}},"headerActive":{"type":"object","default":{"options":{"tag":"div","class":"accordion-header"},"styles":{"color":{"Desktop":"#ffffff"},"backgroundColor":{"Desktop":"#1f2e45"},"margin":{"Desktop":"0px 0px 0px 0px"},"borderRadius":{"Desktop":"5px 5px 0px 0px"}}}},"headerLabel":{"type":"object","default":{"options":{"text":"Accordion Header","tag":"div","class":"accordion-header-label"},"styles":{"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"500"}}}},"labelCounter":{"type":"object","default":{"options":{"enable":false,"position":"","tag":"div","class":"label-counter","overrideChild":true},"styles":{"padding":{"Desktop":"0px 10px 0px 0px"}}}},"labelIcon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"accordion-label-icon","overrideChild":true},"styles":{"fontSize":{"Desktop":"16px"},"padding":{"Desktop":"0px 10px 0px 10px"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-angle-down","position":"left","class":"accordion-icon","overrideChild":true},"styles":{"fontSize":{"Desktop":"16px"},"padding":{"Desktop":"0px 10px 0px 10px"}}}},"iconToggle":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":" fas fa-angle-up","class":"accordion-icon-toggle"},"styles":{}}},"accOptions":{"type":"object","default":{"active":"9999","collapsible":true,"heightStyle":"content"}},"schema":{"type":"object","default":{"options":{"enable":true}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"providesContext":{"post-grid/accordionNestedIcon":"icon","post-grid/accordionNestedIconToggle":"iconToggle","post-grid/accordionNestedLabelIcon":"labelIcon","post-grid/accordionNestedLabelCounter":"labelCounter"},"script":"front_script","keywords":["accordion","accordion faq","accordions","faq","toggle","collapsible","accordion nested","accordion block","accordion plugin","question answer"],"description":"Create collapsible container that organizes information by allowing users to expand or collapse sections."}'); /***/ }), /***/ "./src/blocks/archive-description/block.json": /*!***************************************************!*\ !*** ./src/blocks/archive-description/block.json ***! \***************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/archive-description","title":"Archive description","textdomain":"post-grid","category":"post-grid-archive","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-archive-description"},"styles":{"display":{"Desktop":"block"}}}},"archiveTitle":{"type":"object","default":{"options":{"tag":"div","archiveType":"auto","customLabel":"Archive: %s","dateFormat":"","linkTo":"","linkToUrl":"","linkToMetaKey":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":"archiveTitle"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"far fa-calendar-alt","position":"beforeArchiveTitle","class":"postdate-icon"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["Taxonomy description","Terms description","Category description","Tags description","Archive description","Archive block"],"description":"Display archive description for category, tags, taxonomy terms or archive pages."}'); /***/ }), /***/ "./src/blocks/archive-title/block.json": /*!*********************************************!*\ !*** ./src/blocks/archive-title/block.json ***! \*********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/archive-title","title":"Archive title","textdomain":"post-grid","category":"post-grid-archive","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-archive-title"},"styles":{"display":{"Desktop":"block"}}}},"archiveTitle":{"type":"object","default":{"options":{"tag":"div","archiveType":"auto","customLabel":"Archive: %s","dateFormat":"","linkTo":"","linkToUrl":"","linkToMetaKey":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":"archiveTitle"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"30px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"700"},"lineHeight":{"Desktop":"155%"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"far fa-calendar-alt","position":"beforeArchiveTitle","class":"postdate-icon"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["Taxonomy title","Terms title","Category title","Tags title","archive title","archive block"],"description":"Display archive title for category, tags, taxonomy terms or archive pages."}'); /***/ }), /***/ "./src/blocks/breadcrumb/block.json": /*!******************************************!*\ !*** ./src/blocks/breadcrumb/block.json ***! \******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/breadcrumb","title":"Breadcrumb","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-breadcrumb"},"styles":{"display":{"Desktop":"flex"},"margin":{"Desktop":"0px 0px 0px 0px"},"padding":{"Desktop":"0px 0px 0px 20px"}}}},"icon":{"type":"object","default":{"options":{"class":"icon","position":"beforeLabel"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"label":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"separator":{"type":"object","default":{"options":{"class":"","text":"»"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"link":{"type":"object","default":{"options":{},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"elements":{"type":"object","default":{"options":{"linkTarget":"_blank","showLabel":true,"showSeparator":true,"showIcon":false,"iconPosition":"beforeLabel"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"display":{"Desktop":"inline-block"}},"items":[{"id":"text","label":"Text","customText":"","url":"","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{"text":"You are here: ","showSeparator":true},"styles":{}},{"id":"homePage","label":"Home Page Link","customText":"","url":"","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{"showSeparator":true},"styles":{}},{"id":"postTitle","label":"Post Title","customText":"","url":"","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{"showSeparator":true},"styles":{}}]}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"schema":{"type":"object","default":{"options":{"enable":true}}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["breadcrumb","breadcrumb navs","breadcrumbs","breadcrumb block"],"description":"Display custom breadcrumb for your website."}'); /***/ }), /***/ "./src/blocks/content-slider-item/block.json": /*!***************************************************!*\ !*** ./src/blocks/content-slider-item/block.json ***! \***************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/content-slider-item","title":"Content Slider Item","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"parent":["post-grid/content-slider"],"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":" pg-content-slider-item"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{"height":{"Desktop":"300px"}}}}},"editorStyle":"pgcontent-slider-splide-core","script":"front_script","keywords":["Content slider","Image slider","Video slider","Slider block","Carousel block","Carousel slider","Custom content slider"],"description":"This block is the inner block of content slider block"}'); /***/ }), /***/ "./src/blocks/content-slider/block.json": /*!**********************************************!*\ !*** ./src/blocks/content-slider/block.json ***! \**********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/content-slider","title":"Content Slider","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-content-slider"},"styles":{"backgroundColor":{"Desktop":"#f1f7f9"}}}},"navsWrap":{"type":"object","default":{"options":{"class":"nav-wrap"},"styles":{"display":{"Desktop":"flex"},"width":{"Desktop":"100%"},"justifyContent":{"Desktop":"space-between"},"alignItems":{"Desktop":"center"},"position":{"Desktop":"absolute !important"},"top":{"Desktop":"50%"},"transform":{"Desktop":"translateY(-50%)"}}}},"perv":{"type":"object","default":{"options":{"text":"Prev","class":""},"styles":{"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"textAlign":{"Desktop":"left"},"color":{"Desktop":"#ffffff"},"backgroundColor":{"Desktop":"#1F2E45"},"borderRadius":{"Desktop":"50px"},"padding":{"Desktop":"5px 20px 5px 20px"}}}},"pervIcon":{"type":"object","default":{"options":{"position":"before","class":"","library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-left"},"styles":{"padding":{"Desktop":"0px 10px 0px 0px"},"fontSize":{"Desktop":"16px"}}}},"next":{"type":"object","default":{"options":{"text":"Next","class":""},"styles":{"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"textAlign":{"Desktop":"right"},"color":{"Desktop":"#ffffff"},"backgroundColor":{"Desktop":"#1F2E45"},"borderRadius":{"Desktop":"50px"},"padding":{"Desktop":"5px 20px 5px 20px"}}}},"nextIcon":{"type":"object","default":{"options":{"position":"after","class":"","library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right"},"styles":{"padding":{"Desktop":"0px 0px 0px 10px"},"fontSize":{"Desktop":"16px"}}}},"paginationWrap":{"type":"object","default":{"options":{"tag":"ul","class":""},"styles":{"display":{"Desktop":"flex"},"justifyContent":{"Desktop":"center"},"gap":{"Desktop":"1em"}}}},"pagination":{"type":"object","default":{"options":{"tag":"span","class":""},"styles":{"padding":{"Desktop":"15px 0px 15px 0px"},"border":{"Desktop":"2px solid #1f2e45"},"height":{"Desktop":"10px"},"width":{"Desktop":"10px"},"borderRadius":{"Desktop":"50%"}}}},"paginationActive":{"type":"object","default":{"options":{"class":""},"styles":{"backgroundColor":{"Desktop":"#1f2e45"}}}},"sliderOptions":{"type":"object","default":{}},"sliderOptionsRes":{"type":"object","default":{}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"editorStyle":"pgcontent-slider-splide-core","script":"front_script","keywords":["Content slider","Image slider","Video slider","Slider block","Carousel block","Carousel slider","Custom content slider"],"description":"Content slider is a powerful block to display content in a slider."}'); /***/ }), /***/ "./src/blocks/date-countdown/block.json": /*!**********************************************!*\ !*** ./src/blocks/date-countdown/block.json ***! \**********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/date-countdown","title":"Date Countdown","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-date-countdown"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"dateCountdown":{"type":"object","default":{"options":{"tag":"div","class":"","type":"","startDate":"","endDate":"","startDateSrc":"","endDateSrc":"","everGreenTime":{"day":"","hour":"","minute":"","second":""}}}},"scheduleTime":{"type":"array","default":[{"startTime":"","endTime":"","weekdays":{"value":"0","values":[],"compare":"="}}]},"countdownWrapper":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{"color":{},"backgroundColor":{"Desktop":"#9DD6DF"},"display":{"Desktop":"flex"},"alignItems":{"Desktop":"center"},"justifyContent":{"Desktop":"center"},"width":{"Desktop":"max-content"},"borderRadius":{"Desktop":"20px 20px 20px 20px"},"padding":{"Desktop":"30px 30px 30px 30px"},"gap":{"Desktop":"20px"},"marginRight":{"Desktop":"auto"},"marginLeft":{"Desktop":"auto"}}}},"inner":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":""},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"items":{"type":"object","default":{"options":{"tag":"div","class":"items","secondEnable":true,"minuteEnable":true,"hourEnable":true,"dayEnable":true},"styles":{"color":{"Desktop":""},"fontSize":{"Desktop":""}}}},"count":{"type":"object","default":{"options":{"enable":true,"text":"","class":"count","position":""},"styles":{"color":{"Desktop":""},"fontSize":{"Desktop":""}}}},"secondWrap":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"second-wrapper","label":"","prefix":""},"styles":{}}},"second":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"second-countdown","label":"","prefix":""},"styles":{"color":{"Desktop":"#d9eaf2"},"backgroundColor":{"Desktop":"#18978F"},"padding":{"Desktop":"20px 20px 20px 20px"},"margin":[],"backgroundImage":[],"textDecoration":{"Desktop":"none #000000 wavy 1px"},"borderBottom":[],"transition":{"Desktop":"all 0.4s ease 0s"},"fontSize":{"Desktop":"5rem"},"fontWeight":{"Desktop":"700"},"textShadow":{"Desktop":"5px 5px 0px #4d4d4d"},"display":{"Desktop":"flex"},"flexDirection":{"Desktop":"column"},"alignItems":{"Desktop":"center"},"borderRadius":{"Desktop":"10px 10px 10px 10px"}}}},"minuteWrap":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"minute-wrapper","label":"","prefix":""},"styles":{}}},"minute":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"minute-countdown","label":"","prefix":""},"styles":{"color":{"Desktop":"#d9eaf2"},"backgroundColor":{"Desktop":"#18978F"},"padding":{"Desktop":"20px 20px 20px 20px"},"margin":[],"backgroundImage":[],"textDecoration":{"Desktop":"none #000000 wavy 1px"},"borderBottom":[],"transition":{"Desktop":"all 0.4s ease 0s"},"fontSize":{"Desktop":"5rem"},"fontWeight":{"Desktop":"700"},"textShadow":{"Desktop":"5px 5px 0px #4d4d4d"},"display":{"Desktop":"flex"},"flexDirection":{"Desktop":"column"},"alignItems":{"Desktop":"center"},"borderRadius":{"Desktop":"10px 10px 10px 10px"}}}},"hourWrap":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"hour-wrapper","label":"","prefix":""},"styles":{}}},"hour":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"hour-countdown","label":"","prefix":""},"styles":{"color":{"Desktop":"#d9eaf2"},"backgroundColor":{"Desktop":"#18978F"},"padding":{"Desktop":"20px 20px 20px 20px"},"margin":[],"backgroundImage":[],"textDecoration":{"Desktop":"none #000000 wavy 1px"},"borderBottom":[],"transition":{"Desktop":"all 0.4s ease 0s"},"fontSize":{"Desktop":"5rem"},"fontWeight":{"Desktop":"700"},"textShadow":{"Desktop":"5px 5px 0px #4d4d4d"},"display":{"Desktop":"flex"},"flexDirection":{"Desktop":"column"},"alignItems":{"Desktop":"center"},"borderRadius":{"Desktop":"10px 10px 10px 10px"}}}},"dayWrap":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"day-wrapper","label":"","prefix":""},"styles":{}}},"day":{"type":"object","default":{"options":{"enable":true,"tag":"div","class":"day-countdown","label":"","prefix":""},"styles":{"color":{"Desktop":"#d9eaf2"},"backgroundColor":{"Desktop":"#18978F"},"padding":{"Desktop":"20px 20px 20px 20px"},"margin":[],"backgroundImage":[],"textDecoration":{"Desktop":"none #000000 wavy 1px"},"borderBottom":[],"transition":{"Desktop":"all 0.4s ease 0s"},"fontSize":{"Desktop":"5rem"},"fontWeight":{"Desktop":"700"},"textShadow":{"Desktop":"5px 5px 0px #4d4d4d"},"display":{"Desktop":"flex"},"flexDirection":{"Desktop":"column"},"alignItems":{"Desktop":"center"},"borderRadius":{"Desktop":"10px 10px 10px 10px"}}}},"icon":{"type":"object","default":{"options":{"enable":false,"library":"fontAwesome","srcType":"class","iconSrc":"far fa-calendar-alt","position":"","class":"date-countdown-icon"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"separator":{"type":"object","default":{"options":{"enable":true,"text":":","class":"separator","position":""},"styles":{"color":{"Desktop":"#d9eaf2"},"textDecoration":{"Desktop":"none #000000 wavy 1px"},"transition":{"Desktop":"all 0.4s ease 0s"},"fontSize":{"Desktop":"5rem"},"fontWeight":{"Desktop":"700"},"textShadow":{"Desktop":"5px 5px 0px #4d4d4d"}}}},"label":{"type":"object","default":{"options":{"enable":true,"text":"","class":"label","position":""},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"prefix":{"type":"object","default":{"options":{"enable":false,"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"enable":false,"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"editMode":{"type":"boolean","default":true},"expiredArg":{"type":"object","default":{}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["countdown","countdown block","date countdown","timer countdown","timer block","Countdown Timer"],"description":"Highlight upcoming events with date countdown block."}'); /***/ }), /***/ "./src/blocks/flex-wrap-item/block.json": /*!**********************************************!*\ !*** ./src/blocks/flex-wrap-item/block.json ***! \**********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/flex-wrap-item","title":"Flex Maker Item","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/flex-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-flex-wrap-item","id":"","linkTo":"postUrl","linkToAuthorMeta":"","linkToCustomMeta":"","linkTarget":"_blank","customUrl":""},"styles":{"backgroundColor":{"Desktop":""},"flexBasis":{"Desktop":"0"},"flexGrow":{"Desktop":"1"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["flex wrapper","flex layout","flex wordpress","flex block for wordpress"],"description":"This block is the inner block of flex wrap block"}'); /***/ }), /***/ "./src/blocks/flex-wrap/block.json": /*!*****************************************!*\ !*** ./src/blocks/flex-wrap/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/flex-wrap","title":"Flex Maker","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-flex-wrap"},"styles":{"display":{"Desktop":"flex"},"gap":{"Desktop":"1em"}}}},"item":{"type":"object","default":{"options":{"tag":"div","class":"pg-flex-wrap-item"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["flex wrapper","flex layout","flex wordpress","flex block for wordpress"],"description":"The flex wrapper provides dynamic control over content organization within a responsive layout."}'); /***/ }), /***/ "./src/blocks/form-field-checkbox/block.json": /*!***************************************************!*\ !*** ./src/blocks/form-field-checkbox/block.json ***! \***************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-checkbox","title":"Form Field - Checkbox","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-input"},"styles":{}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"Your Name","class":"pg-form-field-label"},"styles":{}}},"item":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{}}},"itemLabel":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{}}},"input":{"type":"object","default":{"options":{"value":null,"name":"","required":false,"disabled":false,"multiple":false,"autofocus":null,"readonly":false,"args":{"0":{"label":"Option 1","value":"option1","readonly":false},"1":{"label":"Option 2","value":"option2","readonly":false},"2":{"label":"Option 3","value":"option3","readonly":false}},"argsSrc":{"src":"","taxonomy":"","postType":[],"userRole":[]},"id":"","class":"pg-form-field-checkbox","position":"afterLabel"},"styles":{}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""},"styles":{}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""},"styles":{}}},"requiredWrap":{"type":"object","default":{"options":{"tag":"span","enable":true,"class":""},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"The checkbox block is a specific element in a web form that allows users to select or deselect options via checkboxes. It is commonly used for multiple-choice questions or options."}'); /***/ }), /***/ "./src/blocks/form-field-file-multi/block.json": /*!*****************************************************!*\ !*** ./src/blocks/form-field-file-multi/block.json ***! \*****************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-file-multi","title":"Form Field - Multi File","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-file-multi"},"styles":{}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"Your Name","class":"pg-form-field-label"},"styles":{}}},"item":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{}}},"itemLabel":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{}}},"addItem":{"type":"object","default":{"options":{"tag":"div","position":"afterFiles","class":"","text":""},"styles":{}}},"file":{"type":"object","default":{"options":{"value":null,"name":"","required":false,"disabled":false,"multiple":false,"autofocus":null,"readonly":false,"maxCount":3,"maxSize":null,"fileTypes":["jpg","jpeg","png","gif","pdf"],"id":"","class":"pg-form-field-file-multi","position":"afterLabel"},"styles":{}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""},"styles":{}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""},"styles":{}}},"requiredWrap":{"type":"object","default":{"options":{"tag":"span","enable":true,"class":""},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"A form multiple file - upload block is a feature for online forms that allows users to upload multiple files, such as images or documents, to a website."}'); /***/ }), /***/ "./src/blocks/form-field-file/block.json": /*!***********************************************!*\ !*** ./src/blocks/form-field-file/block.json ***! \***********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-file","title":"Form Field - File","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-file"},"styles":{}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"Your Name","class":"pg-form-field-label"},"styles":{}}},"input":{"type":"object","default":{"options":{"type":"text","placeholder":"Write your name","value":"","name":"","required":false,"disabled":false,"minLength":null,"maxLength":null,"readonly":false,"multiple":false,"maxCount":3,"maxSize":null,"fileTypes":[".jpg",".jpeg",".png",".gif",".pdf"],"id":"","class":"pg-form-field-file","position":"afterLabel"},"styles":{}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""},"styles":{}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""},"styles":{}}},"requiredWrap":{"type":"object","default":{"options":{"tag":"span","enable":true,"class":""},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"A form file - upload block is a feature for online forms that allows users to upload files, such as images or documents, to a website."}'); /***/ }), /***/ "./src/blocks/form-field-input/block.json": /*!************************************************!*\ !*** ./src/blocks/form-field-input/block.json ***! \************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-input","title":"Form Field - Input","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap","post-grid/flex-wrap","post-grid/flex-wrap-item","post-grid/grid-wrap","post-grid/grid-wrap-item","core/columns","post-grid/tabs-nested-item","post-grid/accordion-nested-item"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-text"}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"Your Name","class":"pg-form-field-label"}}},"input":{"type":"object","default":{"options":{"type":"text","placeholder":"Write your name","value":"","valueSource":"","name":"","required":false,"disabled":false,"size":false,"minLength":null,"maxLength":null,"readonly":false,"step":null,"pattern":null,"patternCustom":"","includeMailBody":true,"max":null,"min":null,"checked":false,"autocomplete":false,"id":"","class":"pg-form-field-input","position":"afterLabel"}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""}}},"requiredWrap":{"type":"object","default":{"options":{"tag":"span","enable":true,"class":""}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"The form-input field is a blank space used in online forms for users to submit text or data, such as names and email addresses."}'); /***/ }), /***/ "./src/blocks/form-field-select/block.json": /*!*************************************************!*\ !*** ./src/blocks/form-field-select/block.json ***! \*************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-select","title":"Form Field - Select","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-select"},"styles":{}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"Your Name","class":"pg-form-field-label"},"styles":{}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"select":{"type":"object","default":{"options":{"value":null,"placeholder":"-Select-","name":"","required":false,"disabled":false,"multiple":false,"autofocus":null,"readonly":false,"args":{"0":{"label":"Option 1","value":"option1"},"1":{"label":"Option 2","value":"option2"},"2":{"label":"Option 3","value":"option3"}},"id":"","class":"pg-form-field-select","position":"afterLabel"},"styles":{}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""},"styles":{}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""},"styles":{}}},"requiredWrap":{"type":"object","default":{"options":{"tag":"span","enable":true,"class":""},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"The select field block is a feature in online forms that allows users to choose one option from a dropdown list."}'); /***/ }), /***/ "./src/blocks/form-field-submit/block.json": /*!*************************************************!*\ !*** ./src/blocks/form-field-submit/block.json ***! \*************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-submit","title":"Form Field - Submit","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap","post-grid/flex-wrap","post-grid/flex-wrap-item","post-grid/grid-wrap","post-grid/grid-wrap-item","core/columns","post-grid/tabs-nested-item","post-grid/accordion-nested-item"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-submit"}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"","class":"pg-form-field-label"}}},"input":{"type":"object","default":{"options":{"type":"submit","placeholder":"","value":"Submit","name":"","required":false,"disabled":false,"size":false,"minLength":null,"maxLength":null,"readonly":false,"step":null,"pattern":null,"max":null,"min":null,"checked":false,"autocomplete":false,"id":"","class":"pg-form-field-submit","position":"afterLabel"}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""}}},"requiredWrap":{"type":"object","default":{"options":{"tag":"span","enable":true,"class":""}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"The submit field block is a button in an online form that users click to submit their entered information."}'); /***/ }), /***/ "./src/blocks/form-field-textarea/block.json": /*!***************************************************!*\ !*** ./src/blocks/form-field-textarea/block.json ***! \***************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-field-textarea","title":"Form Field - Textarea","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/form-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-field-text-area"},"styles":{}}},"label":{"type":"object","default":{"options":{"tag":"label","for":"label","enable":true,"text":"Your Name","class":"pg-form-field-label"},"styles":{}}},"input":{"type":"object","default":{"options":{"type":"text","placeholder":"Write your name","value":"","name":"","required":false,"disabled":false,"minLength":null,"maxLength":null,"readonly":false,"cols":null,"rows":3,"autocomplete":false,"autofocus":false,"wrap":false,"spellcheck":false,"autocorrect":false,"id":"","class":"","position":"afterLabel"},"styles":{}}},"inputWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""}}},"labelWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"class":""},"styles":{}}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":""},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"The textarea field block provides a space in online forms for users to input more significant amounts of text or comments."}'); /***/ }), /***/ "./src/blocks/form-wrap/block.json": /*!*****************************************!*\ !*** ./src/blocks/form-wrap/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/form-wrap","title":"Form Maker","textdomain":"post-grid","category":"post-grid-tools","usesContext":["post-grid/popupId"],"supports":{"align":["wide","full"]},"providesContext":{"post-grid/formId":"blockId"},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-form-wrap"},"styles":{}}},"form":{"type":"object","default":{"options":{"class":"","type":"contactForm"},"styles":{}}},"visible":{"type":"object","default":{}},"onSubmit":{"type":"object","default":{}},"onProcess":{"type":"object","default":{}},"afterSubmit":{"type":"object","default":{}},"errorWrap":{"type":"object","default":{"options":{"tag":"div","enable":true,"text":"","position":"afterInput","class":"error-wrap"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["form block for wordpress","form block","form builder","form maker","dynamic form","Contact Form Plugin","opt-in form","login form","register form","custom form","wordpress form","wordpress form plugin","Subscription form","contact form block"],"description":"The form block is an advanced tool for creating interactive online forms, enabling users to input and submit data, such as contact information or survey responses, on a website."}'); /***/ }), /***/ "./src/blocks/grid-wrap-item/block.json": /*!**********************************************!*\ !*** ./src/blocks/grid-wrap-item/block.json ***! \**********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/grid-wrap-item","title":"Grid Maker Item","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/grid-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-grid-wrap-item"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["grid builder","grid css","grid content","Custom grid ","grid wrapper for wordpress","Custom grid block"],"description":"This block is the inner block of grid wrap block"}'); /***/ }), /***/ "./src/blocks/grid-wrap/block.json": /*!*****************************************!*\ !*** ./src/blocks/grid-wrap/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/grid-wrap","title":"Grid Maker","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-grid-wrap"},"styles":{"display":{"Desktop":"grid"},"gap":{"Desktop":"1em"},"gridTemplateColumns":{"Desktop":"1fr"}}}},"item":{"type":"object","default":{"options":{"tag":"div","class":"pg-grid-wrap-item"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["grid builder","grid css","grid content","Custom grid ","grid wrapper for wordpress","Custom grid block"],"description":"A grid wrap block is a layout tool used to arrange content in a grid pattern, enhancing design and structure."}'); /***/ }), /***/ "./src/blocks/icon/block.json": /*!************************************!*\ !*** ./src/blocks/icon/block.json ***! \************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/icon","title":"Icon/Button/Link","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-icon","attr":[]},"styles":{}}},"text":{"type":"object","default":{"options":{"enable":true,"text":"Custom Text","src":"","linkTo":"","linkToAuthorMeta":"","linkToCustomMeta":"","linkTarget":"_blank","customUrl":"","linkAttr":[],"class":""},"styles":{}}},"icon":{"type":"object","default":{"options":{"enable":true,"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-check-circle","position":"beforeText","class":"text-icon"},"styles":{}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockId":{"type":"string","default":""},"linkAttr":{"type":"array","default":[]},"blockCssY":{"type":"object","default":{"items":{}}}},"editorStyle":"font-awesome-5","style":"front_style","script":"front_script","keywords":["icon","icons","button","buttons","link","icon block","button block","icon button link","link block","icon block for wordpress","button block for wordpress","icon button link block for wordpress","multi-functional button","call-to-action button","button"],"description":"The icon/button/link block is a clickable element that typically contains an icon or text, serving as a visual cue for actions like navigation, downloads, or interactions on a website."}'); /***/ }), /***/ "./src/blocks/image-gallery-item/block.json": /*!**************************************************!*\ !*** ./src/blocks/image-gallery-item/block.json ***! \**************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/image-gallery-item","title":"Image Gallery Item","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/image-gallery"],"usesContext":["post-grid/galleryId","post-grid/lightbox"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-image-gallery-item"},"styles":{"backgroundColor":{"Desktop":"#F1F7F9"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["image gallery","image gallery block","video gallery block","gallery block","image lightbox block","lightbox block","image gallery for wordpress","image gallery block for wordpress"],"description":"This block is the inner block of image gallery block"}'); /***/ }), /***/ "./src/blocks/image-gallery/block.json": /*!*********************************************!*\ !*** ./src/blocks/image-gallery/block.json ***! \*********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/image-gallery","title":"Image Gallery","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"providesContext":{"post-grid/galleryId":"blockId","post-grid/lightbox":"lightbox"},"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-image-gallery"},"styles":{"display":{"Desktop":"grid"},"gap":{"Desktop":"1em"},"gridTemplateColumns":{"Desktop":"1fr"}}}},"lightbox":{"type":"object","default":{"options":{"enable":false}}},"item":{"type":"object","default":{"options":{"tag":"div","class":"pg-masonry-wrap-item"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["image gallery","image gallery block","video gallery block","gallery block","image lightbox block","lightbox block","image gallery for wordpress","image gallery block for wordpress"],"description":"The image gallery block is a collection of images or photos displayed together, often in a grid format, for easy browsing and viewing."}'); /***/ }), /***/ "./src/blocks/image/block.json": /*!*************************************!*\ !*** ./src/blocks/image/block.json ***! \*************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/image","title":"Image","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId","post-grid/galleryId","post-grid/lightbox"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-image","useAsBackground":"no"},"styles":{"width":{"Desktop":"100%"},"overflow":{"Desktop":"hidden"}}}},"image":{"type":"object","default":{"options":{"imgSrcType":"media","imgSrcMetaKey":"","imgSrcMetaKeyType":"ID","imgSrcImgId":"","srcUrl":"","lazy":true,"lazySrc":"","lazySrcId":"","lazySrcType":"media","srcId":"","linkTo":"","linkToMetaKey":"","linkTocustomUrl":"","altTextSrc":"imgAltText","altTextCustom":"","altTextMetaKey":"","titleTextSrc":"imgTitle","titleTextCustom":"","titleTextMetaKey":"","linkTarget":"_blank","linkAttr":[],"class":"","size":{"Desktop":"full","Tablet":"full","Mobile":"full"}},"styles":{"display":{"Desktop":"block"},"maxWidth":{"Desktop":"100%"},"height":{"Desktop":"auto"}}}},"lightbox":{"type":"object","default":{"options":{"enable":false}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["image","custom image block","image block","image for wordpress","image block for wordpress"],"description":"The image block is a container for displaying image within a webpage, enhancing visual content."}'); /***/ }), /***/ "./src/blocks/layer/block.json": /*!*************************************!*\ !*** ./src/blocks/layer/block.json ***! \*************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/layer","title":"Layer","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/layers"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"content":"","tag":"div","class":"pg-layers"},"styles":{"display":{"Desktop":"block"},"backgroundColor":{"Desktop":"#F1F7F9"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["layer","html element","div element","div","html tag","layer block","layer for wordpress","layer block for wordpress"],"description":"The layer block is an HTML element that can be styled and positioned on a webpage to structure and organize content."}'); /***/ }), /***/ "./src/blocks/layers/block.json": /*!**************************************!*\ !*** ./src/blocks/layers/block.json ***! \**************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/layers","title":"Layers","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-layers","id":"","linkTo":"postUrl","linkToAuthorMeta":"","linkToCustomMeta":"","linkTarget":"_blank","customUrl":""},"styles":{"display":{"Desktop":"block"},"backgroundColor":{"Desktop":"#F1F7F9"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["layer","html element","div element","div","html tag","layer block","layer for wordpress","layer block for wordpress"],"description":"The layer block is an HTML element that can be styled and positioned on a webpage to structure and organize content."}'); /***/ }), /***/ "./src/blocks/list-nested-item/block.json": /*!************************************************!*\ !*** ./src/blocks/list-nested-item/block.json ***! \************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/list-nested-item","title":"List item","textdomain":"post-grid","category":"post-grid-tools","usesContext":["post-grid/listNestedId","post-grid/icon"],"supports":{"align":["wide","full"]},"parent":["post-grid/list-nested"],"attributes":{"wrapper":{"type":"object","default":{"options":{"content":"","tag":"li","class":"pg-list-nested-item"},"styles":{"color":{"Desktop":""},"position":{},"zIndex":{},"top":{},"right":{},"bottom":{},"left":{}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right","class":"icon","position":"before"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["advanced nested list item","nested list item block","list","list maker","list block","list for wordpress","list block for wordpress"],"description":"This block is the inner block of nested list block"}'); /***/ }), /***/ "./src/blocks/list-nested/block.json": /*!*******************************************!*\ !*** ./src/blocks/list-nested/block.json ***! \*******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/list-nested","title":"List Nested","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"providesContext":{"post-grid/listNestedId":"blockId","post-grid/icon":"icon"},"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"ul","class":"pg-list-nested"},"styles":{"display":{"Desktop":"block"}}}},"items":{"type":"array","default":[{"text":"","icon":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right"},"styles":{}}]},"itemsX":{"type":"object","default":{"items":[]}},"item":{"type":"object","default":{"options":{"text":"","tag":"li","counter":false,"reversed":false,"start":1,"type":"1","class":"item"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right","class":"icon","position":"before"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["advanced nested list","nested list block","list","list maker","list block","list for wordpress","list block for wordpress"],"description":"The nested list block is a list within another list, allowing for hierarchical organization and categorization of content."}'); /***/ }), /***/ "./src/blocks/list/block.json": /*!************************************!*\ !*** ./src/blocks/list/block.json ***! \************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/list","title":"List","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"ul","class":"pg-list"},"styles":{"display":{"Desktop":"block"}}}},"items":{"type":"array","default":[{"text":"","icon":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right"},"styles":{}}]},"itemsX":{"type":"object","default":{"items":[]}},"item":{"type":"object","default":{"options":{"text":"","tag":"li","counter":false,"reversed":false,"start":1,"type":"1","class":"item"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"listStyle":{"Desktop":"circle"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right","class":"icon","position":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["list","list maker","list block","list for wordpress","list block for wordpress"],"description":"The list block is a formatting element for creating ordered or unordered lists, making content easy to follow and categorize."}'); /***/ }), /***/ "./src/blocks/masonry-wrap-item/block.json": /*!*************************************************!*\ !*** ./src/blocks/masonry-wrap-item/block.json ***! \*************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/masonry-wrap-item","title":"Masonry Grid Item","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/masonry-wrap"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-masonry-wrap-item"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["masonry wrapper","masonry layout","masonry wordpress","masonry block for wordpress"],"description":"This block is the inner block of masonry wrap block"}'); /***/ }), /***/ "./src/blocks/masonry-wrap/block.json": /*!********************************************!*\ !*** ./src/blocks/masonry-wrap/block.json ***! \********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/masonry-wrap","title":"Masonry Grid","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"providesContext":{"post-grid/galleryId":"blockId","post-grid/lightbox":"lightbox"},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-masonry-wrap"},"styles":{}}},"item":{"type":"object","default":{"options":{"tag":"div","class":"pg-masonry-wrap-item"},"styles":{"width":{"Desktop":"200px"}}}},"masonryOptions":{"type":"object","default":{"gutter":20,"itemSelector":".pg-masonry-wrap-item"}},"lightbox":{"type":"object","default":{"options":{"enable":false}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["masonry wrapper","masonry layout","masonry wordpress","masonry block for wordpress"],"description":"The masonry wrapper provides dynamic control over content organization within a responsive layout."}'); /***/ }), /***/ "./src/blocks/menu-wrap-item/block.json": /*!**********************************************!*\ !*** ./src/blocks/menu-wrap-item/block.json ***! \**********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/menu-wrap-item","title":"Menu Maker Item","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"parent":["post-grid/menu-wrap"],"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"li","class":"pg-menu-wrap-item","isActive":false},"styles":{"backgroundColor":{"Desktop":""}}}},"link":{"type":"object","default":{"options":{"class":"pg-menu-link","text":"Label","url":""},"styles":{"backgroundColor":{"Desktop":""}}}},"subMenuWrap":{"type":"object","default":{"options":{"class":"pg-sub-menu","type":""},"styles":{"backgroundColor":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"enable":true,"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-check-circle","position":"beforeText","class":"pg-menu-icon"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"editorStyle":"pgmenu_wrap_editor_style","script":"front_script","keywords":["menu","menu block","navigation block","menu for wordpress","menu block for wordpress"],"description":"This block is the inner block of menu wrap block"}'); /***/ }), /***/ "./src/blocks/menu-wrap/block.json": /*!*****************************************!*\ !*** ./src/blocks/menu-wrap/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/menu-wrap","title":"Menu Maker","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-menu-wrap"},"styles":{"display":{"Desktop":"flex"}}}},"menuWrap":{"type":"object","default":{"options":{"tag":"ul","class":"pg-menu"},"styles":{"display":{"Desktop":"flex"}}}},"subMenuWrap":{"type":"object","default":{"options":{"class":"pg-sub-menu","type":""},"styles":{"backgroundColor":{"Desktop":""}}}},"link":{"type":"object","default":{"options":{"class":"pg-menu-link"},"styles":{"backgroundColor":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"class":"pg-menu-icon"},"styles":{"fontSize":{"Desktop":"18px"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"editorStyle":"pgmenu_wrap_editor_style","script":"front_script","keywords":["menu","menu block","navigation block","menu for wordpress","menu block for wordpress"],"description":"The menu wrap block is a container for structuring and presenting navigation menus or lists of items on a webpage, enhancing user accessibility."}'); /***/ }), /***/ "./src/blocks/number-counter/block.json": /*!**********************************************!*\ !*** ./src/blocks/number-counter/block.json ***! \**********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/number-counter","title":"Number Counter","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-number-counter"},"styles":{"display":{"Desktop":"block"}}}},"numberCount":{"type":"object","default":{"options":{"tag":"div","start":0,"end":500,"duration":1000,"class":"number-count"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"far fa-calendar-alt","position":"","class":"number-count-icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 0px"},"fontSize":{"Desktop":"18px"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["number counter","number counter block","Counter Up block","Counter Number","Progress","number counter for wordpress","number counter block for wordpress"],"description":"The number counter block is a visual element used to display numerical values or statistics in an animated, engaging manner."}'); /***/ }), /***/ "./src/blocks/popup/block.json": /*!*************************************!*\ !*** ./src/blocks/popup/block.json ***! \*************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/popup","title":"Popup","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"providesContext":{"post-grid/popupId":"blockId"},"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-popup"},"styles":{}}},"inner":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{}}},"closeWrap":{"type":"object","default":{"options":{"tag":"span","class":"","animation":"","library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right"},"styles":{}}},"entranceWrap":{"type":"object","default":{"options":{"tag":"span","class":"","animation":"fadeIn","library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right"},"styles":{}}},"visible":{"type":"object","default":{}},"editMode":{"type":"boolean","default":true},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"editorStyle":"pgpopup-animate","script":"front_script","keywords":["popup","popup form","Popups","Popup Builder","Popup Maker","Popup Maker","Lead Generation","Optins","Video PopUp","Popup Anything","popup block","popup for wordpress","popup block for wordpress"],"description":"The popup block is a user-triggered element that displays additional content or information in an overlay, often used for alerts, messages, or interactive features on a webpage."}'); /***/ }), /***/ "./src/blocks/post-author-fields/block.json": /*!**************************************************!*\ !*** ./src/blocks/post-author-fields/block.json ***! \**************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-author-fields","title":"Author Fields","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-author-fields","tag":"div"},"styles":{"display":{"Desktop":"block"}}}},"field":{"type":"object","default":{"options":{"linkTo":"postUrl","linkToMeta":"","linkTarget":"","avatarSize":"","dateFormat":"","customUrl":"","prefix":"","postfix":"","linkAttr":[]},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforePostDate","class":"icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"metaKey":{"type":"string","default":""},"frontText":{"type":"object","default":{"options":{"text":"Author: ","class":"inline-block"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["post author fields","post author fields block","post author","author profile","author bio","author links","post author block","post author for wordpress","post author block for wordpress"],"description":"A post author fields block is a section for inputting and displaying a specific author\'s details field on a blog post or article, such as name, bio, and contact information."}'); /***/ }), /***/ "./src/blocks/post-author/block.json": /*!*******************************************!*\ !*** ./src/blocks/post-author/block.json ***! \*******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-author","title":"Post Author","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-post-author"},"styles":{"display":{"Desktop":"block"}}}},"elements":{"type":"object","default":{"items":[{"id":"avatar","label":"Avatar"},{"id":"name","label":"Name"},{"id":"description","label":"Description"}]}},"avatar":{"type":"object","default":{"options":{"class":"avatar","size":"48","default":""},"styles":{"display":{"Desktop":"block"},"backgroundColor":{"Desktop":""},"overflow":{"Desktop":"hidden"},"margin":{"Desktop":"0px 20px 0px 0px"},"borderRadius":{"Desktop":"100px 100px 100px 100px"},"float":{"Desktop":"left"}}}},"name":{"type":"object","default":{"options":{"class":"name","prefix":"","postfix":"","linkTo":"","linkToMeta":"","customUrl":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"description":{"type":"object","default":{"options":{"class":"description","prefix":"","postfix":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"linkAttr":{"type":"array","default":[]},"blockCss":{"type":"object","default":{"items":{}}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["post author","author profile","author bio","author links","post author block","post author for wordpress","post author block for wordpress"],"description":"The post author block provides information about the author of a blog post."}'); /***/ }), /***/ "./src/blocks/post-categories/block.json": /*!***********************************************!*\ !*** ./src/blocks/post-categories/block.json ***! \***********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-categories","title":"Post Categories","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-post-categories","tag":"div"},"styles":{"display":{"Desktop":"block"}}}},"items":{"type":"object","default":{"options":{"prefix":"","postfix":"","linkTo":"termUrl","linkToCustomMeta":"","linkToAuthorMeta":"","customUrl":"","maxCount":99,"postCount":false,"class":" item ","linkTarget":"","linkAttr":[]},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeFronttext","class":"icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"termTitle":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"separator":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"postCount":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"frontText":{"type":"object","default":{"options":{"text":"Categories: ","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["category","categories","post category","categories block","post categories","post categories block","post category block","post category for wordpress","post category block for wordpress"],"description":"The post category block displays the categories or a list of categories associated with a blog post."}'); /***/ }), /***/ "./src/blocks/post-comment-count/block.json": /*!**************************************************!*\ !*** ./src/blocks/post-comment-count/block.json ***! \**************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-comment-count","title":"Post Comment Count","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-post-comment-count"},"styles":{"display":{"Desktop":"block"}}}},"commentCount":{"type":"object","default":{"options":{"tag":"div","status":"approved","customLabel":"Count: %s","linkTo":"","linkToUrl":"","linkToMetaKey":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":"commentCount"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-comment","position":"beforeCommentCount","class":"commentCount-icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["post comment","post total comment count","total comment count","post comment count","post comment count block","post comment count for wordpress","post comment count block for wordpress"],"description":"The post comment count block shows how many comments a blog post has received."}'); /***/ }), /***/ "./src/blocks/post-date/block.json": /*!*****************************************!*\ !*** ./src/blocks/post-date/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-date","title":"Post Date","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-post-date"},"styles":{"display":{"Desktop":"block"}}}},"postDate":{"type":"object","default":{"options":{"tag":"div","dateFormat":"Y-m-d","linkTo":"","linkToUrl":"","linkToMetaKey":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"far fa-calendar-alt","position":"beforePostDate","class":"postdate-icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["post date","post date format","post date time","post date display","post date block","post date for wordpress","post date block for wordpress"],"description":"The post date block displays the publication date of a blog post, offering readers information about when it was written."}'); /***/ }), /***/ "./src/blocks/post-excerpt/block.json": /*!********************************************!*\ !*** ./src/blocks/post-excerpt/block.json ***! \********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-excerpt","title":"post excerpt","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-post-excerpt"},"styles":{"display":{"Desktop":"block"}}}},"postExcerpt":{"type":"object","default":{"options":{"tag":"p","text":"","limitBy":"word","limitCount":25,"excerptSource":"auto","excerptSourceMeta":"","removeBlocks":true,"removeShortcodes":true,"keepHtml":false,"removeEmbeds":true,"autoP":false,"isLink":false,"linkTarget":"_blank","customUrl":"","linkAttr":[],"class":"excerpt-text"},"styles":{"color":{"Desktop":"#000000 !important"},"display":{"Desktop":"inline"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"readMore":{"type":"object","default":{"options":{"enable":true,"text":"Read More...","isLink":true,"linkTarget":"_blank","customUrl":"","linkAttr":[],"class":"readmore"},"styles":{"display":{"Desktop":"inline-block"},"color":{"Desktop":"#1F2E45"},"margin":{"Desktop":"0px 0px 0px 6px"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"600"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"linkAttr":{"type":"array","default":[]},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["post excerpt","post excerpt html","post excerpt count","advanced post excerpt","excerpt","excerpt read more","excerpt block","post excerpt block","post excerpt"],"description":"This block displays the excerpt or summary of a blog post\'s content."}'); /***/ }), /***/ "./src/blocks/post-featured-image/block.json": /*!***************************************************!*\ !*** ./src/blocks/post-featured-image/block.json ***! \***************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-featured-image","title":"Featured Image","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-post-featured-image","useAsBackground":"no"},"styles":{"width":{"Desktop":"100%"},"overflow":{"Desktop":"hidden"}}}},"featuredImage":{"type":"object","default":{"options":{"tag":"","linkTo":"","customUrl":"","linkToMetaKey":"","altTextSrc":"imgAltText","altTextCustom":"","altTextMetaKey":"","titleTextSrc":"imgTitle","titleTextCustom":"","titleTextMetaKey":"","linkTarget":"_blank","linkAttr":[],"class":"","size":{"Desktop":"full","Tablet":"full","Mobile":"full"}},"styles":{"display":{"Desktop":"block"},"maxWidth":{"Desktop":"100%"},"height":{"Desktop":"auto"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["featured image","post featured image","post thumbnail image","featured image block","featured image for wordpress","featured image block for wordpress"],"description":"The featured image block is a container for displaying the featured image within a webpage."}'); /***/ }), /***/ "./src/blocks/post-grid-filterable-nav/block.json": /*!********************************************************!*\ !*** ./src/blocks/post-grid-filterable-nav/block.json ***! \********************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-grid-filterable-nav","title":"Post Grid - Filterable Nav","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/post-grid"],"usesContext":["post-grid/postGridId","post-grid/pagination","post-grid/paginationItem","post-grid/paginationItemActive","post-grid/activeFilter","post-grid/filterGroupWrap","post-grid/filterGroup","post-grid/filterable"],"supports":{"align":["left","right","center","wide","full"],"html":false},"attributes":{"lazyLoad":{"type":"object","default":{"options":{"class":"lazyLoad","enable":"no","srcUrl":"","srcId":"","icon":{"library":"","srcType":"class","iconSrc":""}},"styles":{}}},"search":{"type":"object","default":{"options":{"class":"search","enable":"no","type":"","placeholder":"","icon":"","busyIcon":""},"styles":{}}},"filterable":{"type":"object","default":{"options":{"filters":[],"allText":"All","logicWithinGroup":"","logicBetweenGroups":"","multifilter":false,"showSort":"","filterToggle":"no","showRandom":"","showAll":"yes","showClear":"","activeFilter":"","parPage":6},"styles":{"color":{"Desktop":""},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{"Desktop":"inline-block"},"cursor":{"Desktop":"pointer"}}}},"activeFilter":{"type":"object","default":{"options":{"slug":"all"},"styles":{"color":{"Desktop":""},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"filterGroupWrap":{"type":"object","default":{"options":{},"styles":{"color":{"Desktop":"#18978F"},"backgroundColor":{"Desktop":"#9DD6DF"},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{"Desktop":"inline-block"}}}},"filterGroup":{"type":"object","default":{"options":{},"styles":{"color":{"Desktop":"#18978F"},"backgroundColor":{"Desktop":"#9DD6DF"},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{"Desktop":"inline-block"}}}},"container":{"type":"object","default":{"options":{"class":""},"styles":{}}},"itemsWrap":{"type":"object","default":{"options":{"class":"items-loop"},"styles":{"display":{"Desktop":"grid"},"gridTemplateColumns":{"Desktop":"1fr 1fr 1fr"},"gap":{"Desktop":"2em"}}}},"itemWrap":{"type":"object","default":{"options":{"class":"item"},"styles":{}}},"noPostsWrap":{"type":"object","default":{"options":{"class":"no-posts text-center"},"styles":{}}},"spinnerWrap":{"type":"object","default":{"options":{"class":"spinner"},"styles":{}}},"grid":{"type":"object","default":{"options":{"itemCss":{}},"styles":{"gridTemplateColumns":{},"gridTemplateRows":{},"colGap":{},"rowGap":{},"color":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"pagination":{"type":"object","default":{"options":{"class":"pagination ","type":"filterable","maxPageNum":"","prevText":"Previous","nextText":"Next","loadMoreText":"Load More","noMorePosts":"No More Posts","loadingText":"Loading...","loadingIcon":{"library":"","srcType":"class","iconSrc":""}},"styles":{"margin":{"Desktop":"20px 0px 20px 0px"},"display":{"Desktop":"flex"},"justifyContent":{"Desktop":"center"},"alignItems":{"Desktop":"center"},"gap":{"Desktop":"1em"}}}},"paginationItem":{"type":"object","default":{"options":{"class":"page-numbers inline-block"},"styles":{"color":{"Desktop":"#ffffff"},"fontSize":{"Desktop":"16px"},"padding":{"Desktop":"5px 15px 5px 15px"},"backgroundColor":{"Desktop":"#2445ffab"},"borderRadius":{"Desktop":"5px 5px 5px 5px"}}}},"paginationItemActive":{"type":"object","default":{"options":{"class":"page-numbers inline-block"},"styles":{"backgroundColor":{"Desktop":"#3223cb"}}}},"layout":{"type":"object","default":{"id":"","srcServer":"library","data":[],"rawData":""}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}},"queryArgs":{"type":"object","default":{"items":[{"val":["post"],"id":"postType"},{"val":["publish"],"id":"postStatus"},{"val":"DESC","id":"order"},{"val":["date"],"id":"orderby"},{"val":3,"id":"postsPerPage"},{"val":1,"id":"paged"}]}}},"style":"front_style","script":"front_script","keywords":["post grid filterable","post filterable block","filterable grid block","filterable grid for wordpress","post grid filterable block","post grid filterable for wordpress","post filterable block for wordpress"],"description":"The post grid filterable block is a dynamic element that organizes and displays blog posts in a grid format, allowing users to filter and sort posts by categories."}'); /***/ }), /***/ "./src/blocks/post-grid-filterable/block.json": /*!****************************************************!*\ !*** ./src/blocks/post-grid-filterable/block.json ***! \****************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-grid-filterable","title":"Post Grid - Filterable","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"providesContext":{"post-grid/postGridId":"blockId","post-grid/queryArgs":"queryArgs","post-grid/layout":"layout","post-grid/filterable":"filterable","post-grid/activeFilter":"activeFilter","post-grid/filterGroupWrap":"filterGroupWrap","post-grid/filterGroup":"filterGroup","post-grid/pagination":"pagination","post-grid/paginationItem":"paginationItem","post-grid/paginationItemActive":"paginationItemActive"},"supports":{"align":["left","right","center","wide","full"],"html":false},"attributes":{"lazyLoad":{"type":"object","default":{"options":{"class":"lazyLoad","enable":"no","srcUrl":"","srcId":"","icon":{"library":"","srcType":"class","iconSrc":""}},"styles":{}}},"search":{"type":"object","default":{"options":{"class":"search","enable":"no","type":"","placeholder":"","icon":"","busyIcon":""},"styles":{}}},"filterable":{"type":"object","default":{"options":{"filters":[],"allText":"All","logicWithinGroup":"","logicBetweenGroups":"","multifilter":false,"showSort":"","filterToggle":"no","showRandom":"","showAll":"yes","showClear":"","activeFilter":"","parPage":6},"styles":{"color":{"Desktop":""},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{"Desktop":"inline-block"},"cursor":{"Desktop":"pointer"}}}},"activeFilter":{"type":"object","default":{"options":{"slug":"all"},"styles":{"color":{"Desktop":""},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"filterGroupWrap":{"type":"object","default":{"options":{},"styles":{"color":{"Desktop":"#18978F"},"backgroundColor":{"Desktop":"#9DD6DF"},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{"Desktop":"inline-block"}}}},"filterGroup":{"type":"object","default":{"options":{},"styles":{"color":{"Desktop":"#18978F"},"backgroundColor":{"Desktop":"#9DD6DF"},"wordBreak":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{"Desktop":"inline-block"}}}},"container":{"type":"object","default":{"options":{"class":""},"styles":{}}},"itemsWrap":{"type":"object","default":{"options":{"class":"items-loop"},"styles":{"display":{"Desktop":"grid"},"gridTemplateColumns":{"Desktop":"1fr 1fr 1fr"},"gap":{"Desktop":"2em"}}}},"itemWrap":{"type":"object","default":{"options":{"class":"item"},"styles":{}}},"noPostsWrap":{"type":"object","default":{"options":{"class":"no-posts text-center"},"styles":{}}},"spinnerWrap":{"type":"object","default":{"options":{"class":"spinner"},"styles":{}}},"grid":{"type":"object","default":{"options":{"itemCss":{}},"styles":{"gridTemplateColumns":{},"gridTemplateRows":{},"colGap":{},"rowGap":{},"color":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"nthItemStyle":{"type":"array","default":[{"styles":{}}]},"pagination":{"type":"object","default":{"options":{"class":"pagination ","type":"filterable","maxPageNum":"","prevText":"Previous","nextText":"Next","loadMoreText":"Load More","noMorePosts":"No More Posts","loadingText":"Loading...","loadingIcon":{"library":"","srcType":"class","iconSrc":""}},"styles":{"margin":{"Desktop":"20px 0px 20px 0px"},"display":{"Desktop":"flex"},"justifyContent":{"Desktop":"center"},"alignItems":{"Desktop":"center"},"gap":{"Desktop":"1em"}}}},"paginationItem":{"type":"object","default":{"options":{"class":"page-numbers inline-block"},"styles":{"color":{"Desktop":"#ffffff"},"fontSize":{"Desktop":"16px"},"padding":{"Desktop":"5px 15px 5px 15px"},"backgroundColor":{"Desktop":"#2445ffab"},"borderRadius":{"Desktop":"5px 5px 5px 5px"}}}},"paginationItemActive":{"type":"object","default":{"options":{"class":"page-numbers inline-block"},"styles":{"backgroundColor":{"Desktop":"#3223cb"}}}},"layout":{"type":"object","default":{"id":"","srcServer":"library","data":[],"rawData":""}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}},"queryArgs":{"type":"object","default":{"items":[{"val":["post"],"id":"postType"},{"val":["publish"],"id":"postStatus"},{"val":"DESC","id":"order"},{"val":["date"],"id":"orderby"},{"val":3,"id":"postsPerPage"},{"val":1,"id":"paged"}]}}},"style":"front_style","script":"front_script","keywords":["post grid filterable","post filterable block","filterable grid block","filterable grid for wordpress","post grid filterable block","post grid filterable for wordpress","post filterable block for wordpress"],"description":"The post grid filterable block is a dynamic element that organizes and displays blog posts in a grid format, allowing users to filter and sort posts by categories."}'); /***/ }), /***/ "./src/blocks/post-grid/block.json": /*!*****************************************!*\ !*** ./src/blocks/post-grid/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-grid","title":"Post Grid","textdomain":"post-grid","category":"post-grid-tools","providesContext":{"post-grid/postGridId":"blockId","post-grid/queryArgs":"queryArgs","post-grid/layout":"layout","post-grid/pagination":"pagination","post-grid/paginationItem":"paginationItem","post-grid/paginationItemActive":"paginationItemActive"},"supports":{"align":["left","right","center","wide","full"],"html":false},"attributes":{"lazyLoad":{"type":"object","default":{"options":{"class":"lazyLoad","enable":"no","srcUrl":"","srcId":"","icon":{"library":"","srcType":"class","iconSrc":""}},"styles":{}}},"search":{"type":"object","default":{"options":{"class":"search","enable":"no","type":"","placeholder":"","icon":"","busyIcon":""},"styles":{}}},"container":{"type":"object","default":{"options":{"class":""},"styles":{}}},"itemsWrap":{"type":"object","default":{"options":{"class":"items-loop"},"styles":{"display":{"Desktop":"grid"},"gridTemplateColumns":{"Desktop":"1fr 1fr 1fr"},"gap":{"Desktop":"2em"}}}},"itemWrap":{"type":"object","default":{"options":{"class":"item"},"styles":{}}},"noPostsWrap":{"type":"object","default":{"options":{"class":"no-posts text-center"},"styles":{}}},"spinnerWrap":{"type":"object","default":{"options":{"class":"spinner"},"styles":{}}},"grid":{"type":"object","default":{"options":{"itemCss":{}},"styles":{"gridTemplateColumns":{},"gridTemplateRows":{},"colGap":{},"rowGap":{},"color":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"nthItemStyle":{"type":"array","default":[{"styles":{}}]},"pagination":{"type":"object","default":{"options":{"class":"pagination ","type":"normal","maxPageNum":"","prevText":"Previous","nextText":"Next","loadMoreText":"Load More","noMorePosts":"No More Posts","loadingText":"Loading...","loadingIcon":{"library":"","srcType":"class","iconSrc":""}},"styles":{"margin":{"Desktop":"20px 0px 20px 0px"},"display":{"Desktop":"flex"},"justifyContent":{"Desktop":"center"},"alignItems":{"Desktop":"center"},"gap":{"Desktop":"1em"}}}},"paginationItem":{"type":"object","default":{"options":{"class":"page-numbers inline-block"},"styles":{"color":{"Desktop":"#ffffff"},"fontSize":{"Desktop":"16px"},"padding":{"Desktop":"5px 15px 5px 15px"},"backgroundColor":{"Desktop":"#2445ffab"},"borderRadius":{"Desktop":"5px 5px 5px 5px"}}}},"paginationItemActive":{"type":"object","default":{"options":{"class":"page-numbers inline-block"},"styles":{"backgroundColor":{"Desktop":"#3223cb"}}}},"layout":{"type":"object","default":{"id":"","srcServer":"library","data":[],"rawData":""}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}},"queryArgs":{"type":"object","default":{"items":[{"val":["post"],"id":"postType"},{"val":["publish"],"id":"postStatus"},{"val":"DESC","id":"order"},{"val":["date"],"id":"orderby"},{"val":3,"id":"postsPerPage"},{"val":1,"id":"paged"}]}}},"style":"front_style","script":"front_script","keywords":["post grid","content grid","grid archive","post query","grid layout","advanced post grid","custom post grid","custom post type grid","post grid","post grid","post grid block","post grid for wordpress","post grid block for wordpress"],"description":"The post grid block arranges blog posts in a grid format, making it easy for users to browse and access content efficiently."}'); /***/ }), /***/ "./src/blocks/post-meta/block.json": /*!*****************************************!*\ !*** ./src/blocks/post-meta/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-meta","title":"Post Meta","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"template":{"type":"string","default":"<div>Output HTML: {metaValue}</div>"},"templateLoop":{"type":"string","default":""},"wrapper":{"type":"object","default":{"options":{"class":"pg-post-meta","tag":"div"},"styles":{"display":{"Desktop":"block"}}}},"meta":{"type":"object","default":{"options":{"key":"","type":"string","prefix":"","postfix":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["post meta","custom field","custom fields","custom fields block","acf fields","acf meta fields","meta fields","custom fields block","post meta block","post meta for wordpress","post meta block for wordpress"],"description":"The post meta block provides supplementary information about a blog post, including details like the author, date, and category."}'); /***/ }), /***/ "./src/blocks/post-query-pagination/block.json": /*!*****************************************************!*\ !*** ./src/blocks/post-query-pagination/block.json ***! \*****************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-query-pagination","title":"Post Query - Pagination","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/post-grid"],"usesContext":["post-grid/postGridId","post-grid/pagination","post-grid/paginationItem","post-grid/paginationItemActive"],"supports":{"align":["left","right","center","wide","full"],"html":false},"attributes":{"pagination":{"type":"object","default":{"options":{"class":"pagination pg-post-query-pagination","type":"normal","maxPageNum":"5","prevText":"Previous","nextText":"Next","loadMoreText":"Load More","noMorePosts":"No More Posts","loadingText":"Loading...","loadingIcon":{"loadingPosition":"beforeText","library":"fontAwesome","srcType":"class","iconSrc":"","class":"load-more"},"loadMoreIcon":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeText","class":"load-more"}},"styles":{}}},"paginationItem":{"type":"object","default":{"options":{"class":"page-numbers "},"styles":{}}},"paginationItemActive":{"type":"object","default":{"options":{"class":"page-numbers "},"styles":{}}},"next":{"type":"object","default":{"options":{"enable":true,"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeText","class":"next"},"styles":{}}},"previous":{"type":"object","default":{"options":{"enable":true,"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeText","class":"previous"},"styles":{}}},"start":{"type":"object","default":{"options":{"enable":true,"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeText","class":"start"},"styles":{}}},"end":{"type":"object","default":{"options":{"enable":true,"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeText","class":"end"},"styles":{}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["post grid","content grid","grid archive","post query","grid layout","advanced post grid","custom post grid","custom post type grid","post grid","post grid","post grid block","post grid for wordpress","post grid block for wordpress"],"description":"The post grid block arranges blog posts in a grid format, making it easy for users to browse and access content efficiently."}'); /***/ }), /***/ "./src/blocks/post-query/block.json": /*!******************************************!*\ !*** ./src/blocks/post-query/block.json ***! \******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-query","title":"Post Query","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/post-grid"],"usesContext":["post-grid/queryArgs","post-grid/layout","post-grid/postGridId"],"supports":{"align":["left","right","center","wide","full"],"html":false},"attributes":{"noPostsWrap":{"type":"object","default":{"options":{"class":"no-posts text-center"},"styles":{}}},"itemsWrap":{"type":"object","default":{"options":{"excludedWrapper":""},"styles":{}}},"itemWrap":{"type":"object","default":{"options":{"tag":"div","class":"item","counterClass":true,"termsClass":true,"oddEvenClass":true},"styles":{}}},"spinnerWrap":{"type":"object","default":{"options":{"class":"spinner"},"styles":{}}},"queryArgs":{"type":"object","default":{"items":[]}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":[{"val":["post"],"multiple":false,"id":"postType","label":"Post Types","description":"Select Post Types to Query"},{"val":["publish"],"multiple":false,"id":"postStatus","label":"Post status","description":"Query post by post status"},{"val":"DESC","multiple":false,"id":"order","label":"Order","description":"Post query order"},{"val":["date"],"multiple":false,"id":"orderby","label":"Orderby","description":"Post query orderby"},{"val":"3","multiple":false,"id":"postsPerPage","label":"Posts Per Page","description":"Number of post to show per page"},{"val":"1","multiple":false,"id":"paged","label":"Paged","description":"Pagination start with"}]}}},"style":"front_style","script":"front_script","keywords":["post grid","content grid","grid archive","post query","grid layout","advanced post grid","custom post grid","custom post type grid","post grid","post grid","post grid block","post grid for wordpress","post grid block for wordpress"],"description":"The post grid block arranges blog posts in a grid format, making it easy for users to browse and access content efficiently."}'); /***/ }), /***/ "./src/blocks/post-tags/block.json": /*!*****************************************!*\ !*** ./src/blocks/post-tags/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-tags","title":"Post Tags","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-post-tags","tag":"div"},"styles":{"display":{"Desktop":"block"}}}},"items":{"type":"object","default":{"options":{"prefix":"","postfix":"","linkTo":"termUrl","linkToCustomMeta":"","linkToAuthorMeta":"","customUrl":"","maxCount":99,"postCount":false,"class":" item","linkTarget":"","linkAttr":[]},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeFronttext","class":"icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"separator":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"termTitle":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"frontText":{"type":"object","default":{"options":{"text":"Tags: ","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"postCount":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["tag","tags","post tag","tags block","post tags","post tags block","post tag block","post tag for wordpress","post tag block for wordpress"],"description":"The post tag block displays tags or keywords associated with a blog post"}'); /***/ }), /***/ "./src/blocks/post-taxonomies/block.json": /*!***********************************************!*\ !*** ./src/blocks/post-taxonomies/block.json ***! \***********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-taxonomies","title":"Post Terms","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-post-terms","tag":"div"},"styles":{"display":{"Desktop":"block"}}}},"taxonomies":{"type":"object","default":{"options":{"taxName":""}}},"items":{"type":"object","default":{"options":{"prefix":"","postfix":"","linkTo":"termUrl","linkToCustomMeta":"","linkToAuthorMeta":"","customUrl":"","maxCount":99,"postCount":false,"class":" item","linkTarget":"","linkAttr":[]},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeFronttext","class":"icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"separator":{"type":"object","default":{"options":{"class":"inline-block","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"frontText":{"type":"object","default":{"options":{"text":"Tags: ","class":"inline-block"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"postCount":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"termTitle":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["taxonomy","terms","post taxonomy","custom taxonomy","post terms","post term","terms block","post terms","post terms block","post taxonomy block","post taxonomy for wordpress","post taxonomy block for wordpress"],"description":"A post terms block is used to categorize and organize blog posts by displaying associated tags, categories, or other classification elements."}'); /***/ }), /***/ "./src/blocks/post-title/block.json": /*!******************************************!*\ !*** ./src/blocks/post-title/block.json ***! \******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/post-title","title":"Post Title","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-post-title"},"styles":{"display":{"Desktop":"block"}}}},"abTest":{"type":"array","default":[]},"postTitle":{"type":"object","default":{"options":{"tag":"","limitBy":"","limitCount":99,"isLink":true,"linkTo":"postUrl","linkToAuthorMeta":"","linkToCustomMeta":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"30px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"700"},"lineHeight":{"Desktop":"155%"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix","position":"beforebegin "},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix","position":"afterend"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["post title","post title html","page title","post title limit","post title count","post title year","post title slug","custom post title","advanced post title","post title block","post title for wordpress","post title block for wordpress"],"description":"The post title block showcases the main title or headline of a blog post."}'); /***/ }), /***/ "./src/blocks/progress-bar/block.json": /*!********************************************!*\ !*** ./src/blocks/progress-bar/block.json ***! \********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/progress-bar","title":"Progress Bar","textdomain":"post-grid","category":"post-grid-tools","usesContext":[],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-progress-bar"},"styles":{"display":{"Desktop":"block"}}}},"progressData":{"type":"object","default":{"type":"","animate":"","animateDuration":1,"animateIteration":2,"animateDelay":2,"fill":45}},"progressInfo":{"type":"object","default":{"options":{"class":"","position":"beforeBar"},"styles":{"display":{"Desktop":"flex"},"justifyContent":{"Desktop":"space-between"},"padding":{"Desktop":"10px 15px 10px 15px"}}}},"progressBar":{"type":"object","default":{"options":{"class":""},"styles":{"borderRadius":{"Desktop":"30px"},"padding":{"Desktop":"6px"},"backgroundColor":{"Desktop":"#1f2e45"}}}},"progressFill":{"type":"object","default":{"options":{"class":""},"styles":{"borderRadius":{"Desktop":"30px"},"height":{"Desktop":"18px"},"width":{"Desktop":"45%"},"backgroundColor":{"Desktop":"#1f2e45"}}}},"progressCount":{"type":"object","default":{"options":{"position":"afterLabel","prefix":"","postfix":"","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"circleOverlay":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"fontSize":{"Desktop":""}}}},"circleMask":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"fontSize":{"Desktop":""}}}},"progressLabel":{"type":"object","default":{"options":{"text":"Digital Marketing","position":"","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","position":"beforeprogressCount","srcType":"class","iconSrc":"far fa-calendar-alt","class":"number-count-icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 0px"},"fontSize":{"Desktop":"18px"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["progress bar","progress bars","progress","circular progress bar","progress bar block","progress bar for wordpress","progress bar block for wordpress"],"description":"The progress bar block visually represents the completion or progress of a task, process, or goal."}'); /***/ }), /***/ "./src/blocks/read-more/block.json": /*!*****************************************!*\ !*** ./src/blocks/read-more/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/read-more","title":"Read More","textdomain":"post-grid","category":"post-grid-post","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-read-more"},"styles":{"display":{"Desktop":"inline-block"}}}},"readMore":{"type":"object","default":{"options":{"text":"Read More","linkTo":"postUrl","linkTarget":"_blank","customUrl":"","linkToAuthorMeta":"","linkToCustomMeta":"","linkAttr":[],"class":""},"styles":{"color":{"Desktop":"#1F2E45"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"display":{"Desktop":"inline-block"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"readmore-icon"},"styles":{"color":{"Desktop":"000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 0px 0px 10px"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockId":{"type":"string","default":""},"linkAttr":{"type":"array","default":[]},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["read more","read more link","read more custom link","read more custom text","read more text","see more link","view more","advanced read more","read more block","read more for wordpress","read more block for wordpress"],"description":"A read more link or button navigates to a specific webpage or resource for more detailed information when clicked."}'); /***/ }), /***/ "./src/blocks/shortcode/block.json": /*!*****************************************!*\ !*** ./src/blocks/shortcode/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/shortcode","title":"Shortcode","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-shortcode"},"styles":{"color":{"Desktop":""},"padding":{},"margin":{}}}},"shortcodeClassic":{"type":"string","default":""},"shortcode":{"type":"object","default":{"options":{"key":"","id":"","prefix":"","postfix":"","prams":[]},"styles":{"color":{"Desktop":""},"padding":{},"margin":{}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["advanced shortcode","custom shortcode","shortcode","shortcodes","shortcode block","shortcode for wordpress","shortcode block for wordpress"],"description":"The shortcode block allows users to embed custom code or shortcuts into a webpage to enhance the functionality and design."}'); /***/ }), /***/ "./src/blocks/social-share/block.json": /*!********************************************!*\ !*** ./src/blocks/social-share/block.json ***! \********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/social-share","title":"Social Share","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-social-share"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"class":"icon","position":"beforeLabel"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"label":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"count":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"elements":{"type":"object","default":{"options":{"linkTarget":"_blank","showLabel":false,"showCount":false,"showIcon":true,"iconPosition":"beforeLabel"},"styles":{"margin":{"Desktop":"10px 10px 10px 10px"},"fontSize":{"Desktop":"30px"}},"items":[{"id":"facebook","label":"Facebook","count":125,"url":"https://www.facebook.com/sharer.php?u={URL}","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":"fab fa-facebook-square"},"styles":{"color":{"Desktop":""},"backgroundColor":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{}}},{"id":"twitter","label":"Twitter","count":125,"url":"https://twitter.com/intent/tweet?url={URL}","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":"fab fa-twitter-square"},"styles":{"color":{"Desktop":""},"backgroundColor":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{}}},{"id":"linkedin","label":"Linkedin","count":125,"url":"https://www.linkedin.com/shareArticle?mini=true&url={URL}&title={TITLE}","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":"fab fa-linkedin"},"styles":{"color":{"Desktop":""},"backgroundColor":{},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{}}}]}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["social share","social share button","social share link","social share count","social share block","social share for wordpress","social share block for wordpress"],"description":"The social share block enables users to easily share content on various social media platforms, increasing its reach and engagement."}'); /***/ }), /***/ "./src/blocks/star-rate/block.json": /*!*****************************************!*\ !*** ./src/blocks/star-rate/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/star-rate","title":"Star Rate","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-star-rate","attr":[]},"styles":{"display":{"Desktop":"flex"},"alignItems":{"Desktop":"center"},"gap":{"Desktop":"8px"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-star","class":"text-icon","text":"","isLink":true,"linkTo":"postUrl","linkToAuthorMeta":"","linkToCustomMeta":"","linkTarget":"_blank","customUrl":"","linkAttr":[]},"styles":{"display":{"Desktop":"inline-block"},"fontSize":{"Desktop":"30px"},"fontWeight":{"Desktop":"700"}}}},"iconsIdle":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{"color":{"Desktop":"#fde68a"},"position":{"Desktop":"relative"},"display":{"Desktop":"flex"}}}},"iconsFilled":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{"color":{"Desktop":"#f59e0b"},"display":{"Desktop":"flex"},"position":{"Desktop":"absolute"},"overflow":{"Desktop":"hidden"},"top":{"Desktop":"0px"},"left":{"Desktop":"0px"},"width":{"Desktop":"85%"}}}},"summary":{"type":"object","default":{"options":{"type":"","rating_count":123,"avg_rating":4.25,"typeCustom":"","linkTo":"reviews","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"lineHeight":{"Desktop":"155%"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":"#000000 !important"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 0px"}}}},"blockId":{"type":"string","default":""},"linkAttr":{"type":"array","default":[]},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["star rate","star rates","star rating","star ratings","advanced star rate","star rate block","star rate for wordpress","star rating for wordpress","star rate block for wordpress"],"description":"A star rate block displays a rating using icons, indicating the level of approval or satisfaction."}'); /***/ }), /***/ "./src/blocks/tabs-nested-item/block.json": /*!************************************************!*\ !*** ./src/blocks/tabs-nested-item/block.json ***! \************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/tabs-nested-item","title":"Tabs Nested Item","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/tabs-nested"],"usesContext":["activeTab"],"supports":{"align":["wide","full"]},"attributes":{"navItem":{"type":"object","default":{"options":{"viewType":"horizontal","class":""},"styles":{}}},"activeNavItem":{"type":"object","default":{"options":{"viewType":"horizontal","class":""},"styles":{}}},"navLabel":{"type":"object","default":{"options":{"viewType":"horizontal","class":""},"styles":{}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-angle-down","position":"before","class":"icon"},"styles":{}}},"iconToggle":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-angle-down","position":"before","class":"icon-toggle"},"styles":{}}},"panelWrap":{"type":"object","default":{"options":{"viewType":"horizontal","position":"left","class":""},"styles":{}}},"uid":{"type":"string","default":""},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["nested tabs","multi level tabs","advanced tabs","tab content","jquery tabs","tabs block","tabs for wordpress","tabs block for wordpress"],"description":"This block is the inner block of nested tabs block"}'); /***/ }), /***/ "./src/blocks/tabs-nested/block.json": /*!*******************************************!*\ !*** ./src/blocks/tabs-nested/block.json ***! \*******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/tabs-nested","title":"Tabs","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"providesContext":{"activeTab":"activeTab"},"supports":{"align":["wide","full"]},"attributes":{"items":{"type":"array","default":[{"isActive":false,"headerText":"What is Lorem Ipsum?","content":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.","icon":"fas fa-angle-right","iconToggle":"fas fa-angle-down","styles":{}}]},"navsWrap":{"type":"object","default":{"options":{"class":""},"styles":{"display":{"Desktop":""}}}},"navItem":{"type":"object","default":{"options":{"class":""},"styles":{"backgroundColor":{"Desktop":""},"color":{"Desktop":""},"display":{"Desktop":""}}}},"activeNavItem":{"type":"object","default":{"options":{"class":"","id":""},"styles":{"backgroundColor":{"Desktop":""},"color":{"Desktop":""},"display":{"Desktop":""}}}},"navLabel":{"type":"object","default":{"options":{"class":""},"styles":{"backgroundColor":{"Desktop":""},"color":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-angle-right","position":"before","class":"nav-icon nav-icon-idle"},"styles":{"backgroundColor":{"Desktop":""},"color":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"fontSize":{"Desktop":""}}}},"iconToggle":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-angle-down","position":"before","class":"nav-icon-toggle nav-icon"},"styles":{"backgroundColor":{"Desktop":""},"color":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"fontSize":{"Desktop":""}}}},"panelWrap":{"type":"object","default":{"options":{"position":"left","class":""},"styles":{"backgroundColor":{"Desktop":""},"color":{"Desktop":""}}}},"tabs":{"type":"array","default":[]},"activeTab":{"type":"string","default":""},"wrapper":{"type":"object","default":{"options":{"content":"","tag":"div","class":"pg-tabs"},"styles":{"color":{"Desktop":""},"display":{},"position":{},"overflow":{}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["nested tabs","multi level tabs","advanced tabs","tab content","jquery tabs","tabs block","tabs for wordpress","tabs block for wordpress"],"description":"Nested tabs block organizes content into multiple layers of tabbed sections, enhancing content organization and user experience."}'); /***/ }), /***/ "./src/blocks/tabs/block.json": /*!************************************!*\ !*** ./src/blocks/tabs/block.json ***! \************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/tabs","title":"Tabs","textdomain":"post-grid","category":"post-grid-tools","parent":["post-grid/accordion-nested"],"usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"content":"","tag":"div","class":"pg-accordion"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"items":{"type":"array","default":[{"isActive":false,"headerText":"What is Lorem Ipsum?","content":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.","icon":"","iconToggle":"","styles":{}}]},"header":{"type":"object","default":{"options":{"text":"What is Lorem Ipsum?","tag":"div","class":"tab-nav "},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"cursor":{},"borderRadius":{},"fontSize":{"Desktop":""}}}},"headerActive":{"type":"object","default":{"options":{"text":"What is Lorem Ipsum?","tag":"div","class":"tab-nav ","activeIndex":0},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"fontSize":{"Desktop":""}}}},"headerWrap":{"type":"object","default":{"options":{"tag":"div","class":"tabs-navs "},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"fontSize":{"Desktop":""}}}},"content":{"type":"object","default":{"options":{"text":"Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.","tag":"div","class":"pg-accordion-content"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"fontSize":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-right","class":"icon","position":"beforeHeader","enableToggle":"yes"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"fontSize":{"Desktop":""}}}},"iconToggle":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-chevron-down","class":"iconToggle"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["advanced tabs","tabs block","tabs for wordpress","tabs block for wordpress"],"description":"The tabs block organizes content into separate tabs or sections, allowing users to switch between them for easy navigation and information access."}'); /***/ }), /***/ "./src/blocks/terms-list/block.json": /*!******************************************!*\ !*** ./src/blocks/terms-list/block.json ***! \******************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/terms-list","title":"Terms List","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"class":"pg-terms-list"},"styles":{"display":{"Desktop":"block"}}}},"taxonomies":{"type":"object","default":{"options":{"taxName":""}}},"items":{"type":"object","default":{"options":{"prefix":"","postfix":"","viewType":"list","hierarchicaly":false,"queryPosts":false,"accordionOpen":false,"linkToTerm":false,"linkTo":"termUrl","linkToCustomMeta":"","linkToAuthorMeta":"","customUrl":"","postCountPosition":"beforeTitle","postCountText":"Total Posts %s","gridColNumber":{},"gridColGap":"15px","gridRowGap":"15px","hideEmpty":false,"maxCount":99,"postCount":false,"class":"item","linkTarget":"","linkAttr":[]},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"queryArgs":{"type":"object","default":{"items":[]}},"termTitle":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeFronttext","class":"icon"},"styles":{"color":{"Desktop":"#000000"},"margin":{"Desktop":"0px 10px 0px 10px"},"fontSize":{"Desktop":"18px"}}}},"postCount":{"type":"object","default":{"options":{"class":"","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"separator":{"type":"object","default":{"options":{"class":"inline-block","text":", "},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"},"margin":{"Desktop":"0px 10px 0px 10px"}}}},"frontText":{"type":"object","default":{"options":{"text":"Tags: ","class":"inline-block"},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"utmTracking":{"type":"object","default":{"enable":false,"id":"","source":"","medium":"","campaign":"","term":"","content":""}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"script":"front_script","keywords":["terms list","term list","taxonomy term list","category list","categories list","tag list","tags list","taxonomy list","taxonomies list","terms list block","terms list for wordpress","terms list block for wordpress"],"description":"The terms list block displays a list of specific terms, providing a quick reference for readers."}'); /***/ }), /***/ "./src/blocks/text/block.json": /*!************************************!*\ !*** ./src/blocks/text/block.json ***! \************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/text","title":"Text","textdomain":"post-grid","category":"post-grid-tools","usesContext":[],"supports":{"align":["wide","full"]},"example":{},"attributes":{"text":{"type":"object","default":{"options":{"content":"Hello World!","tag":"div","class":"pg-text","id":"","limitBy":"","limitCount":99},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"script":"front_script","keywords":["advanced text","rich text","text","text block"],"description":"The text block is a basic element used for displaying and formatting text content on a webpage."}'); /***/ }), /***/ "./src/blocks/woo-add-to-cart/block.json": /*!***********************************************!*\ !*** ./src/blocks/woo-add-to-cart/block.json ***! \***********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-add-to-cart","title":"Add To Cart","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-sku"},"styles":{"display":{"Desktop":"flex","Tablet":"flex","Mobile":"flex"},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"viewCart":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"cartBtn":{"type":"object","default":{"options":{"tag":"div","productId":"","sku":"","ajax":true,"text":"Add to cart","class":""},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"quantityWrap":{"type":"object","default":{"options":{"enable":true,"class":""},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"quantityInput":{"type":"object","default":{"options":{"class":"","quantity":1},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"quantityIncrease":{"type":"object","default":{"options":{"class":""},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"quantityDecrease":{"type":"object","default":{"options":{"class":""},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeSku","class":"sku-icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":" ","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["add to cart","wc add to cart","add to cart button","add to cart link","woocommerce add to cart","woocommerce cart button","add to cart block","add to cart for woocommerce","add to cart block for woocommerce"],"description":"The add to cart block allows users to place items into their online shopping cart for purchase in e-commerce websites."}'); /***/ }), /***/ "./src/blocks/woo-price/block.json": /*!*****************************************!*\ !*** ./src/blocks/woo-price/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-price","title":"Product Price","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-price"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"currency":{"type":"object","default":{"options":{"tag":"","symbole":"$","position":"","class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"discounted":{"type":"object","default":{"options":{"value":123,"tag":"span","class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"regular":{"type":"object","default":{"options":{"value":123,"tag":"span","class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"separator":{"type":"object","default":{"options":{"text":"-","tag":"span","class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["product price","woocommerce price block","woocommerce price","woocommerce product price","custom price","price button","price block","product price block","product price for woocommerce","product price block for woocommerce"],"description":"The product price block displays the cost or value of a product or service on WooCommerce product page."}'); /***/ }), /***/ "./src/blocks/woo-product-info/block.json": /*!************************************************!*\ !*** ./src/blocks/woo-product-info/block.json ***! \************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-product-info","title":"Product Info","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"ul","class":"pg-woo-product-info"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"class":"icon","position":"beforePrefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"prefix":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"itemInfo":{"type":"object","default":{"options":{"class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"items":{"type":"object","default":{"options":{"linkTarget":"_blank","showIcon":false,"iconPosition":"beforePrefix","tag":"li"},"styles":{"color":{"Desktop":"#18978F"},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"borderRadius":{"Desktop":""},"fontSize":{"Desktop":""}},"elements":[{"id":"text","label":"Text","prefix":"","postfix":"","value":"","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{"text":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}},{"id":"weight","label":"Weight","prefix":"Weight: ","postfix":"","value":"10kg","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}},{"id":"length","label":"Length","prefix":"Length: ","postfix":"","value":"10cm","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}},{"id":"width","label":"Width","prefix":"Width: ","postfix":"","value":"10cm","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}},{"id":"height","label":"Height","prefix":"Height: ","postfix":"","value":"10cm","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}},{"id":"dimensions","label":"Dimensions","prefix":"Dimensions: ","postfix":"","value":"10cm X 10cm X 10cm","siteIcon":{"library":"fontAwesome","srcType":"class","iconSrc":""},"options":{},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}]}},"blockCssY":{"type":"object","default":{"items":{}}},"blockId":{"type":"string","default":""}},"style":"front_style","script":"front_script","keywords":["product info","product additional info","product info block","product info for woocommerce","product info block for woocommerce"],"description":"A product info block displays various details and information about a product."}'); /***/ }), /***/ "./src/blocks/woo-sale/block.json": /*!****************************************!*\ !*** ./src/blocks/woo-sale/block.json ***! \****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-sale","title":"On Sale","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-sale"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"sale":{"type":"object","default":{"options":{"text":"Sale","noSale":"No Sale","tag":"span","class":"sale"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["on sale","on sale badge","on sale badges","on sale mark","on sale button","on sale block","on sale for woocommerce","on sale block for woocommerce"],"description":"The on-sale block highlights whether the product is on sale or not."}'); /***/ }), /***/ "./src/blocks/woo-sku/block.json": /*!***************************************!*\ !*** ./src/blocks/woo-sku/block.json ***! \***************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-sku","title":"Product SKU","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-sku"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"sku":{"type":"object","default":{"options":{"text":"","tag":"span","class":"sku"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["product sku","woocommerce sku","product sku block","product sku for woocommerce","product sku block for woocommerce"],"description":"The product SKU block displays a unique identification code of a product"}'); /***/ }), /***/ "./src/blocks/woo-star-rate/block.json": /*!*********************************************!*\ !*** ./src/blocks/woo-star-rate/block.json ***! \*********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-star-rate","title":"Product Ratings","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-star-rate"},"styles":{"display":{"Desktop":"flex"},"alignItems":{"Desktop":"center"},"gap":{"Desktop":"10px"}}}},"iconsWrap":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"fas fa-star","position":"beforeSku","class":""},"styles":{"display":{"Desktop":"inline-block"},"fontSize":{"Desktop":"30px"},"fontWeight":{"Desktop":"700"}}}},"iconsIdle":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{"color":{"Desktop":"#fde68a"},"position":{"Desktop":"relative"},"display":{"Desktop":"flex"}}}},"iconsFilled":{"type":"object","default":{"options":{"tag":"div","class":""},"styles":{"color":{"Desktop":"#f59e0b"},"display":{"Desktop":"flex"},"position":{"Desktop":"absolute"},"overflow":{"Desktop":"hidden"},"top":{"Desktop":"0px"},"left":{"Desktop":"0px"},"width":{"Desktop":"75%"}}}},"summary":{"type":"object","default":{"options":{"type":"","typeCustom":"","linkTo":"reviews","class":""},"styles":{"color":{"Desktop":"#000000"},"fontSize":{"Desktop":"18px"},"fontFamily":{"Desktop":"Poppins"},"fontStyle":{"Desktop":"normal"},"fontWeight":{"Desktop":"400"}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["star rate","product star rate","star rates","star rating","star ratings","advanced star rate","star rate block","star rate for woocommerce","star rating for woocommerce","star rate block for woocommerce"],"description":"The star rate block shows the average rating or user reviews of a product."}'); /***/ }), /***/ "./src/blocks/woo-stock-quantity/block.json": /*!**************************************************!*\ !*** ./src/blocks/woo-stock-quantity/block.json ***! \**************************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-stock-quantity","title":"Stock Quantity","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-stockQuantity"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"stockQuantity":{"type":"object","default":{"options":{"tag":"div","text":"12","linkTo":"","linkToUrl":"","linkToMetaKey":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":""},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"fontSize":{"Desktop":""},"lineHeight":{},"letterSpacing":{},"fontFamily":{},"fontWeight":{},"textDecoration":{},"textTransform":{}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeQuantity","class":"stockQuantity-icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":"In Stock: ","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["stock quantity","stock quantity woocommerce","stock quantity block","stock quantity for woocommerce","stock quantity block for woocommerce"],"description":"The stock quantity block shows the specific number of items available for a product."}'); /***/ }), /***/ "./src/blocks/woo-stock/block.json": /*!*****************************************!*\ !*** ./src/blocks/woo-stock/block.json ***! \*****************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-stock","title":"In Stock","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-stock"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"stock":{"type":"object","default":{"options":{"inStock":"Stock","outOfStock":"Out of Stock","backOrder":"Backorder Enabled","tag":"span","class":""},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"","class":"icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":"","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["stock count","stock status","stock block","stock for woocommerce","stock block for woocommerce"],"description":"The stock block provides information about the availability of a product, helping customers know if it\'s in stock."}'); /***/ }), /***/ "./src/blocks/woo-total-sales/block.json": /*!***********************************************!*\ !*** ./src/blocks/woo-total-sales/block.json ***! \***********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/woo-total-sales","title":"Total Sales","textdomain":"post-grid","category":"post-grid-woo","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"wrapper":{"type":"object","default":{"options":{"tag":"div","class":"pg-woo-saleCount"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""}}}},"saleCount":{"type":"object","default":{"options":{"tag":"div","text":"12","linkTo":"","linkToUrl":"","linkToMetaKey":"","linkTarget":"_blank","linkAttr":[],"customUrl":"","class":""},"styles":{"display":{},"width":{},"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"fontSize":{"Desktop":""},"lineHeight":{},"letterSpacing":{},"fontFamily":{},"fontWeight":{},"textDecoration":{},"textTransform":{}}}},"icon":{"type":"object","default":{"options":{"library":"fontAwesome","srcType":"class","iconSrc":"","position":"beforeSaleCount","class":"saleCount-icon"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""},"padding":{"Desktop":""},"margin":{"Desktop":""},"display":{},"fontSize":{"Desktop":""},"lineHeight":{},"fontWeight":{"Desktop":"700"},"textDecoration":{}}}},"prefix":{"type":"object","default":{"options":{"text":"Total Sale: ","class":"prefix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"postfix":{"type":"object","default":{"options":{"text":"","class":"postfix"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["total sale","total sale woocommerce","total sale block","total sale for woocommerce","total sale block for woocommerce"],"description":"The total sale block shows the overall quantity of items sold."}'); /***/ }), /***/ "./src/blocks/wordpress-org/block.json": /*!*********************************************!*\ !*** ./src/blocks/wordpress-org/block.json ***! \*********************************************/ /***/ ((module) => { "use strict"; module.exports = JSON.parse('{"$schema":"https://schemas.wp.org/trunk/block.json","apiVersion":2,"name":"post-grid/wordpress-org","title":"wordpress-org","textdomain":"post-grid","category":"post-grid-tools","usesContext":["postId","loopIndex","postType","queryId"],"supports":{"align":["wide","full"]},"attributes":{"elements":{"type":"object","default":{"items":[{"id":"name","label":"Plugin Name","prefix":"Plugin Name: "},{"id":"version","label":"Version","prefix":"Version: "}]}},"wrapper":{"type":"object","default":{"options":{"tag":"ul","class":"pg-wordpress-org"},"styles":{}}},"item":{"type":"object","default":{"options":{"class":"item","tag":"li"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"thumb":{"type":"object","default":{"options":{"class":"thumb"},"styles":{"color":{"Desktop":""},"backgroundColor":{"Desktop":""}}}},"object":{"type":"object","default":{"options":{"type":"plugin","slug":"post-grid"}}},"blockId":{"type":"string","default":""},"blockCssY":{"type":"object","default":{"items":{}}}},"style":"front_style","script":"front_script","keywords":["wordpress.org","plugin information","plugin info","theme information","theme info","wordpress plugin info block","plugin info block"],"description":"The wordpress-org block shows the details of wordpress themes and plugins, such as - name, version, author, etc."}'); /***/ }) /******/ }); /************************************************************************/ /******/ // The module cache /******/ var __webpack_module_cache__ = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ var cachedModule = __webpack_module_cache__[moduleId]; /******/ if (cachedModule !== undefined) { /******/ return cachedModule.exports; /******/ } /******/ // Create a new module (and put it into the cache) /******/ var module = __webpack_module_cache__[moduleId] = { /******/ // no module.id needed /******/ // no module.loaded needed /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ __webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /************************************************************************/ /******/ /* webpack/runtime/compat get default export */ /******/ (() => { /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = (module) => { /******/ var getter = module && module.__esModule ? /******/ () => (module['default']) : /******/ () => (module); /******/ __webpack_require__.d(getter, { a: getter }); /******/ return getter; /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/define property getters */ /******/ (() => { /******/ // define getter functions for harmony exports /******/ __webpack_require__.d = (exports, definition) => { /******/ for(var key in definition) { /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); /******/ } /******/ } /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/global */ /******/ (() => { /******/ __webpack_require__.g = (function() { /******/ if (typeof globalThis === 'object') return globalThis; /******/ try { /******/ return this || new Function('return this')(); /******/ } catch (e) { /******/ if (typeof window === 'object') return window; /******/ } /******/ })(); /******/ })(); /******/ /******/ /* webpack/runtime/hasOwnProperty shorthand */ /******/ (() => { /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) /******/ })(); /******/ /******/ /* webpack/runtime/make namespace object */ /******/ (() => { /******/ // define __esModule on exports /******/ __webpack_require__.r = (exports) => { /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); /******/ } /******/ Object.defineProperty(exports, '__esModule', { value: true }); /******/ }; /******/ })(); /******/ /******/ /* webpack/runtime/publicPath */ /******/ (() => { /******/ var scriptUrl; /******/ if (__webpack_require__.g.importScripts) scriptUrl = __webpack_require__.g.location + ""; /******/ var document = __webpack_require__.g.document; /******/ if (!scriptUrl && document) { /******/ if (document.currentScript) /******/ scriptUrl = document.currentScript.src; /******/ if (!scriptUrl) { /******/ var scripts = document.getElementsByTagName("script"); /******/ if(scripts.length) { /******/ var i = scripts.length - 1; /******/ while (i > -1 && !scriptUrl) scriptUrl = scripts[i--].src; /******/ } /******/ } /******/ } /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic. /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser"); /******/ scriptUrl = scriptUrl.replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/"); /******/ __webpack_require__.p = scriptUrl; /******/ })(); /******/ /************************************************************************/ var __webpack_exports__ = {}; // This entry need to be wrapped in an IIFE because it need to be in strict mode. (() => { "use strict"; /*!**********************!*\ !*** ./src/index.js ***! \**********************/ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @wordpress/api-fetch */ "@wordpress/api-fetch"); /* harmony import */ var _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0__); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @wordpress/hooks */ "@wordpress/hooks"); /* harmony import */ var _wordpress_hooks__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_wordpress_hooks__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_data__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @wordpress/data */ "@wordpress/data"); /* harmony import */ var _wordpress_data__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_wordpress_data__WEBPACK_IMPORTED_MODULE_3__); /* harmony import */ var _store__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./store */ "./src/store.js"); /* harmony import */ var _templates__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./templates */ "./src/templates.js"); /* harmony import */ var _sidebars__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./sidebars */ "./src/sidebars.js"); /* harmony import */ var _blocks_post_title__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./blocks/post-title */ "./src/blocks/post-title/index.js"); /* harmony import */ var _blocks_post_excerpt__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! ./blocks/post-excerpt */ "./src/blocks/post-excerpt/index.js"); /* harmony import */ var _blocks_read_more__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! ./blocks/read-more */ "./src/blocks/read-more/index.js"); /* harmony import */ var _blocks_post_featured_image__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./blocks/post-featured-image */ "./src/blocks/post-featured-image/index.js"); /* harmony import */ var _blocks_post_author__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ./blocks/post-author */ "./src/blocks/post-author/index.js"); /* harmony import */ var _blocks_post_author_fields__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ./blocks/post-author-fields */ "./src/blocks/post-author-fields/index.js"); /* harmony import */ var _blocks_post_categories__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ./blocks/post-categories */ "./src/blocks/post-categories/index.js"); /* harmony import */ var _blocks_post_tags__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! ./blocks/post-tags */ "./src/blocks/post-tags/index.js"); /* harmony import */ var _blocks_post_taxonomies__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! ./blocks/post-taxonomies */ "./src/blocks/post-taxonomies/index.js"); /* harmony import */ var _blocks_post_date__WEBPACK_IMPORTED_MODULE_16__ = __webpack_require__(/*! ./blocks/post-date */ "./src/blocks/post-date/index.js"); /* harmony import */ var _blocks_post_meta__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./blocks/post-meta */ "./src/blocks/post-meta/index.js"); /* harmony import */ var _blocks_post_comment_count__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./blocks/post-comment-count */ "./src/blocks/post-comment-count/index.js"); /* harmony import */ var _blocks_archive_title__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./blocks/archive-title */ "./src/blocks/archive-title/index.js"); /* harmony import */ var _blocks_archive_description__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./blocks/archive-description */ "./src/blocks/archive-description/index.js"); /* harmony import */ var _blocks_image__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./blocks/image */ "./src/blocks/image/index.js"); /* harmony import */ var _blocks_post_grid__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./blocks/post-grid */ "./src/blocks/post-grid/index.js"); /* harmony import */ var _blocks_post_grid_filterable__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./blocks/post-grid-filterable */ "./src/blocks/post-grid-filterable/index.js"); /* harmony import */ var _blocks_post_grid_filterable_nav__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./blocks/post-grid-filterable-nav */ "./src/blocks/post-grid-filterable-nav/index.js"); /* harmony import */ var _blocks_post_query__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./blocks/post-query */ "./src/blocks/post-query/index.js"); /* harmony import */ var _blocks_post_query_pagination__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./blocks/post-query-pagination */ "./src/blocks/post-query-pagination/index.js"); /* harmony import */ var _blocks_content_slider__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./blocks/content-slider */ "./src/blocks/content-slider/index.js"); /* harmony import */ var _blocks_content_slider_item__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./blocks/content-slider-item */ "./src/blocks/content-slider-item/index.js"); /* harmony import */ var _blocks_popup__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./blocks/popup */ "./src/blocks/popup/index.js"); /* harmony import */ var _blocks_form_wrap__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./blocks/form-wrap */ "./src/blocks/form-wrap/index.js"); /* harmony import */ var _blocks_form_field_input__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./blocks/form-field-input */ "./src/blocks/form-field-input/index.js"); /* harmony import */ var _blocks_form_field_submit__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./blocks/form-field-submit */ "./src/blocks/form-field-submit/index.js"); /* harmony import */ var _blocks_form_field_select__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./blocks/form-field-select */ "./src/blocks/form-field-select/index.js"); /* harmony import */ var _blocks_form_field_checkbox__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./blocks/form-field-checkbox */ "./src/blocks/form-field-checkbox/index.js"); /* harmony import */ var _blocks_form_field_radio__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./blocks/form-field-radio */ "./src/blocks/form-field-radio/index.js"); /* harmony import */ var _blocks_form_field_textarea__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./blocks/form-field-textarea */ "./src/blocks/form-field-textarea/index.js"); /* harmony import */ var _blocks_form_field_file_multi__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./blocks/form-field-file-multi */ "./src/blocks/form-field-file-multi/index.js"); /* harmony import */ var _blocks_form_field_file__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./blocks/form-field-file */ "./src/blocks/form-field-file/index.js"); /* harmony import */ var _blocks_number_counter__WEBPACK_IMPORTED_MODULE_39__ = __webpack_require__(/*! ./blocks/number-counter */ "./src/blocks/number-counter/index.js"); /* harmony import */ var _blocks_date_countdown__WEBPACK_IMPORTED_MODULE_40__ = __webpack_require__(/*! ./blocks/date-countdown */ "./src/blocks/date-countdown/index.js"); /* harmony import */ var _blocks_list__WEBPACK_IMPORTED_MODULE_41__ = __webpack_require__(/*! ./blocks/list */ "./src/blocks/list/index.js"); /* harmony import */ var _blocks_list_nested__WEBPACK_IMPORTED_MODULE_42__ = __webpack_require__(/*! ./blocks/list-nested */ "./src/blocks/list-nested/index.js"); /* harmony import */ var _blocks_list_nested_item__WEBPACK_IMPORTED_MODULE_43__ = __webpack_require__(/*! ./blocks/list-nested-item */ "./src/blocks/list-nested-item/index.js"); /* harmony import */ var _blocks_progress_bar__WEBPACK_IMPORTED_MODULE_44__ = __webpack_require__(/*! ./blocks/progress-bar */ "./src/blocks/progress-bar/index.js"); /* harmony import */ var _blocks_menu_wrap__WEBPACK_IMPORTED_MODULE_45__ = __webpack_require__(/*! ./blocks/menu-wrap */ "./src/blocks/menu-wrap/index.js"); /* harmony import */ var _blocks_menu_wrap_item__WEBPACK_IMPORTED_MODULE_46__ = __webpack_require__(/*! ./blocks/menu-wrap-item */ "./src/blocks/menu-wrap-item/index.js"); /* harmony import */ var _blocks_icon__WEBPACK_IMPORTED_MODULE_47__ = __webpack_require__(/*! ./blocks/icon */ "./src/blocks/icon/index.js"); /* harmony import */ var _blocks_text__WEBPACK_IMPORTED_MODULE_48__ = __webpack_require__(/*! ./blocks/text */ "./src/blocks/text/index.js"); /* harmony import */ var _blocks_star_rate__WEBPACK_IMPORTED_MODULE_49__ = __webpack_require__(/*! ./blocks/star-rate */ "./src/blocks/star-rate/index.js"); /* harmony import */ var _blocks_breadcrumb__WEBPACK_IMPORTED_MODULE_50__ = __webpack_require__(/*! ./blocks/breadcrumb */ "./src/blocks/breadcrumb/index.js"); /* harmony import */ var _blocks_shortcode__WEBPACK_IMPORTED_MODULE_51__ = __webpack_require__(/*! ./blocks/shortcode */ "./src/blocks/shortcode/index.js"); /* harmony import */ var _blocks_social_share__WEBPACK_IMPORTED_MODULE_52__ = __webpack_require__(/*! ./blocks/social-share */ "./src/blocks/social-share/index.js"); /* harmony import */ var _blocks_terms_list__WEBPACK_IMPORTED_MODULE_53__ = __webpack_require__(/*! ./blocks/terms-list */ "./src/blocks/terms-list/index.js"); /* harmony import */ var _blocks_layers__WEBPACK_IMPORTED_MODULE_54__ = __webpack_require__(/*! ./blocks/layers */ "./src/blocks/layers/index.js"); /* harmony import */ var _blocks_layer__WEBPACK_IMPORTED_MODULE_55__ = __webpack_require__(/*! ./blocks/layer */ "./src/blocks/layer/index.js"); /* harmony import */ var _blocks_grid_wrap__WEBPACK_IMPORTED_MODULE_56__ = __webpack_require__(/*! ./blocks/grid-wrap */ "./src/blocks/grid-wrap/index.js"); /* harmony import */ var _blocks_grid_wrap_item__WEBPACK_IMPORTED_MODULE_57__ = __webpack_require__(/*! ./blocks/grid-wrap-item */ "./src/blocks/grid-wrap-item/index.js"); /* harmony import */ var _blocks_flex_wrap__WEBPACK_IMPORTED_MODULE_58__ = __webpack_require__(/*! ./blocks/flex-wrap */ "./src/blocks/flex-wrap/index.js"); /* harmony import */ var _blocks_flex_wrap_item__WEBPACK_IMPORTED_MODULE_59__ = __webpack_require__(/*! ./blocks/flex-wrap-item */ "./src/blocks/flex-wrap-item/index.js"); /* harmony import */ var _blocks_masonry_wrap__WEBPACK_IMPORTED_MODULE_60__ = __webpack_require__(/*! ./blocks/masonry-wrap */ "./src/blocks/masonry-wrap/index.js"); /* harmony import */ var _blocks_masonry_wrap_item__WEBPACK_IMPORTED_MODULE_61__ = __webpack_require__(/*! ./blocks/masonry-wrap-item */ "./src/blocks/masonry-wrap-item/index.js"); /* harmony import */ var _blocks_image_gallery__WEBPACK_IMPORTED_MODULE_62__ = __webpack_require__(/*! ./blocks/image-gallery */ "./src/blocks/image-gallery/index.js"); /* harmony import */ var _blocks_image_gallery_item__WEBPACK_IMPORTED_MODULE_63__ = __webpack_require__(/*! ./blocks/image-gallery-item */ "./src/blocks/image-gallery-item/index.js"); /* harmony import */ var _blocks_accordion_nested__WEBPACK_IMPORTED_MODULE_64__ = __webpack_require__(/*! ./blocks/accordion-nested */ "./src/blocks/accordion-nested/index.js"); /* harmony import */ var _blocks_accordion_nested_item__WEBPACK_IMPORTED_MODULE_65__ = __webpack_require__(/*! ./blocks/accordion-nested-item */ "./src/blocks/accordion-nested-item/index.js"); /* harmony import */ var _blocks_tabs_nested__WEBPACK_IMPORTED_MODULE_66__ = __webpack_require__(/*! ./blocks/tabs-nested */ "./src/blocks/tabs-nested/index.js"); /* harmony import */ var _blocks_tabs_nested_item__WEBPACK_IMPORTED_MODULE_67__ = __webpack_require__(/*! ./blocks/tabs-nested-item */ "./src/blocks/tabs-nested-item/index.js"); /* harmony import */ var _blocks_wordpress_org__WEBPACK_IMPORTED_MODULE_68__ = __webpack_require__(/*! ./blocks/wordpress-org */ "./src/blocks/wordpress-org/index.js"); /* harmony import */ var _blocks_accordion__WEBPACK_IMPORTED_MODULE_69__ = __webpack_require__(/*! ./blocks/accordion */ "./src/blocks/accordion/index.js"); /* harmony import */ var _blocks_tabs__WEBPACK_IMPORTED_MODULE_70__ = __webpack_require__(/*! ./blocks/tabs */ "./src/blocks/tabs/index.js"); /* harmony import */ var _blocks_woo_sku__WEBPACK_IMPORTED_MODULE_71__ = __webpack_require__(/*! ./blocks/woo-sku */ "./src/blocks/woo-sku/index.js"); /* harmony import */ var _blocks_woo_total_sales__WEBPACK_IMPORTED_MODULE_72__ = __webpack_require__(/*! ./blocks/woo-total-sales */ "./src/blocks/woo-total-sales/index.js"); /* harmony import */ var _blocks_woo_stock_quantity__WEBPACK_IMPORTED_MODULE_73__ = __webpack_require__(/*! ./blocks/woo-stock-quantity */ "./src/blocks/woo-stock-quantity/index.js"); /* harmony import */ var _blocks_woo_product_info__WEBPACK_IMPORTED_MODULE_74__ = __webpack_require__(/*! ./blocks/woo-product-info */ "./src/blocks/woo-product-info/index.js"); /* harmony import */ var _blocks_woo_price__WEBPACK_IMPORTED_MODULE_75__ = __webpack_require__(/*! ./blocks/woo-price */ "./src/blocks/woo-price/index.js"); /* harmony import */ var _blocks_woo_sale__WEBPACK_IMPORTED_MODULE_76__ = __webpack_require__(/*! ./blocks/woo-sale */ "./src/blocks/woo-sale/index.js"); /* harmony import */ var _blocks_woo_stock__WEBPACK_IMPORTED_MODULE_77__ = __webpack_require__(/*! ./blocks/woo-stock */ "./src/blocks/woo-stock/index.js"); /* harmony import */ var _blocks_woo_star_rate__WEBPACK_IMPORTED_MODULE_78__ = __webpack_require__(/*! ./blocks/woo-star-rate */ "./src/blocks/woo-star-rate/index.js"); /* harmony import */ var _blocks_woo_add_to_cart__WEBPACK_IMPORTED_MODULE_79__ = __webpack_require__(/*! ./blocks/woo-add-to-cart */ "./src/blocks/woo-add-to-cart/index.js"); //const { Configuration, OpenAIApi } = require("openai"); // test // const configuration = new Configuration({ // apiKey: "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", // }); // const openai = new OpenAIApi(configuration); window.PostGridPluginData = { freeUrl: "https://wordpress.org/plugins/post-grid/", proUrl: "https://pickplugins.com/post-grid/", websiteUrl: "https://pickplugins.com/", demoUrl: "http://getpostgrid.com/", wpReviewUrl: "https://wordpress.org/support/plugin/post-grid/reviews/#new-post", reviewUrl: "http://getpostgrid.com/submit-review", renewLicense: "https://pickplugins.com/renew-license/?licenseKey=", hasSubscribed: false, utm: { utm_source: "", utm_medium: "", utm_campaign: "", utm_content: "", utm_term: "", utm_id: "" } }; window.postGridBlockEditor = null; _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ path: "/post-grid/v2/get_plugin_data", method: "POST", data: {} }).then(res => { window.PostGridPluginData = res; }); _wordpress_api_fetch__WEBPACK_IMPORTED_MODULE_0___default()({ path: "/post-grid/v2/get_options", method: "POST", data: { option: "post_grid_block_editor" } }).then(res => { window.postGridBlockEditor = res; }); wp.domReady(function () { postGridDisabledBlocks.forEach(function (blockName) { if (blockName && wp.blocks.getBlockType(blockName) !== undefined) { wp.blocks.unregisterBlockType(blockName); } }); }); //var generalSidebarName = wp.data.select('core/edit-post').getActiveGeneralSidebarName(); //const isSidebarOpened = wp.data.select('post-grid-sidebar').isPluginSidebarOpened(); // if (!isSidebarOpened) { // wp.data.dispatch('post-grid-sidebar').openGeneralSidebar(); // } // subscribe(() => { // if (select('core/edit-post').isPluginSidebarOpened()) { // // Is open.. // console.log(generalSidebarName); // } else { // // Is closed.. // console.log(generalSidebarName); // } // }); // import "./blocks/table-of-contents"; // import "./blocks/justified-wrap"; // import "./blocks/justified-image"; // import "./blocks/justified-wrap-item"; // const addBlockEditAttributes = createHigherOrderComponent((BlockEdit) => { // return (props) => { // const { attributes, setAttributes, clientId } = props; // const { // blockId, // } = attributes; // console.log(props); // //props.attributes.blockId = 'pg' + clientId.split('-').pop(); // return <BlockEdit {...props} />; // }; // }, 'addBlockEditAttributes'); // addFilter( // 'editor.BlockEdit', // 'post-grid/text', // addBlockEditAttributes // ); // addFilter( // 'editor.BlockEdit', // 'post-grid/layers', // addBlockEditAttributes // ); })(); /******/ })() ; //# sourceMappingURL=index.js.map